Webhook API
API endpoints for managing webhooks for external integrations
Manage webhooks for external integrations.
Access: Secret Key Only (sk_live_*)
List Webhooks
Retrieves all webhooks for the authenticated team.
GET /team/webhook
Response 200 OK:
{
"webhooks": [
{
"id": "string",
"name": "string",
"url": "string",
"events": [],
"createdAt": "2024-01-15T10:30:00Z"
}
]
}
Create Webhook
Creates a new webhook.
POST /team/webhook
Request Body:
{
"name": "string",
"url": "string",
"events": ["chat.created", "message.created"],
"secret": "string (optional)"
}
Response 201 Created:
{
"id": "string",
"name": "string",
"url": "string",
"events": [],
"createdAt": "2024-01-15T10:30:00Z"
}
Get Webhook by ID
Retrieves a specific webhook.
GET /team/webhook/:webhookId
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
webhookId | string | The webhook ID |
Response 200 OK:
{
"id": "string",
"name": "string",
"url": "string",
"events": [],
"createdAt": "2024-01-15T10:30:00Z"
}
Delete Webhook
Deletes a webhook.
DELETE /team/webhook/:webhookId
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
webhookId | string | The webhook ID |
Response 200 OK:
{
"success": true
}
Execute Webhook (Trigger Manually)
Manually triggers a webhook execution.
POST /team/webhook/:webhookId
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
webhookId | string | The webhook ID |
Request Body:
{
"payload": {}
}
Response 200 OK:
{
"success": true,
"response": {}
}