SSoftLinkSMSDocs
Webhooks

Create or update the webhook endpoint

PUT
/api/v1/webhook-endpoint

Sets where events are POSTed. The URL must be https:// on port 443 and resolve to a public address. Creating the endpoint returns its signing secret once; updating keeps the existing secret. events limits what you receive; omit it for every event.

Authorization

apiKeyAuth
headerX-Api-Key<token>

Your API key, sent as X-Api-Key. Format bsk_<key_id>.<secret>. Create one in the dashboard under Settings → Developer tools.

Request Body

  1. body
url*string
Formaturi
Length1 <= length <= 500
events?array<>

Event types to receive. Empty or omitted means all of them.

Response Body

application/json
  1. response
object*string
url*string
Formaturi
events*array<string>
secret_hint*string

The last 4 characters of the signing secret, to tell secrets apart.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X PUT 'https://api.softlinksms.co.ke/api/v1/webhook-endpoint' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://example.com/webhooks/softlinksms",  "events": [    "sms.delivered",    "sms.failed"  ]}'
Example Response
{  "object": "string",  "url": "http://example.com",  "events": [    "string"  ],  "secret_hint": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}