Webhooks
Create or update the webhook endpoint
PUT
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.
apiKeyAuthheader
X-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.
- body
url*stringFormat
uriLength
1 <= length <= 500events?array<>Event types to receive. Empty or omitted means all of them.
application/json- response
object*stringurl*stringFormat
urievents*array<string>secret_hint*stringThe last 4 characters of the signing secret, to tell secrets apart.
created_at*stringFormat
date-timeupdated_at*stringFormat
date-timeExample 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"}