🥊 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
topicstringWebhook topic to listen to
urlstringThe URL that will receive the webhook
secretstringSecret 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
idstringID 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'