Saltar al contenido principal
POST
Crear webhook
Cuándo usarla: Para que otro sistema (n8n, Zapier, tu propio servidor) se entere de los cambios sin consultar la API cada poco.

Autorizaciones

Authorization
string
header
requerido

Clave de API de Brelio (de organización o personal) o un token de acceso de WorkOS.

Encabezados

Idempotency-Key
string
requerido

Único por comando; reutilízala solo para reintentar la misma llamada.

Required string length: 8 - 255

Cuerpo

application/json
url
string
requerido

Tu endpoint: https a un nombre de host público.

Maximum string length: 2048
eventTypes
string[]
requerido

Tipos de evento que quieres recibir, de GET /v1/webhook-event-types.

Required array length: 1 - 100 elements
Required string length: 1 - 200
description
string
Maximum string length: 500

Respuesta

Correcto

id
string<uuid>
requerido
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
url
string
requerido
description
string | null
requerido
eventTypes
string[]
requerido
status
enum<string>
requerido
Opciones disponibles:
enabled,
disabled
secretHint
string
requerido

Los últimos caracteres del secreto de firma.

secretCreatedAt
string<date-time>
requerido

ISO 8601, en UTC.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
previousSecretExpiresAt
string<date-time> | null
requerido

Hasta entonces, las entregas llevan también una firma con el secreto anterior a la última rotación.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
failingSince
string<date-time> | null
requerido

Primer intento fallido desde la última entrega que llegó.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
disablesAt
string<date-time> | null
requerido

Cuándo se desactiva el endpoint si antes no llega ninguna entrega; null mientras funciona.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
disabledAt
string<date-time> | null
requerido

ISO 8601, en UTC.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
createdBy
string
requerido
version
integer
requerido
Rango requerido: -9007199254740991 <= x <= 9007199254740991
createdAt
string<date-time>
requerido

ISO 8601, en UTC.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
updatedAt
string<date-time>
requerido

ISO 8601, en UTC.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
secret
string

Secreto de firma (whsec_…), solo en la respuesta que lo creó. Guárdalo ahora: Brelio no puede volver a mostrarlo.