Webhooks API
Configure and manage webhooks to receive real-time event notifications from WhautoChat.
Endpoints
1. List Webhooks
GET /v1/webhooks
- Description: Retrieve a list of webhooks.
- Authentication: Requires
x-api-key
header.
Query Parameters:
Name | In | Type | Required | Description |
---|---|---|---|---|
limit | query | string | No | Max number of results |
page | query | string | No | Page number for pagination |
x-api-key | header | string | Yes | API authentication key |
Response: [200 OK
] - Array of Webhook
2. Create a Webhook
POST /v1/webhooks
- Description: Create a new webhook.
- Authentication: Requires
x-api-key
header.
Request Body: Webhook
(application/json)
Response: [200 OK
] - Webhook
3. Update a Webhook
PUT /v1/webhooks/{webhookId}
- Description: Update an existing webhook by its unique ID.
- Authentication: Requires
x-api-key
header.
Path Parameters:
Name | In | Type | Required | Description |
---|---|---|---|---|
webhookId | path | string | Yes | Webhook unique ID |
x-api-key | header | string | Yes | API authentication key |
Request Body: Webhook
(application/json)
Response: [200 OK
] - Webhook
4. Delete a Webhook
DELETE /v1/webhooks/{webhookId}
- Description: Delete a webhook by its unique ID.
- Authentication: Requires
x-api-key
header.
Path Parameters:
Name | In | Type | Required | Description |
---|---|---|---|---|
webhookId | path | string | Yes | Webhook unique ID |
x-api-key | header | string | Yes | API authentication key |
Response: [200 OK
] - DeleteResponse
Schemas
Webhook Schema
{
"id": "string",
"name": "string",
"serverUrl": "string",
"active": true,
"events": [
"incoming_whatsapp_message",
"outgoing_whatsapp_message",
"incoming_instagram_message",
"outgoing_instagram_message",
"incoming_telegram_message",
"outgoing_telegram_message",
"incoming_messenger_message",
"outgoing_messenger_message",
"incoming_website_message",
"outgoing_website_message",
"contact_created",
"contact_tag_added",
"contact_tag_removed"
],
"createdAt": "string",
"updatedAt": "string"
}
WebhookResponses Schema
[
{ /* Webhook object */ }
]
DeleteResponse Schema
{
"success": true
}