Webhooks & support endpoints
Endpoints for delivery webhooks and support tickets, including real-time WebSocket chat.
/v1/webhooksList delivery webhook targets.
No request body.
[
{
"id": "wh_123",
"url": "https://example.com/webhook",
"active": true
}
]/v1/webhooksCreate a webhook target. Event types: sms.delivery, sms.inbound, whatsapp.inbound, whatsapp.consent, otp.status, whatsapp.status. Failed deliveries retry automatically with exponential backoff (5xx, 429, timeouts).
| Name | Type | Description | Required |
|---|---|---|---|
url | string | HTTPS endpoint. | Yes |
secret | string | Optional signing secret. | No |
events | string[] | Optional event filters. Defaults to sms.delivery only. | No |
- whatsapp.inbound - user replies, including Yes/No consent button replies.
- whatsapp.consent - session opened, declined, or failed (for example insufficient credits).
- otp.status - OTP delivery status updates for WhatsApp messages.
- whatsapp.status - outbound WhatsApp message delivery receipts.
- sms.delivery and sms.inbound - SMS delivery and inbound MO messages.
{
"url": "https://example.com/webhook",
"secret": "shared-secret",
"events": [
"whatsapp.inbound",
"whatsapp.consent",
"otp.status",
"whatsapp.status",
"sms.delivery"
]
}{
"id": "wh_123",
"events": [
"whatsapp.inbound",
"whatsapp.consent",
"otp.status",
"whatsapp.status",
"sms.delivery"
],
"active": true
}/v1/support/ticketsList support tickets.
No request body.
[
{
"id": "ticket_123",
"subject": "Cannot send SMS",
"status": "open"
}
]/v1/support/ticketsCreate a support ticket.
| Name | Type | Description | Required |
|---|---|---|---|
subject | string | Ticket subject. | Yes |
category | string | Issue category. | Yes |
priority | string | low, normal, high. | Yes |
message | string | Initial message. | Yes |
{
"subject": "Cannot send SMS",
"category": "delivery",
"priority": "high",
"message": "Messages fail."
}{
"id": "ticket_123",
"status": "open"
}/v1/support/tickets/{ticket_id}/messagesList the messages in a support ticket.
No request body.
[
{
"id": "msg_123",
"sender_type": "user",
"message": "Can you help?",
"created_at": "2026-05-14T12:00:00Z"
}
]/v1/support/tickets/{ticket_id}/messagesSend a support ticket reply over HTTP. The real-time chat uses the WebSocket endpoint below when available.
| Name | Type | Description | Required |
|---|---|---|---|
message | string | Reply body. | Yes |
{
"message": "Can you check my account?"
}{
"id": "msg_124",
"sender_type": "user",
"message": "Can you check my account?"
}/v1/support/tickets/{ticket_id}/filesUpload a PDF or image attachment into the support chat. Multipart form data only, maximum 10 MB.
| Name | Type | Description | Required |
|---|---|---|---|
message | string | Optional message body. | No |
file | file | PDF, JPG, PNG, GIF, or WEBP. | Yes |
{
"message": "Invoice attached",
"file": "invoice.pdf"
}{
"id": "msg_127",
"sender_type": "user",
"message": "Invoice attached",
"attachments": [
{
"filename": "invoice.pdf",
"content_type": "application/pdf"
}
]
}/v1/support-ticket-files/{file_id}Download a support chat attachment owned by the connected user.
No request body.
"Binary file stream"
/v1/support/tickets/{ticket_id}/ws?token={portal_token}Open a real-time WebSocket chat for the connected user's ticket. Send JSON with a message field.
| Name | Type | Description | Required |
|---|---|---|---|
message | string | Message sent by the user over the socket. | Yes |
{
"message": "Hello support"
}{
"type": "message",
"ticket_id": "ticket_123",
"message": {
"id": "msg_125",
"sender_type": "user",
"message": "Hello support"
}
}/v1/admin/support/tickets/{ticket_id}/ws?token={admin_token}Open the admin side of the real-time support chat.
| Name | Type | Description | Required |
|---|---|---|---|
message | string | Message sent by the admin over the socket. | Yes |
{
"message": "We are checking this now."
}{
"type": "message",
"ticket_id": "ticket_123",
"message": {
"id": "msg_126",
"sender_type": "admin",
"message": "We are checking this now."
}
}/v1/admin/support/tickets/{ticket_id}/filesUpload a PDF or image attachment from the admin side of the chat.
| Name | Type | Description | Required |
|---|---|---|---|
message | string | Optional message body. | No |
file | file | PDF, JPG, PNG, GIF, or WEBP. | Yes |
{
"message": "Receipt attached",
"file": "receipt.png"
}{
"id": "msg_128",
"sender_type": "admin",
"message": "Receipt attached",
"attachments": [
{
"filename": "receipt.png",
"content_type": "image/png"
}
]
}/v1/admin/support-ticket-files/{file_id}Download a support chat attachment from the admin console.
No request body.
"Binary file stream"