RaabtaHQ
Rotate a trigger’s web address

Rotate a trigger’s web address

POST/api/v1/triggers/{id}/token

scope assistants:write

Mints a new address for a webhook trigger and invalidates the old one immediately — the fix if an address leaks. Shown once. Any other kind of trigger returns 422 with reason: not_a_webhook_trigger.

Path parameters

NameTypeDescription
idrequired
string (uuid)Trigger id
Request
curl -X POST "https://your-crm.example.com/api/v1/triggers/4b5c6d7e-8f9a-4b0c-8d1e-2f3a4b5c6d7e/token" \
  -H "Authorization: Bearer $RAABTA_API_KEY"
Response · 200 OK
{
  "data": {
    "trigger": {
      "id": "4b5c6d7e-8f9a-4b0c-8d1e-2f3a4b5c6d7e",
      "assistant_id": "8f2c1d3e-4a5b-4c6d-9e0f-1a2b3c4d5e6f",
      "name": "Weekly no-show follow-up",
      "enabled": true,
      "kind": "webhook",
      "goal": "Message anyone who missed an appointment this week and offer to rebook.",
      "period": null,
      "send_time": null,
      "day_of_week": null,
      "day_of_month": null,
      "run_at": null,
      "event_key": null,
      "audience_type": "none",
      "contact_id": null,
      "segment_id": null,
      "max_targets": 50,
      "respect_quiet_hours": true,
      "last_fired_at": "2026-09-01T10:00:00.000Z",
      "last_error": null,
      "created_at": "2026-08-10T12:00:00.000Z",
      "updated_at": "2026-09-01T10:00:00.000Z"
    },
    "webhook_url": "https://your-crm.example.com/api/ai/triggers/hook/raabta_hook_9f8e7d6c5b4a"
  }
}

Response

Wrapped in { data: … }
NameTypeDescription
triggerrequired
objectThe trigger as stored
trigger.idrequired
string (uuid)Trigger id
trigger.assistant_idrequired
string (uuid)The assistant this fires
trigger.namerequired
stringTrigger name
trigger.enabledrequired
booleanTriggers are created switched OFF; enable them explicitly
trigger.kindrequired
string (enum)What wakes the assistantrecurringonceeventwebhook
trigger.goalrequired
stringWhat the assistant is asked to do when this fires
trigger.periodrequired
string (enum) | nullRecurring triggers onlydailyweeklymonthly
trigger.send_timerequired
string | nullRecurring only, as HH:MM in the account timezone
trigger.day_of_weekrequired
integer | nullRecurring weekly, where 0 is Sunday
trigger.day_of_monthrequired
integer | nullRecurring monthly, 1 to 31, clamped to the end of a short month
trigger.run_atrequired
string (date-time) | nullOne-off triggers only: when it fires
trigger.event_keyrequired
string | nullEvent triggers only: which event, from the catalogue
trigger.audience_typerequired
string (enum)Who a firing acts onnonecontactsegment
trigger.contact_idrequired
string (uuid) | nullSet when the audience is a single contact
trigger.segment_idrequired
string (uuid) | nullSet when the audience is a segment
trigger.max_targetsrequired
integerCeiling on runs started per firing, 1 to 500
trigger.respect_quiet_hoursrequired
booleanDefer a firing that lands outside the account sending hours
trigger.last_fired_atrequired
string (date-time) | nullWhen it last fired
trigger.last_errorrequired
string | nullWhy the last firing produced no run, if it produced none
trigger.created_atrequired
string (date-time)When it was created
trigger.updated_atrequired
string (date-time)When it was last edited
webhook_urlrequired
string | nullFor a webhook trigger, the callable address. Returned ONCE, on create and on rotate, and never readable again; null for every other kind

Errors

StatusCodeWhen
400validation_errorThe body or query failed validation. `details` lists each failing field with a `path` and a `message`.
401unauthorizedNo usable API key: the Authorization header is missing or malformed, or the key is unknown, revoked or expired. The three are deliberately indistinguishable.
403forbiddenThe key is valid but lacks the scope this endpoint requires, or the request came from an address outside the key’s IP allowlist. The message says which.
403account_suspendedThe account this key belongs to is suspended. Rotating the key will not help; contact support.
404not_foundNo such resource in this account. A resource that exists in another account also returns this.
422unprocessableThe request was well-formed but cannot be carried out. `reason` is a stable string saying why (for example `outside_window` or `stage_not_in_pipeline`).
429rate_limitedThe per-key budget, or the per-IP budget for failed authentication, is exhausted. Honour `Retry-After` before retrying.
500internalSomething failed on our side. Safe to retry with the same Idempotency-Key; quote `request_id` if it persists.