curl -X POST "https://api.wadial.com/api/v1/sessions/{sessionId}/messages" \
-H "Authorization: Bearer $WADIAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-123-ready-v1" \
-d '{"to":"15551234567","content":{"type":"text","text":"Your order is ready."}}'
{
"data": {
"to": "15551234567",
"text": "Your order is ready.",
"contentType": "text",
"mediaUrl": null,
"status": "sent",
"messageId": "wamid..."
}
}
API Reference
Send message
Send a text message from a connected token.
POST
/
api
/
v1
/
sessions
/
{sessionId}
/
messages
curl -X POST "https://api.wadial.com/api/v1/sessions/{sessionId}/messages" \
-H "Authorization: Bearer $WADIAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-123-ready-v1" \
-d '{"to":"15551234567","content":{"type":"text","text":"Your order is ready."}}'
{
"data": {
"to": "15551234567",
"text": "Your order is ready.",
"contentType": "text",
"mediaUrl": null,
"status": "sent",
"messageId": "wamid..."
}
}
The token must be paired and
connected: true.
Use Idempotency-Key for retries so the same request does not send twice.
curl -X POST "https://api.wadial.com/api/v1/sessions/{sessionId}/messages" \
-H "Authorization: Bearer $WADIAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-123-ready-v1" \
-d '{"to":"15551234567","content":{"type":"text","text":"Your order is ready."}}'
{
"data": {
"to": "15551234567",
"text": "Your order is ready.",
"contentType": "text",
"mediaUrl": null,
"status": "sent",
"messageId": "wamid..."
}
}
Was this page helpful?
⌘I