PUT
/
v2
/
webhooks
/
{webhookId}
Actualizar webhook
curl --request PUT \
  --url https://api.gotrebol.com/v2/webhooks/{webhookId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "url": "https://example.com/webhooks/trebol-v2",
  "events": [
    "verification.v2.created",
    "verification.v2.finished"
  ],
  "active": true
}'
{
  "id": "wh_123",
  "url": "https://example.com/webhooks/trebol",
  "events": [
    "verification.v2.created"
  ],
  "status": "enabled",
  "description": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

Path Parameters

webhookId
string
required

ID único del webhook

Body

application/json
url
string<uri>

URL a la que Trebol enviará las notificaciones

Example:

"https://example.com/webhooks/trebol"

events
string[]

Lista de eventos a suscribir

Example:
["verification.v2.created"]
description
string | null
Example:

"Webhook principal de producción"

status
enum<string>
Available options:
enabled,
disabled
Example:

"enabled"

Response

Webhook actualizado exitosamente.

id
string

ID único del webhook

Example:

"wh_123"

url
string<uri>

URL a la que Trebol enviará las notificaciones

Example:

"https://example.com/webhooks/trebol"

events
string[]

Lista de eventos suscritos

status
enum<string>

Indica si el webhook está habilitado o deshabilitado

Available options:
enabled,
disabled
Example:

"enabled"

description
string | null

Descripción opcional del webhook

created_at
string<date-time>
updated_at
string<date-time>