Webhooks
Manage webhooks. Use action=“list” to get all webhooks. Use action=“create” with url and events (array of strings) to register a new webhook.
Input Schema
| Parameter | Type | Description |
|---|---|---|
| action | string | Action to perform: “list” to get webhooks, “create” to register a new one. Enum: list, create |
| url | string | The URL for the webhook (required for create action). |
| events | array | List of events to subscribe to (required for create action). |
REST Endpoint
POST /api/agents/tools/webhooksThe site_id field is required when calling via REST.
List webhooks:
POST /api/agents/tools/webhooks
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"action": "list",
"site_id": "YOUR_SITE_ID"
}Create a webhook:
POST /api/agents/tools/webhooks
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"action": "create",
"site_id": "YOUR_SITE_ID",
"url": "https://yourapp.com/webhooks/makinari",
"events": ["lead.created", "conversation.started"]
}Response:
{
"success": true,
"webhook": {
"id": "...",
"url": "https://yourapp.com/webhooks/makinari",
"events": ["lead.created", "conversation.started"]
}
}Last updated on