API Reference
Register, list, and remove webhook endpoints. Requires Enterprise plan.
Returns all webhook endpoints for your account.
text
GET https://chatspark.io/api/v1/webhooksjson
{
"webhooks": [
{
"id": 1,
"name": "Production Webhook",
"url": "https://api.example.com/webhooks/chatspark",
"events": ["lead.captured", "message.sent"],
"isActive": true,
"createdAt": "2026-02-24T12:00:00.000Z",
"updatedAt": "2026-02-24T12:00:00.000Z"
}
]
}curl -X GET "https://chatspark.io/api/v1/webhooks" \
-H "Authorization: Bearer cs_live_..."text
POST https://chatspark.io/api/v1/webhooks| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Display name for the webhook |
| url | string | Required | HTTPS URL to receive events |
| events | string[] | Required | Array of event types to subscribe to |
Response (201) includes a secret field. Store it securely. It is shown only once.
curl -X POST "https://chatspark.io/api/v1/webhooks" \
-H "Authorization: Bearer cs_live_..." \
-H "Content-Type: application/json" \
-d '{"name":"My Webhook","url":"https://api.example.com/webhooks","events":["lead.captured","message.sent"]}'Permanently removes a webhook. Returns 204 No Content.
text
DELETE https://chatspark.io/api/v1/webhooks/{id}curl -X DELETE "https://chatspark.io/api/v1/webhooks/1" \
-H "Authorization: Bearer cs_live_..."