Create a webhook
Register an endpoint to receive HMAC-signed deliveries for the events named in event_types.
The response carries the signing secret ONCE. It is shown here and by POST /api/v1/webhooks/{id}/rotate-secret, and by nothing else — no endpoint reads it back, so store it now. A secret you have lost is replaced by rotating, not recovered.
Requires the webhooks:write scope — Create, edit, and delete your webhook endpoints.
AuthorizationBearer <API Key>API key authentication. Use a sk_* (FULL) or pk_* (SENDING_ONLY) key as the bearer token. Public keys (pk_*) are restricted to the email-send endpoints and the self-serve list subscribe/unsubscribe pair; every other endpoint — event tracking included — answers 403 for them. In scope terms (used by /api/v1/* operations): FULL keys hold every scope; SENDING_ONLY keys hold only emails:send.
application/json- body
Body for POST /api/v1/webhooks.
url*stringurievent_types*array<>1 <= itemsThe created webhook and its one-time signing secret
application/json- response
A newly created webhook and its one-time signing secret.
webhook*A webhook endpoint as exposed on the v1 API. The signing secret is NEVER on this shape — it is returned once, by create and by rotate, and no endpoint reads it back.
secret*stringThe signing secret, shown EXACTLY ONCE. Store it now — no endpoint returns it again.
curl -X POST 'https://api.sendly.now/api/v1/webhooks' \ -H 'Content-Type: application/json' \ -d '{ "url": "http://example.com", "event_types": [ "email.sent" ]}'{ "webhook": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "url": "string", "event_types": [ "string" ], "status": "ACTIVE", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }, "secret": "string"}