curl -X POST "https://api.wadial.com/api/v1/sessions/{sessionId}/messages/image" \
-H "Authorization: Bearer $WADIAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-123-image-v1" \
-d '{"to":"15551234567","content":{"type":"image","mediaUrl":"https://example.com/receipt.jpg","mimetype":"image/jpeg","caption":"Receipt copy"}}'
{
"data": {
"to": "15551234567",
"contentType": "image",
"mediaUrl": "https://example.com/receipt.jpg",
"caption": "Receipt copy",
"status": "sent"
}
}
API Reference
Send image
Send an image message from a connected token.
POST
/
api
/
v1
/
sessions
/
{sessionId}
/
messages
/
image
curl -X POST "https://api.wadial.com/api/v1/sessions/{sessionId}/messages/image" \
-H "Authorization: Bearer $WADIAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-123-image-v1" \
-d '{"to":"15551234567","content":{"type":"image","mediaUrl":"https://example.com/receipt.jpg","mimetype":"image/jpeg","caption":"Receipt copy"}}'
{
"data": {
"to": "15551234567",
"contentType": "image",
"mediaUrl": "https://example.com/receipt.jpg",
"caption": "Receipt copy",
"status": "sent"
}
}
The token must be paired and
connected: true.
Use Idempotency-Key when retrying the same send.
curl -X POST "https://api.wadial.com/api/v1/sessions/{sessionId}/messages/image" \
-H "Authorization: Bearer $WADIAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-123-image-v1" \
-d '{"to":"15551234567","content":{"type":"image","mediaUrl":"https://example.com/receipt.jpg","mimetype":"image/jpeg","caption":"Receipt copy"}}'
{
"data": {
"to": "15551234567",
"contentType": "image",
"mediaUrl": "https://example.com/receipt.jpg",
"caption": "Receipt copy",
"status": "sent"
}
}
Was this page helpful?
⌘I