Skip to Content
SendlySendly
API ReferenceWebhooks

Create a webhook

POST
/api/v1/webhooks

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.

headerAuthorizationBearer <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
  1. body

Body for POST /api/v1/webhooks.

url*string
Formaturi
event_types*array<>
Items1 <= items

Response Body

The created webhook and its one-time signing secret

application/json
  1. 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*string

The signing secret, shown EXACTLY ONCE. Store it now — no endpoint returns it again.

Example Request
curl -X POST 'https://api.sendly.now/api/v1/webhooks' \  -H 'Content-Type: application/json' \  -d '{  "url": "http://example.com",  "event_types": [    "email.sent"  ]}'
Example Response
{  "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"}