curl --request POST \
--url https://api.example.com/api/conversations/{route_name}/messages \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"external_user_id": "<string>",
"text": "<string>",
"attachments": [
{
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
}
],
"form": {},
"locale": "<string>",
"location": {
"latitude": 123,
"longitude": 123,
"address": "<string>",
"name": "<string>"
},
"params": {},
"wait_seconds": 1
}
'import requests
url = "https://api.example.com/api/conversations/{route_name}/messages"
payload = {
"external_user_id": "<string>",
"text": "<string>",
"attachments": [
{
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
}
],
"form": {},
"locale": "<string>",
"location": {
"latitude": 123,
"longitude": 123,
"address": "<string>",
"name": "<string>"
},
"params": {},
"wait_seconds": 1
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_user_id: '<string>',
text: '<string>',
attachments: [{url: '<string>', caption: '<string>', filename: '<string>'}],
form: {},
locale: '<string>',
location: {latitude: 123, longitude: 123, address: '<string>', name: '<string>'},
params: {},
wait_seconds: 1
})
};
fetch('https://api.example.com/api/conversations/{route_name}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/conversations/{route_name}/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'external_user_id' => '<string>',
'text' => '<string>',
'attachments' => [
[
'url' => '<string>',
'caption' => '<string>',
'filename' => '<string>'
]
],
'form' => [
],
'locale' => '<string>',
'location' => [
'latitude' => 123,
'longitude' => 123,
'address' => '<string>',
'name' => '<string>'
],
'params' => [
],
'wait_seconds' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/conversations/{route_name}/messages"
payload := strings.NewReader("{\n \"external_user_id\": \"<string>\",\n \"text\": \"<string>\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"caption\": \"<string>\",\n \"filename\": \"<string>\"\n }\n ],\n \"form\": {},\n \"locale\": \"<string>\",\n \"location\": {\n \"latitude\": 123,\n \"longitude\": 123,\n \"address\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"params\": {},\n \"wait_seconds\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/conversations/{route_name}/messages")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"external_user_id\": \"<string>\",\n \"text\": \"<string>\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"caption\": \"<string>\",\n \"filename\": \"<string>\"\n }\n ],\n \"form\": {},\n \"locale\": \"<string>\",\n \"location\": {\n \"latitude\": 123,\n \"longitude\": 123,\n \"address\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"params\": {},\n \"wait_seconds\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/conversations/{route_name}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_user_id\": \"<string>\",\n \"text\": \"<string>\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"caption\": \"<string>\",\n \"filename\": \"<string>\"\n }\n ],\n \"form\": {},\n \"locale\": \"<string>\",\n \"location\": {\n \"latitude\": 123,\n \"longitude\": 123,\n \"address\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"params\": {},\n \"wait_seconds\": 1\n}"
response = http.request(request)
puts response.read_body{
"data": {
"message_id": "<string>",
"thread_id": "<string>",
"answer": {
"message_id": "<string>",
"status": "answered",
"thread_id": "<string>",
"answer": "<string>",
"parts": [
{
"data": {
"options": {},
"values": {}
},
"footer": "<string>",
"header": {
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
},
"location": {
"latitude": 123,
"longitude": 123,
"address": "<string>",
"name": "<string>"
},
"media": [
{
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
}
],
"message": "",
"options": [
{
"text": "<string>",
"description": "<string>",
"id": "<string>",
"kind": "reply"
}
],
"pages": [
{
"fields": [
"<string>"
],
"title": "<string>"
}
],
"schema": {},
"sections": [
{
"rows": [
{
"text": "<string>",
"description": "<string>",
"id": "<string>",
"kind": "reply"
}
],
"title": "<string>"
}
],
"template": {
"language": "<string>",
"name": "<string>",
"body_parameters": [
"<string>"
],
"buttons": [
{
"payload": "<string>",
"kind": "quick_reply"
}
],
"header_media": {
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
}
}
}
]
}
}
}{
"data": {
"message_id": "<string>",
"thread_id": "<string>",
"answer": {
"message_id": "<string>",
"status": "answered",
"thread_id": "<string>",
"answer": "<string>",
"parts": [
{
"data": {
"options": {},
"values": {}
},
"footer": "<string>",
"header": {
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
},
"location": {
"latitude": 123,
"longitude": 123,
"address": "<string>",
"name": "<string>"
},
"media": [
{
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
}
],
"message": "",
"options": [
{
"text": "<string>",
"description": "<string>",
"id": "<string>",
"kind": "reply"
}
],
"pages": [
{
"fields": [
"<string>"
],
"title": "<string>"
}
],
"schema": {},
"sections": [
{
"rows": [
{
"text": "<string>",
"description": "<string>",
"id": "<string>",
"kind": "reply"
}
],
"title": "<string>"
}
],
"template": {
"language": "<string>",
"name": "<string>",
"body_parameters": [
"<string>"
],
"buttons": [
{
"payload": "<string>",
"kind": "quick_reply"
}
],
"header_media": {
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
}
}
}
]
}
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "reloading — the server is applying a config reload; retry shortly",
"reloading": true
}Send a message to a conversation route
Accept one authed message for route_name and run its turn AS the route’s
execution key.
The auth gate authorizes who may SEND; the turn’s own authority is the route’s
execution key, not the caller. Default answer is 202 {message_id, thread_id}; the
answer is then delivered later by signed callback when the route declares a
callback_url, and otherwise read back from the poll door
(GET .../messages/{message_id}). With a wait_seconds body field (clamped here to
sync_wait_max_seconds) a turn finishing in time answers 200 inline — an
answered/error turn with the answer, a silent turn with the silent marker (status
silent, no answer text) — and any callback (which otherwise carries
answered/error/silent) is suppressed the same way, so it never double-fires; a turn
still running when the wait elapses falls back to 202.
curl --request POST \
--url https://api.example.com/api/conversations/{route_name}/messages \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"external_user_id": "<string>",
"text": "<string>",
"attachments": [
{
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
}
],
"form": {},
"locale": "<string>",
"location": {
"latitude": 123,
"longitude": 123,
"address": "<string>",
"name": "<string>"
},
"params": {},
"wait_seconds": 1
}
'import requests
url = "https://api.example.com/api/conversations/{route_name}/messages"
payload = {
"external_user_id": "<string>",
"text": "<string>",
"attachments": [
{
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
}
],
"form": {},
"locale": "<string>",
"location": {
"latitude": 123,
"longitude": 123,
"address": "<string>",
"name": "<string>"
},
"params": {},
"wait_seconds": 1
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_user_id: '<string>',
text: '<string>',
attachments: [{url: '<string>', caption: '<string>', filename: '<string>'}],
form: {},
locale: '<string>',
location: {latitude: 123, longitude: 123, address: '<string>', name: '<string>'},
params: {},
wait_seconds: 1
})
};
fetch('https://api.example.com/api/conversations/{route_name}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/conversations/{route_name}/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'external_user_id' => '<string>',
'text' => '<string>',
'attachments' => [
[
'url' => '<string>',
'caption' => '<string>',
'filename' => '<string>'
]
],
'form' => [
],
'locale' => '<string>',
'location' => [
'latitude' => 123,
'longitude' => 123,
'address' => '<string>',
'name' => '<string>'
],
'params' => [
],
'wait_seconds' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/conversations/{route_name}/messages"
payload := strings.NewReader("{\n \"external_user_id\": \"<string>\",\n \"text\": \"<string>\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"caption\": \"<string>\",\n \"filename\": \"<string>\"\n }\n ],\n \"form\": {},\n \"locale\": \"<string>\",\n \"location\": {\n \"latitude\": 123,\n \"longitude\": 123,\n \"address\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"params\": {},\n \"wait_seconds\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/conversations/{route_name}/messages")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"external_user_id\": \"<string>\",\n \"text\": \"<string>\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"caption\": \"<string>\",\n \"filename\": \"<string>\"\n }\n ],\n \"form\": {},\n \"locale\": \"<string>\",\n \"location\": {\n \"latitude\": 123,\n \"longitude\": 123,\n \"address\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"params\": {},\n \"wait_seconds\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/conversations/{route_name}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_user_id\": \"<string>\",\n \"text\": \"<string>\",\n \"attachments\": [\n {\n \"url\": \"<string>\",\n \"caption\": \"<string>\",\n \"filename\": \"<string>\"\n }\n ],\n \"form\": {},\n \"locale\": \"<string>\",\n \"location\": {\n \"latitude\": 123,\n \"longitude\": 123,\n \"address\": \"<string>\",\n \"name\": \"<string>\"\n },\n \"params\": {},\n \"wait_seconds\": 1\n}"
response = http.request(request)
puts response.read_body{
"data": {
"message_id": "<string>",
"thread_id": "<string>",
"answer": {
"message_id": "<string>",
"status": "answered",
"thread_id": "<string>",
"answer": "<string>",
"parts": [
{
"data": {
"options": {},
"values": {}
},
"footer": "<string>",
"header": {
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
},
"location": {
"latitude": 123,
"longitude": 123,
"address": "<string>",
"name": "<string>"
},
"media": [
{
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
}
],
"message": "",
"options": [
{
"text": "<string>",
"description": "<string>",
"id": "<string>",
"kind": "reply"
}
],
"pages": [
{
"fields": [
"<string>"
],
"title": "<string>"
}
],
"schema": {},
"sections": [
{
"rows": [
{
"text": "<string>",
"description": "<string>",
"id": "<string>",
"kind": "reply"
}
],
"title": "<string>"
}
],
"template": {
"language": "<string>",
"name": "<string>",
"body_parameters": [
"<string>"
],
"buttons": [
{
"payload": "<string>",
"kind": "quick_reply"
}
],
"header_media": {
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
}
}
}
]
}
}
}{
"data": {
"message_id": "<string>",
"thread_id": "<string>",
"answer": {
"message_id": "<string>",
"status": "answered",
"thread_id": "<string>",
"answer": "<string>",
"parts": [
{
"data": {
"options": {},
"values": {}
},
"footer": "<string>",
"header": {
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
},
"location": {
"latitude": 123,
"longitude": 123,
"address": "<string>",
"name": "<string>"
},
"media": [
{
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
}
],
"message": "",
"options": [
{
"text": "<string>",
"description": "<string>",
"id": "<string>",
"kind": "reply"
}
],
"pages": [
{
"fields": [
"<string>"
],
"title": "<string>"
}
],
"schema": {},
"sections": [
{
"rows": [
{
"text": "<string>",
"description": "<string>",
"id": "<string>",
"kind": "reply"
}
],
"title": "<string>"
}
],
"template": {
"language": "<string>",
"name": "<string>",
"body_parameters": [
"<string>"
],
"buttons": [
{
"payload": "<string>",
"kind": "quick_reply"
}
],
"header_media": {
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
}
}
}
]
}
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "reloading — the server is applying a config reload; retry shortly",
"reloading": true
}Authorizations
Path Parameters
Body
The client-facing inbound body of the authed API door
POST /api/conversations/{route_name}/messages.
external_user_id is the caller's handle for the end user: it becomes the
client_address the answer is delivered against and the conversation's thread
key. Frozen.
11Structured media the caller sent WITH the text (image/document/video/audio) — the inbound counterpart of an outbound answer's media. Delivered to a tool target's payload under attachments only when present; the text stays the whole turn every reader consumes.
Show child attributes
Show child attributes
A structured participant submission (an ask-less form's answers) riding WITH the text. text stays required and non-blank — it is the CARRIER every reader consumes: a channel submits a faithful text form of the submission alongside the structured data, so a form-unaware consumer still sees the whole turn, and the attachments/location siblings ride the same pattern. The platform attaches no meaning and NO TRUST to the contents: participant-shaped data, never schema-conformant — a target that reads it validates it itself.
The end user's BCP 47 language tag (e.g. he-IL). Captured onto the turn's subject so the platform's rendering layer resolves every template and list format against it — the caller states the language, the flow never selects one. null means none supplied (no silent default).
A geographic point the caller shared WITH the text. Delivered to a tool target's payload under location only when present; the text stays the whole turn every reader consumes.
Show child attributes
Show child attributes
Opaque caller-supplied entry parameters delivered to a tool target's payload under params; the platform attaches no meaning and no trust.
Show child attributes
Show child attributes
Bounded sync-wait window (seconds); absent = async 202. The door clamps to its runtime cap.
x >= 0Response
Success.
The ack a message/event submission returns: the accepted turn's message_id
and its thread_id. answer is present on every inline-waited turn that finished
in time (a 200) — including a silent one, which carries the silent marker (status
silent, no answer text, dumped exclude_none); it is absent only on the default
deferred 202, whose turn produced no outcome yet.
Show child attributes
Show child attributes

