Skip to documentation

API · Webhooks

Create Webhook

Create a webhook to receive event notifications (requires full access). Your team can have up to 100 webhooks; save the signing secret returned in the response.

POST/webhooksFull access

Request parameters

ParameterTypeDescription
Idempotency-Key
header · optional
string
1–256 characters
Makes the request safe to retry. See Idempotency.
endpoint
body · required
stringPublic HTTPS URL that receives webhook events; private hosts are not allowed.
events
body · required
(string)[]
At least 1 item
Array of event types to subscribe to.

Request example

Set OPENSEND_BASE_URL=https://api.example.com and OPENSEND_API_KEY=os_replace_me on your server.

bash
curl -X POST "$OPENSEND_BASE_URL/webhooks" \
  -H "Authorization: Bearer $OPENSEND_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"endpoint":"https://example.com/webhooks/opensend","events":["email.delivered"]}'

Response

201 · application/json. Example IDs stand for IDs returned by your installation.

json
{
  "object": "webhook",
  "id": "479e3145-dd38-476b-932c-529ceb705947",
  "signing_secret": "whsec_..."
}

Behavior and errors

Save the returned signing secret. Retrieve webhook returns it again; list responses omit it. Use a public HTTPS endpoint; private addresses and redirects are refused during delivery. See create a webhook.

Use a full-access credential. Unknown or foreign resources return 404. See authentication, errors, rate limits, and pagination.