Chuyển tới nội dung chính

19. Public API & Webhooks

19.1 List Webhook Settings

GET /api/v1/webhook-settings

List configured webhooks.

Response:

[
{
"id": "webhook-001",
"url": "https://your-app.com/webhooks/zcrm",
"events": ["contact.created", "message.received"],
"active": true,
"createdAt": "2026-05-01T10:00:00Z"
}
]

19.2 Create Webhook

POST /api/v1/webhook-settings

Create new webhook.

Request Body:

{
"url": "https://your-app.com/webhooks/contacts",
"events": ["contact.created", "contact.updated"],
"secret": "your-webhook-secret"
}

Response: 201

{
"id": "webhook-002",
"url": "https://your-app.com/webhooks/contacts",
"active": true,
"createdAt": "2026-06-05T17:35:00Z"
}