curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "text", "text": {"body": "Hello, how can I help?"}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "image", "media": {"mimeType": "image/png", "url": "https://example.com/photo.png", "caption": "Product photo"}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "video", "media": {"mimeType": "video/mp4", "url": "https://example.com/video.mp4", "caption": "Tutorial video"}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "audio", "media": {"mimeType": "audio/ogg", "url": "https://example.com/audio.ogg", "caption": "Voice message"}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "document", "media": {"mimeType": "application/pdf", "url": "https://example.com/contract.pdf", "caption": "Contract"}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "sticker", "media": {"mimeType": "image/webp", "url": "https://example.com/sticker.webp"}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "interactive", "interactive": {"type": "button_reply", "button_reply": {"id": "btn_support", "title": "Support"}}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "interactive", "interactive": {"type": "list_reply", "list_reply": {"id": "row_pricing", "title": "Plans & Pricing"}}}'
{
"messageId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "queued"
}
Sessions
Send Message
Send a message into an active session.
POST
/
v1
/
sessions
/
{sessionId}
/
message
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "text", "text": {"body": "Hello, how can I help?"}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "image", "media": {"mimeType": "image/png", "url": "https://example.com/photo.png", "caption": "Product photo"}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "video", "media": {"mimeType": "video/mp4", "url": "https://example.com/video.mp4", "caption": "Tutorial video"}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "audio", "media": {"mimeType": "audio/ogg", "url": "https://example.com/audio.ogg", "caption": "Voice message"}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "document", "media": {"mimeType": "application/pdf", "url": "https://example.com/contract.pdf", "caption": "Contract"}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "sticker", "media": {"mimeType": "image/webp", "url": "https://example.com/sticker.webp"}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "interactive", "interactive": {"type": "button_reply", "button_reply": {"id": "btn_support", "title": "Support"}}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "interactive", "interactive": {"type": "list_reply", "list_reply": {"id": "row_pricing", "title": "Plans & Pricing"}}}'
{
"messageId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "queued"
}
Send a message into an active session. The flow engine processes the message, advances to the next node, and delivers the response to the callback URL.
Your API key (prefixed with
wh_).The UUID of the active session.
Body
Message type:
text, interactive, image, video, audio, document, or sticker.Text payload. Send when
type is text.Show Fields
Show Fields
The text content of the message.
Interactive payload. Send when
type is interactive.Show Fields
Show Fields
Interaction type:
button_reply or list_reply.Payload examples
- Text
- Image
- Video
- Audio
- Document
- Sticker
- Button
- List
{
"type": "text",
"text": {
"body": "Hello, how can I help?"
}
}
{
"type": "image",
"media": {
"mimeType": "image/png",
"url": "https://example.com/photo.png",
"caption": "Product photo"
}
}
{
"type": "video",
"media": {
"mimeType": "video/mp4",
"url": "https://example.com/video.mp4",
"caption": "Tutorial video"
}
}
{
"type": "audio",
"media": {
"mimeType": "audio/ogg",
"url": "https://example.com/audio.ogg",
"caption": "Voice message"
}
}
{
"type": "document",
"media": {
"mimeType": "application/pdf",
"url": "https://example.com/contract.pdf",
"caption": "Contract"
}
}
{
"type": "sticker",
"media": {
"mimeType": "image/webp",
"url": "https://example.com/sticker.webp"
}
}
{
"type": "interactive",
"interactive": {
"type": "button_reply",
"button_reply": {
"id": "btn_support",
"title": "Support"
}
}
}
{
"type": "interactive",
"interactive": {
"type": "list_reply",
"list_reply": {
"id": "row_pricing",
"title": "Plans & Pricing"
}
}
}
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "text", "text": {"body": "Hello, how can I help?"}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "image", "media": {"mimeType": "image/png", "url": "https://example.com/photo.png", "caption": "Product photo"}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "video", "media": {"mimeType": "video/mp4", "url": "https://example.com/video.mp4", "caption": "Tutorial video"}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "audio", "media": {"mimeType": "audio/ogg", "url": "https://example.com/audio.ogg", "caption": "Voice message"}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "document", "media": {"mimeType": "application/pdf", "url": "https://example.com/contract.pdf", "caption": "Contract"}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "sticker", "media": {"mimeType": "image/webp", "url": "https://example.com/sticker.webp"}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "interactive", "interactive": {"type": "button_reply", "button_reply": {"id": "btn_support", "title": "Support"}}}'
curl -X POST https://api.whatabot.app/api/v1/sessions/{sessionId}/message \
-H "X-Api-Key: wh_your_api_key" \
-H "Content-Type: application/json" \
-d '{"type": "interactive", "interactive": {"type": "list_reply", "list_reply": {"id": "row_pricing", "title": "Plans & Pricing"}}}'
{
"messageId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "queued"
}
⌘I