Webhooks
Setup & Management
Register, test and manage your webhook endpoints from the API or the Dashboard.
This guide explains how to manage your webhook endpoints through the Tonder API: create, update, and manage endpoints to receive real-time notifications.
Security requirements: use a secure (HTTPS) URL, configure an authentication method (BEARER,
API_TOKEN, or BASIC_AUTH) to verify requests come from Tonder, and validate the event structure
and content before processing.
Step 1: create an endpoint
Register a new URL with the /webhooks/ endpoint. You can configure authentication to secure your
endpoint:
curl -X POST https://stage.tonder.io/api/v1/webhooks/ \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-site.com/webhook-handler",
"auth_method": "BEARER",
"credentials": {
"token": "a-secure-bearer-token-you-generate"
}
}'The response confirms the created endpoint:
{
"id": 123,
"url": "https://your-site.com/webhook-handler",
"status": "active",
"auth_method": "BEARER",
"credentials": {
"token": "a-secure-bearer-token-you-generate"
}
}| Field | Type | Description |
|---|---|---|
id | integer | Unique identifier for the endpoint. |
url | string | The URL you registered. |
status | string | Webhook status (active, inactive). |
auth_method | string | Authentication method (BEARER, API_TOKEN, BASIC_AUTH). |
credentials | object | Associated authentication credentials. |
Save the webhook id for management operations.
Step 2: manage webhooks
| Operation | Method | Endpoint | Purpose |
|---|---|---|---|
| List | GET | /webhooks/ | Retrieves all configured endpoints. |
| Update | PUT | /webhooks/{webhook_id}/ | Updates an endpoint's configuration. |
| Delete | DELETE | /webhooks/{webhook_id}/ | Removes an endpoint (it stops receiving notifications). |
curl -X GET https://stage.tonder.io/api/v1/webhooks/ \
-H "Authorization: Token YOUR_API_KEY"curl -X PUT https://stage.tonder.io/api/v1/webhooks/123/ \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://your-updated-site.com/webhook-handler" }'curl -X DELETE https://stage.tonder.io/api/v1/webhooks/123/ \
-H "Authorization: Token YOUR_API_KEY"Troubleshooting
- Authentication errors when creating webhooks: verify your credentials are correct and have permissions; test authentication locally before registering the webhook.
- Endpoint not receiving events after setup: verify it's publicly accessible via HTTPS and
responds with a
2xxwithin 30 seconds.
Next steps
Was this page helpful?
