Skip to main content
POST
/
webhooks
Create Webhook
curl --request POST \
  --url https://api.unosend.co/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "events": [
    "<string>"
  ]
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.unosend.co/llms.txt

Use this file to discover all available pages before exploring further.

url
string
required
The URL to receive webhook events.
events
string[]
required
Events to subscribe to: email.sent, email.delivered, email.opened, email.clicked, email.bounced, email.complained.

Request

curl -X POST https://api.unosend.co/webhooks \
  -H "Authorization: Bearer un_xxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yourapp.com/webhooks/unosend",
    "events": ["email.delivered", "email.bounced"]
  }'

Response

201
{
  "success": true,
  "data": {
    "id": "wh_123",
    "url": "https://yourapp.com/webhooks/unosend",
    "events": ["email.delivered", "email.bounced"],
    "signing_secret": "whsec_abc123...",
    "created_at": "2024-01-15T10:30:00.000Z"
  }
}
Store the signing_secret securely. It’s only shown once and is used to verify webhook signatures.