Chatspark
K

API Reference

v1
K

Webhook Management API

Register, list, and remove webhook endpoints. Requires Enterprise plan.

List Webhooks

Returns all webhook endpoints for your account.

text

GET https://chatspark.io/api/v1/webhooks

json

{
  "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_..."

Register Webhook

text

POST https://chatspark.io/api/v1/webhooks
NameTypeRequiredDescription
namestringRequired

Display name for the webhook

urlstringRequired

HTTPS URL to receive events

eventsstring[]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"]}'

Remove Webhook

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_..."

Previous

Events

Next

Node.js / TypeScript