Create a webhook endpoint▾
POST

Create a webhook endpoint

Register an HTTPS URL and subscribe it to events.

The URL must be HTTPS and must answer a GET verification challenge before events start flowing. See verifying an endpoint.

Store the signing secret now

signing_secret is shown once, at creation. Without it you cannot verify that an incoming request came from Sendport.
POST/v1/webhooks

Body parameters

urlstringrequired

HTTPS endpoint. Must respond 200 within 5 seconds.

eventsarrayrequired

Event names to subscribe to, or ["*"] for everything.

descriptionstring

Internal label.

curl -X POST https://api.sendport.tech/v1/webhooks \
  -H "Authorization: Bearer $SENDPORT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/hooks/sendport","events":["message.received","message.delivered","message.failed"]}'

Responses

201Created
{
  "object": "webhook_endpoint",
  "id": "whe_01JZQ4A2C4E6G8J0L2N4Q6SUWY",
  "url": "https://example.com/hooks/sendport",
  "events": ["message.received", "message.delivered", "message.failed"],
  "status": "enabled",
  "signing_secret": "whsec_9f2c7b1a4d8e0c3f6a5b2d1e0c9a8f7b",
  "created_at": "2026-09-06T09:14:22.114Z"
}
401Unauthorized
{
  "error": {
    "type": "authentication_error",
    "code": "missing_api_key",
    "message": "No API key provided.",
    "doc_url": "https://sendport.tech/docs/errors#missing_api_key",
    "request_id": "req_9f3c2a7b41de08c5b2e6"
  }
}
Try itsandbox