curl --request POST \
--url https://api.example.com/api/conversations/{route_name}/thread/messages \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"text": "<string>",
"thread_id": "<string>",
"address": "<string>",
"footer": "<string>",
"header": {},
"location": {},
"media": [
{}
],
"options": [
{}
],
"schema": {},
"sections": [
{}
],
"template": {}
}
'import requests
url = "https://api.example.com/api/conversations/{route_name}/thread/messages"
payload = {
"text": "<string>",
"thread_id": "<string>",
"address": "<string>",
"footer": "<string>",
"header": {},
"location": {},
"media": [{}],
"options": [{}],
"schema": {},
"sections": [{}],
"template": {}
}
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({
text: '<string>',
thread_id: '<string>',
address: '<string>',
footer: '<string>',
header: {},
location: {},
media: [{}],
options: [{}],
schema: {},
sections: [{}],
template: {}
})
};
fetch('https://api.example.com/api/conversations/{route_name}/thread/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}/thread/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([
'text' => '<string>',
'thread_id' => '<string>',
'address' => '<string>',
'footer' => '<string>',
'header' => [
],
'location' => [
],
'media' => [
[
]
],
'options' => [
[
]
],
'schema' => [
],
'sections' => [
[
]
],
'template' => [
]
]),
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}/thread/messages"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"thread_id\": \"<string>\",\n \"address\": \"<string>\",\n \"footer\": \"<string>\",\n \"header\": {},\n \"location\": {},\n \"media\": [\n {}\n ],\n \"options\": [\n {}\n ],\n \"schema\": {},\n \"sections\": [\n {}\n ],\n \"template\": {}\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}/thread/messages")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"thread_id\": \"<string>\",\n \"address\": \"<string>\",\n \"footer\": \"<string>\",\n \"header\": {},\n \"location\": {},\n \"media\": [\n {}\n ],\n \"options\": [\n {}\n ],\n \"schema\": {},\n \"sections\": [\n {}\n ],\n \"template\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/conversations/{route_name}/thread/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 \"text\": \"<string>\",\n \"thread_id\": \"<string>\",\n \"address\": \"<string>\",\n \"footer\": \"<string>\",\n \"header\": {},\n \"location\": {},\n \"media\": [\n {}\n ],\n \"options\": [\n {}\n ],\n \"schema\": {},\n \"sections\": [\n {}\n ],\n \"template\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"message_id": "<string>",
"thread_id": "<string>"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Send an operator message into a conversation thread
Send a message BY HAND into thread_id on route_name as the route identity, and
return {"message_id", "thread_id"}. No turn runs: the message is stored already
answered and delivered through the same machine a produced answer takes.
media (a list of {"kind", "url", "caption"?, "filename"?} display items),
location (a shared map pin {"latitude", "longitude", "name"?, "address"?}),
template (a pre-approved {"name", "language", "header_media"?, "body_parameters"?, "buttons"?} out-of-window template), options (a list of FLAT tappable option objects —
each a {"kind": "reply", "text"} reply or a {"kind": "link", "label", "url"} link
action), sections (the SECTIONED tappable-options alternative — titled groups of reply
rows), header/footer (a media header / trailing line composing an interactive
message) and schema (an ask-less form’s
answer schema — the channel renders text as the form’s prompt, and the participant’s
submission enters the conversation as an ordinary inbound message) are OPTIONAL
richer-send forms — FULL parity with the flow answer path’s AnswerPart vocabulary —
delivered ALONGSIDE text — the message is then stored and delivered as one rich
part, exactly as a produced rich answer is, including the delivery machine’s capability
gate (a channel that does not advertise the matching supports_*_notifications flag
never receives the part; the record fails loudly instead of the field dropping). A
contract-invalid value (an empty list/dict, an over-cap value, or a combination the shared
composition matrix refuses — options XOR sections, schema excludes both,
header/footer require a choice surface, template standalone) is a loud 400;
omit them all for a plain text send.
Allowed in either mode and it never flips the mode. Blank text is a loud 400, and a
present-but-blank address is a 400. The thread-belongs-to-route guard is the thread
delete’s: a route-keyed id must carry the route’s bridge:{route_name}: prefix (400
otherwise), a person thread must be on the named route (404 otherwise). address picks
the send target on a LINKED person’s aggregated thread — it must be one of the person’s
addresses (400 otherwise); with no address the target is the thread’s newest record,
and an empty person thread with no address is a 400. For an agent target that holds
thread memory the message is appended to the thread’s checkpoint as an assistant reply
BEFORE the record is created; an append that fails is a loud 500 and no record is created.
The send takes the thread’s per-thread FIFO, so it waits behind an in-flight turn and
never interleaves it; a full queue is a loud, retriable 503. As a live-caller sync door the
wait to acquire the slot is bounded by sync_door_wait_seconds: a wait past it — behind a
turn possibly HITL-paused on another worker — is the loud, retriable 503 ThreadBusyError
rather than a block past the proxy timeout.
Caller authority is the door’s grantable write action — the same write grant that
forgets threads — and the record names the calling operator. An unauthenticated caller
(access control disabled or unbound) is a loud 501, since an operator action must be
attributable.
curl --request POST \
--url https://api.example.com/api/conversations/{route_name}/thread/messages \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"text": "<string>",
"thread_id": "<string>",
"address": "<string>",
"footer": "<string>",
"header": {},
"location": {},
"media": [
{}
],
"options": [
{}
],
"schema": {},
"sections": [
{}
],
"template": {}
}
'import requests
url = "https://api.example.com/api/conversations/{route_name}/thread/messages"
payload = {
"text": "<string>",
"thread_id": "<string>",
"address": "<string>",
"footer": "<string>",
"header": {},
"location": {},
"media": [{}],
"options": [{}],
"schema": {},
"sections": [{}],
"template": {}
}
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({
text: '<string>',
thread_id: '<string>',
address: '<string>',
footer: '<string>',
header: {},
location: {},
media: [{}],
options: [{}],
schema: {},
sections: [{}],
template: {}
})
};
fetch('https://api.example.com/api/conversations/{route_name}/thread/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}/thread/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([
'text' => '<string>',
'thread_id' => '<string>',
'address' => '<string>',
'footer' => '<string>',
'header' => [
],
'location' => [
],
'media' => [
[
]
],
'options' => [
[
]
],
'schema' => [
],
'sections' => [
[
]
],
'template' => [
]
]),
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}/thread/messages"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"thread_id\": \"<string>\",\n \"address\": \"<string>\",\n \"footer\": \"<string>\",\n \"header\": {},\n \"location\": {},\n \"media\": [\n {}\n ],\n \"options\": [\n {}\n ],\n \"schema\": {},\n \"sections\": [\n {}\n ],\n \"template\": {}\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}/thread/messages")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"thread_id\": \"<string>\",\n \"address\": \"<string>\",\n \"footer\": \"<string>\",\n \"header\": {},\n \"location\": {},\n \"media\": [\n {}\n ],\n \"options\": [\n {}\n ],\n \"schema\": {},\n \"sections\": [\n {}\n ],\n \"template\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/conversations/{route_name}/thread/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 \"text\": \"<string>\",\n \"thread_id\": \"<string>\",\n \"address\": \"<string>\",\n \"footer\": \"<string>\",\n \"header\": {},\n \"location\": {},\n \"media\": [\n {}\n ],\n \"options\": [\n {}\n ],\n \"schema\": {},\n \"sections\": [\n {}\n ],\n \"template\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"message_id": "<string>",
"thread_id": "<string>"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
Path Parameters
Body
The operator-send door's JSON body. thread_id and text are required and hold at
least one non-whitespace character; the remaining fields are optional richer-send forms
delivered alongside text. The schema attribute is suffixed to avoid shadowing a
BaseModel member; the wire key stays schema via the alias.
Spec metadata only — the door parses this body at the HTTP edge.
The message text to send.
1\SThe thread to send into, as the send door returned it.
1\SOn a linked person's aggregated thread, the person address to target; omitted, the target is the thread's newest record.
A trailing line composing an interactive message.
A media header composing an interactive message.
Show child attributes
Show child attributes
A shared map pin {latitude, longitude, name?, address?}.
Show child attributes
Show child attributes
Display media items delivered alongside the text.
Show child attributes
Show child attributes
Flat tappable option objects — reply or link actions.
Show child attributes
Show child attributes
An ask-less form's answer schema; the channel renders text as the prompt.
Show child attributes
Show child attributes
Titled groups of tappable reply rows — the sectioned options alternative.
Show child attributes
Show child attributes
A pre-approved out-of-window template to deliver.
Show child attributes
Show child attributes
Response
Success.
The stored id of an operator message sent by hand into a thread.
Show child attributes
Show child attributes

