Documentation Index
Fetch the complete documentation index at: https://docs.tuco.ai/llms.txt
Use this file to discover all available pages before exploring further.
What are webhooks?
Webhooks push real-time event notifications to URLs you control. Instead of polling the API, your systems receive aPOST request the moment something happens — a message sends, fails, gets a reply, or is read.
How it works
Register a webhook
Call Create Webhook with your endpoint URL and the events you care about. Save the signing secret from the response — it’s shown once.
Receive events
Tuco sends a signed
POST to your URL whenever a subscribed event fires. Verify the X-Tuco-Signature header using your secret.Available events
| Event | Fired when |
|---|---|
message.sent | Message accepted and sent by Tuco |
message.failed | Message failed after all retries (technical error) |
message.fallback | Recipient doesn’t have iMessage (business outcome, not error) |
message.reply | Lead or contact replied to your message |
message.opened | Message was read (read receipt, where supported) |
Management API
Full CRUD for webhook registrations. All endpoints require Bearer token auth.List Webhooks
GET /api/webhooks — See all webhooks in your workspaceCreate Webhook
POST /api/webhooks — Register a new endpointGet Webhook
GET /api/webhooks/{id} — Get details for one webhookUpdate Webhook
PATCH /api/webhooks/{id} — Change URL, events, or statusDelete Webhook
DELETE /api/webhooks/{id} — Remove a webhook permanentlyTest Webhook
POST /api/webhooks/{id}/health-check — Fire a test pingSecurity
Every webhookPOST includes three headers for verification:
| Header | Purpose |
|---|---|
X-Tuco-Signature | HMAC-SHA256 hex digest of the request body, signed with your webhook secret |
X-Tuco-Event | Event type (e.g. message.sent) |
X-Tuco-Timestamp | When the webhook was fired (ISO UTC) |
X-Tuco-Signature before processing. See signature verification code examples in the Message Webhooks page.
Delivery behavior
Webhooks are fire-and-forget. Tuco sends each event once and does not retry on failure. Make sure your endpoint is reliable and returns
2xx quickly.- Parallel delivery — if you have multiple webhooks subscribed to the same event, all receive the POST simultaneously
- 10-second timeout — if your endpoint doesn’t respond within 10 seconds, the delivery is marked as failed
- No retry — failed deliveries are logged but not retried. Use the Test Webhook endpoint to verify your setup
- Failure tracking —
failureCount,lastSuccessAt, andlastFailureAton the webhook object let you monitor health