API ReferenceWebhooks
Create a webhook subscription. The signing secret is returned once, in this response only.
Authorization
api-key X-API-Key<token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/webhooks" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/webhook", "events": [ "contact.created", "broadcast.sent" ] }'{ "data": { "id": "550e8400-e29b-41d4-a716-446655440000", "workspaceId": "550e8400-e29b-41d4-a716-446655440000", "url": "https://example.com/webhooks/peleka", "events": [ "contact.created", "broadcast.sent" ], "isActive": true, "consecutiveFailures": 0, "lastSuccessAt": "2026-01-01T00:00:00.000Z", "lastFailureAt": null, "createdAt": "2026-01-01T00:00:00.000Z", "updatedAt": "2026-01-01T00:00:00.000Z", "secret": "whsec_1a2b3c4d5e6f7a8b9c0d" }}