Webhooks

Subscribe to real-time event notifications. Txtly will send an HTTPS POST to your endpoint whenever an event occurs.

Create a webhook

POST
/v1/webhooks

Register a new webhook endpoint.

Request body

ParameterTypeDescription
endpoint_urlrequiredstringHTTPS URL to receive webhook deliveries.
eventsrequiredstring[]Event types to subscribe to (e.g. email.delivered, email.bounced).
cURL
curl -X POST https://api.txtly.com.au/v1/webhooks \
  -H "Authorization: Bearer tx_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoint_url": "https://yourapp.com/webhooks/txtly",
    "events": ["email.delivered", "email.bounced", "email.complained"]
  }'
Response — 201 Created
{
  "id": "wh_abc123",
  "endpoint_url": "https://yourapp.com/webhooks/txtly",
  "events": ["email.delivered", "email.bounced", "email.complained"],
  "signing_secret": "whsec_a1b2c3d4e5f6...",
  "status": "active",
  "created_at": "2026-03-21T00:00:00Z"
}

List webhooks

GET
/v1/webhooks

List all webhooks for the current team.

Get a webhook

GET
/v1/webhooks/{id}

Retrieve a webhook by ID.

Update a webhook

PATCH
/v1/webhooks/{id}

Update the endpoint URL or subscribed events.

Delete a webhook

DELETE
/v1/webhooks/{id}

Remove a webhook subscription.

Signature verification

Every webhook delivery includes a txtly-signature header containing an HMAC-SHA256 signature. Verify this against your signing secret to ensure the payload is authentic. See the Webhook Events guide for implementation details.

Retry schedule

If your endpoint returns a non-2xx status code, Txtly will retry delivery with the following schedule: 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours (6 retries total). After all retries are exhausted, the delivery is marked as failed.