Skip to main content
POST
/
webhooks
/
subscriptions
Create webhook subscription
curl --request POST \
  --url https://api-message.nativehub.live/api/v1/webhooks/subscriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "https://api.example.com/webhooks/sms",
  "events": [
    "message.delivered",
    "message.failed"
  ],
  "secret": "whsec_abc123xyz789"
}
'
{
  "id": "c5d6e7f8-a9b0-1234-cd56-789012345678",
  "tenant_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
  "url": "https://api.example.com/webhooks/sms",
  "events": [
    "message.delivered",
    "message.failed"
  ],
  "secret": "whsec_abc123xyz789",
  "status": "active",
  "created_at": "2026-02-01T12:00:00Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
url
string<uri>
required
events
string[]
required
secret
string

Response

Webhook subscription created successfully

id
string<uuid>
tenant_id
string<uuid>
url
string<uri>
events
string[]
secret
string
status
string
created_at
string<date-time>