Webhooks
Webhooks firmados que reciben eventos de campañas y llamadas.
GET /v1/webhooks
Result webhooks of my organization
Solo para usuarios con sesión iniciada (sin API key) · Rol: viewer o superior
Any signed-in member (not an API key). The https endpoints that receive the organization's events, oldest first. The secret is never listed. 401 when the token is missing, expired or invalid; 503 until webhooks are deployed.
Respuestas
200Successful Response · WebhookListNombre Tipo Requerido Descripción itemsWebhookResponse[]sí items[].activebooleansí items[].created_atstring (date-time)sí items[].descriptionstringsí items[].eventsstring[]sí items[].idstring (uuid)sí items[].updated_atstring (date-time)sí items[].urlstringsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse503Webhooks are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
POST /v1/webhooks
Add a result webhook
Solo para usuarios con sesión iniciada (sin API key) · Rol: admin o superior
An `admin` or above (not an API key). `url` must be https, with a public host. `events` are among the events of the catalog marked `webhook` (`campaign.started`, `campaign.completed`, `campaign.attempt.completed`, `call.result`, `call.analyzed`; `packages/contracts/events/catalog.json`). Each delivery is a POST with the event as JSON, signed in `X-eco-Signature` (`v1=` plus the hex HMAC-SHA256 of `{X-eco-Timestamp}.{body}` with the secret; every `X-eco-*` header also goes as `X-Froneus-*`, its name before the rename), and carries the event data: ids, outcome, duration and attempt number (and the last 4 digits of the phone) for campaign events, the extracted result or the analysis for call events. A failed delivery is retried with backoff and is dead after 8 attempts. The `secret` is returned in this response only. An organization has at most 10. 401 when the token is missing, expired or invalid; 403 below `admin`; 409 at the limit; 422 when the body is invalid; 503 until webhooks are deployed.
Cuerpo de la solicitud
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
description | string | ||
events | string[] | sí | |
url | string | sí |
Respuestas
201Successful Response · WebhookWithSecretResponseNombre Tipo Requerido Descripción activebooleansí created_atstring (date-time)sí descriptionstringsí eventsstring[]sí idstring (uuid)sí secretstringsí Shown once. Sign check: HMAC-SHA256 of `timestamp.body`. updated_atstring (date-time)sí urlstringsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one this operation needs. · ErrorResponse409The organization has 10 webhooks already. · ErrorResponse503Webhooks are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/webhooks/{webhook_id}
One result webhook
Solo para usuarios con sesión iniciada (sin API key) · Rol: viewer o superior
Any signed-in member (not an API key). 401 when the token is missing, expired or invalid; 404 when it is not the organization's; 503 until webhooks are deployed.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
webhook_id | path | string (uuid) | sí |
Respuestas
200Successful Response · WebhookResponseNombre Tipo Requerido Descripción activebooleansí created_atstring (date-time)sí descriptionstringsí eventsstring[]sí idstring (uuid)sí updated_atstring (date-time)sí urlstringsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse404No such webhook in the caller's tenant. · ErrorResponse503Webhooks are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
PATCH /v1/webhooks/{webhook_id}
Change a result webhook
Solo para usuarios con sesión iniciada (sin API key) · Rol: admin o superior
An `admin` or above (not an API key). Only the fields sent change; `active: false` pauses it, and nothing is queued for it meanwhile. 401 when the token is missing, expired or invalid; 403 below `admin`; 404 when it is not the organization's; 422 when the body is invalid; 503 until webhooks are deployed.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
webhook_id | path | string (uuid) | sí |
Cuerpo de la solicitud
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
active | boolean | null | ||
description | string | null | ||
events | string[] | null | ||
url | string | null |
Respuestas
200Successful Response · WebhookResponseNombre Tipo Requerido Descripción activebooleansí created_atstring (date-time)sí descriptionstringsí eventsstring[]sí idstring (uuid)sí updated_atstring (date-time)sí urlstringsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one this operation needs. · ErrorResponse404No such webhook in the caller's tenant. · ErrorResponse503Webhooks are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
DELETE /v1/webhooks/{webhook_id}
Remove a result webhook
Solo para usuarios con sesión iniciada (sin API key) · Rol: admin o superior
An `admin` or above (not an API key). Its delivery log goes with it. 401 when the token is missing, expired or invalid; 403 below `admin`; 404 when it is not the organization's; 503 until webhooks are deployed.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
webhook_id | path | string (uuid) | sí |
Respuestas
204Successful Response401Missing, expired or invalid token. · ErrorResponse403Role below the one this operation needs. · ErrorResponse404No such webhook in the caller's tenant. · ErrorResponse503Webhooks are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
GET /v1/webhooks/{webhook_id}/deliveries
Delivery log of a result webhook
Solo para usuarios con sesión iniciada (sin API key) · Rol: viewer o superior
Any signed-in member (not an API key). Newest first. `status` keeps `pending`, `delivered` or `dead`. Pass `next_cursor` of a page as `cursor` to get the next one; `limit` is at most 200 (default 100). 401 when the token is missing, expired or invalid; 404 when it is not the organization's; 422 when a parameter is out of range or the cursor is not one we issued; 503 until webhooks are deployed.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
webhook_id | path | string (uuid) | sí | |
status | query | string | null | ||
limit | query | integer | ||
cursor | query | string | null |
Respuestas
200Successful Response · WebhookDeliveryListNombre Tipo Requerido Descripción itemsWebhookDeliveryResponse[]sí items[].attemptsintegersí items[].created_atstring (date-time)sí items[].delivered_atstring (date-time) | nullsí items[].event_idstring (uuid)sí items[].event_typestringsí items[].idstring (uuid)sí items[].last_errorstring | nullsí items[].last_statusinteger | nullsí items[].next_attempt_atstring (date-time) | nullsí items[].statusstringsí (pending, delivered, dead) next_cursorstring | nullsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one in `x-min-role`, a suspended organization, or an API key without the operation's `x-api-key-scope` (any key, if the operation has none). · ErrorResponse404No such webhook in the caller's tenant. · ErrorResponse503Webhooks are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
POST /v1/webhooks/{webhook_id}/rotate-secret
Rotate the secret of a result webhook
Solo para usuarios con sesión iniciada (sin API key) · Rol: admin o superior
An `admin` or above (not an API key). The old secret stops working at once; the new one is in this response only. 401 when the token is missing, expired or invalid; 403 below `admin`; 404 when it is not the organization's; 503 until webhooks are deployed.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
webhook_id | path | string (uuid) | sí |
Respuestas
200Successful Response · WebhookWithSecretResponseNombre Tipo Requerido Descripción activebooleansí created_atstring (date-time)sí descriptionstringsí eventsstring[]sí idstring (uuid)sí secretstringsí Shown once. Sign check: HMAC-SHA256 of `timestamp.body`. updated_atstring (date-time)sí urlstringsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one this operation needs. · ErrorResponse404No such webhook in the caller's tenant. · ErrorResponse503Webhooks are not available yet. · ErrorResponsedefaultDefault Response · ErrorResponse
POST /v1/webhooks/{webhook_id}/test
Send a test event to a result webhook
Solo para usuarios con sesión iniciada (sin API key) · Rol: admin o superior
An `admin` or above (not an API key). Sends a signed `webhook.test` event now, outside the queue, and says what came back: `ok`, the HTTP `status_code`, an `error` class and the `duration_ms`. The response body of your endpoint is never returned. 401 when the token is missing, expired or invalid; 403 below `admin`; 404 when it is not the organization's; 429 when the organization sends too many tests, with `Retry-After` (at most 20 per minute per organization, `TOOL_TESTS_PER_MINUTE`, shared by tool and webhook tests and counted across replicas when Redis is set); 503 until webhooks are deployed or when the rate limiter is unavailable.
Parámetros
| Nombre | En | Tipo | Requerido | Descripción |
|---|---|---|---|---|
webhook_id | path | string (uuid) | sí |
Respuestas
200Successful Response · WebhookTestResponseNombre Tipo Requerido Descripción duration_msintegersí errorstring | nullsí okbooleansí status_codeinteger | nullsí 401Missing, expired or invalid token. · ErrorResponse403Role below the one this operation needs. · ErrorResponse404No such webhook in the caller's tenant. · ErrorResponse429Too many tests; see `Retry-After`. · ErrorResponse503Webhooks are not deployed, or the rate limiter is unavailable. · ErrorResponsedefaultDefault Response · ErrorResponse