Ir al contenido

Register or change your webhook URL

PUT/tenant/webhookProbar

La llamada la hace tu navegador, contra el servidor que elijas arriba. Si la documentación no está servida desde el mismo origen que la API, el navegador puede bloquear la respuesta por CORS: en ese caso abre estas páginas desde la propia API (/docs) o usa el curl de arriba.

PUT
/tenant/webhook
curl --request PUT \
--url http://localhost:3000/v1/tenant/webhook \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{ "url": "https://tu-dominio.com/webhooks/bolivar" }'

Where we push events to you. You can change it whenever you want with your own key: no need to write to us. Scope tenant:write or webhooks:write (the latter only touches the webhook: it is the one to give an agent).

In a production account the URL also serves live traffic: change it with an sk_live_ key. With an sk_test_ it returns 403 insufficient_scope. In a test account it works with your sk_test_.

It must be https and point to a public address. Any destination in a non-routable range (127/8, 10/8, 172.16/12, 192.168/16, 169.254/16 and their IPv6 equivalents) is rejected, and it is checked again on every delivery, not only when registered.

url: null turns pushing off. You lose nothing: events remain available at GET /v1/events, a legitimate way to integrate if you prefer polling.

Media typeapplication/json
object
url
string
nullable
Example
https://tu-dominio.com/webhooks/bolivar

Webhook registrado

Media typeapplication/json
object
tenantId
string
webhookUrl
string
nullable
next
string
Examplegenerated
{
"tenantId": "example",
"webhookUrl": "example",
"next": "example"
}

insufficient_scope: la key no tiene el scope, o es una sk_test_ de una cuenta real (la URL sirve también a lo live; usa una key sk_live_).

Media typeapplication/json
object
error
object
meta

Contexto estructurado del error cuando lo hay: qué límite se superó y de cuánto, qué campo es inválido, cuánto saldo había. No aparece en errores internos.

object
key
additional properties
any
type
string
Allowed values: invalid_request_error authentication_error rate_limit_error upstream_error api_error
code

Código ESTABLE. Programa contra esto.

string
message
string
request_id
string
Example
{
"error": {
"type": "invalid_request_error",
"code": "insufficient_balance",
"request_id": "req_8a0312ba896772bc441134cd"
}
}

La URL no es válida, no es https o apunta a una dirección no pública. El mensaje dice exactamente cuál de las tres.