Webhooks

URL base da API
https://crm.vdgestaobranding.com/api/v1

A documentação fica em developers.vdgestaobranding.com, mas todas as chamadas vão para crm.vdgestaobranding.com/api/v1.

GET/webhooks
webhooks:manage

Listar webhooks

curl -X GET "https://crm.vdgestaobranding.com/api/v1/webhooks" \
  -H "Authorization: Bearer $VDCRM_API_KEY"
POST/webhooks
webhooks:manage
Idempotency-Key

Cadastrar webhook

O segredo de assinatura (secret) é exibido só nesta resposta.

curl -X POST "https://crm.vdgestaobranding.com/api/v1/webhooks" \
  -H "Authorization: Bearer $VDCRM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://minha-api.com/vdcrm",
  "events": [
    "message.received",
    "message.status"
  ]
}'
Resposta 201
{
  "id": "w1…",
  "url": "https://minha-api.com/vdcrm",
  "events": [
    "message.received",
    "message.status"
  ],
  "secret": "whsec_…"
}
PATCH/webhooks/{id}
webhooks:manage

Alterar webhook

curl -X PATCH "https://crm.vdgestaobranding.com/api/v1/webhooks/{id}" \
  -H "Authorization: Bearer $VDCRM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "active": false
}'
DELETE/webhooks/{id}
webhooks:manage

Excluir webhook

curl -X DELETE "https://crm.vdgestaobranding.com/api/v1/webhooks/{id}" \
  -H "Authorization: Bearer $VDCRM_API_KEY"
POST/webhooks/{id}/test
webhooks:manage

Enviar evento de teste

curl -X POST "https://crm.vdgestaobranding.com/api/v1/webhooks/{id}/test" \
  -H "Authorization: Bearer $VDCRM_API_KEY"
Resposta 200
{
  "delivery_id": "d1…",
  "delivered": true,
  "status_code": 200
}
GET/webhooks/{id}/deliveries
webhooks:manage

Registro de entregas

  • limit — Itens por página (1–100, padrão 25).
  • cursor — Valor de next_cursor da página anterior.
curl -X GET "https://crm.vdgestaobranding.com/api/v1/webhooks/{id}/deliveries" \
  -H "Authorization: Bearer $VDCRM_API_KEY"
POST/webhook-deliveries/{id}/redeliver
webhooks:manage

Reenviar entrega

curl -X POST "https://crm.vdgestaobranding.com/api/v1/webhook-deliveries/{id}/redeliver" \
  -H "Authorization: Bearer $VDCRM_API_KEY"