πŸ₯Š Webhooks

Webhooks allow external systems to be notified when certain events happen in your Vambe AI environment. You can use them to trigger workflows, sync data, update CRMs, log analytics, or automate alerts.

βœ… Available Webhook Events

πŸ”½ GET /api/webhooks/topics – Get Available Webhook Topics

Retrieves a list of all possible webhook topics you can subscribe to.

Click to expand

πŸ”Ή Example Request

curl --request GET \
  'https://api.vambe.me/api/webhooks/topics'

πŸ”Ή Response

[
  "message.received",
  "message.sent",
  "ticket.opened",
  "ticket.closed"
]

βž• Create & Manage Webhooks

πŸ”½ POST /api/webhooks – Create a New Webhook

Registers a new webhook URL for a specific topic.

Click to expand

πŸ”Ή Body Parameters

NameTypeRequiredDescription
topicstringβœ…Webhook topic to listen to
urlstringβœ…The URL that will receive the webhook
secretstringβœ…Secret key for signature validation

πŸ”Ή Example Request

curl --request POST \
  'https://api.vambe.me/api/webhooks' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "topic": "message.received",
    "url": "https://yourdomain.com/webhook-handler",
    "secret": "yourSecretKey"
  }'

πŸ”Ή Success Response

{
  "status": "created",
  "id": "webhook_123"
}

πŸ”½ GET /api/webhooks – Get All Webhooks

Returns all webhooks registered for your account (including soft-deleted ones, if applicable).

Click to expand
curl --request GET \
  'https://api.vambe.me/api/webhooks'

πŸ”½ PUT /api/webhooks/{id} – Update a Webhook

Modifies an existing webhook's properties.

Click to expand

πŸ”Ή Path Parameter

NameTypeRequiredDescription
idstringβœ…ID of the webhook

πŸ”Ή Body Parameters

{
  "topic": "message.sent",
  "url": "https://yourdomain.com/new-handler",
  "secret": "updatedSecret",
  "active": true
}

πŸ”½ DELETE /api/webhooks/{id} – Delete a Webhook

Soft-deletes a webhook (can be restored later).

Click to expand

πŸ”Ή Example

curl --request DELETE \
  'https://api.vambe.me/api/webhooks/webhook_123'

Response:

{
  "status": "deleted"
}

πŸ“¬ Retrieve Info

πŸ”½ GET /api/webhooks/{id} – Get a Webhook by ID

Click to expand
curl --request GET \
  'https://api.vambe.me/api/webhooks/webhook_123'

πŸ”½ GET /api/webhooks/calls – Get Webhook Call History

Returns a paginated list of webhook calls with payloads, status, and timestamps.

Click to expand
curl --request GET \
  'https://api.vambe.me/api/webhooks/calls'

♻️ Recovery

πŸ”½ POST /api/webhooks/{id}/restore – Restore a Soft-Deleted Webhook

Click to expand
curl --request POST \
  'https://api.vambe.me/api/webhooks/webhook_123/restore'