Skip to main content
POST
Create or replace a conversation route

Authorizations

x-api-key
string
header
required

Path Parameters

route_name
string
required

Body

application/json

An api route: answers by signed callback to callback_url when set, else by the poll door.

door
string
required
Allowed value: "api"
execution_key
string
required

The api-key user_id the turn runs AS; its live stored grants authorize the agent run or tool dispatch and every tool call the turn makes.

Minimum string length: 1
route_name
string
required
Pattern: ^[a-z0-9-]+$
target_kind
enum<string>
required
Available options:
agent,
tool
target_name
string
required
Minimum string length: 1
callback_url
string | null
Pattern: ^[hH][tT][tT][pP][sS]://[^/?#@]+(?:[/?#]|$)
cancel_expr
TemplatedText · object | null

A renderable text: its source plus the parameters its render takes.

EXACTLY ONE source is set — content (the text inline) or id (the id of a stored resource holding the text); neither and both are refused at construction. kwargs are the render parameters for the TEXT and apply either way, so moving a text from inline to stored (or back) leaves its parameters untouched.

channel
null
extras_expr
TemplatedText · object | null

A renderable text: its source plus the parameters its render takes.

EXACTLY ONE source is set — content (the text inline) or id (the id of a stored resource holding the text); neither and both are refused at construction. kwargs are the render parameters for the TEXT and apply either way, so moving a text from inline to stored (or back) leaves its parameters untouched.

initial_mode
enum<string>
default:agent
Available options:
agent,
manual
locale
string | null
our_identity
null
overlap
OverlapPolicy · object

How a route treats a running turn and the newer participant messages that overlap it.

Governs participant MESSAGE turns on one thread only (origin="client", inbound_kind="message"); an event turn always runs as its own turn. Two knobs and a window:

  • running — what happens to the turn in flight when a newer message is accepted: continue leaves it running (one turn per message), cancel cancels it cooperatively in favour of the newer message.
  • deliver — what a turn carries: one exactly one message per turn, all every message accepted since the last turn started, in order, as one turn.
  • settle_seconds — a turn starts no earlier than this many seconds after its lead message was accepted, so a burst inside the window rides in one turn. 0 disables it.

The default policy (continue/one/0) runs one turn per message and leaves the payload unchanged. Frozen.

reply_expr
TemplatedText · object | null

A renderable text: its source plus the parameters its render takes.

EXACTLY ONE source is set — content (the text inline) or id (the id of a stored resource holding the text); neither and both are refused at construction. kwargs are the render parameters for the TEXT and apply either way, so moving a text from inline to stored (or back) leaves its parameters untouched.

reply_texts
ReplyTexts · object | null

The caller's words for the platform's fixed participant replies on one route. Frozen, strict keys.

error is sent when a turn fails and the target gave no reply; slow_down when an address is over the turn cap; pairing_linked when a pair code was redeemed and the two persons merged; pairing_unlinked when /unlink detached the address; pairing_not_linked when /unlink came from an address linked to nothing; pairing_code_invalid when a redeem was refused; pairing_code is the /link reply carrying the fresh code, a template that MUST reference {pairing_code} and may reference {expires_at} (the code's ISO-8601 expiry), with no conversion or format spec; pairing_link_unavailable when a redeem met a person being erased (its code is consumed, so the reply asks for a new one); pairing_unlink_unavailable when /unlink met the sender's person being erased; rejected_unsupported_type / rejected_too_large / rejected_could_not_receive are the notices for an inbound message the channel cannot bridge, a file over the cap, and a file the channel could not fetch. Every member but pairing_code is literal text: a { in it is drawn as written. Each is a :data:~tai42_contract.interactions.ReplyText in the line's language; absent, the built-in English reply is sent. An empty catalogue names nothing and is refused; an unknown key is refused.

resume_expr
TemplatedText · object | null

A renderable text: its source plus the parameters its render takes.

EXACTLY ONE source is set — content (the text inline) or id (the id of a stored resource holding the text); neither and both are refused at construction. kwargs are the render parameters for the TEXT and apply either way, so moving a text from inline to stored (or back) leaves its parameters untouched.

start_expr
TemplatedText · object | null

A renderable text: its source plus the parameters its render takes.

EXACTLY ONE source is set — content (the text inline) or id (the id of a stored resource holding the text); neither and both are refused at construction. kwargs are the render parameters for the TEXT and apply either way, so moving a text from inline to stored (or back) leaves its parameters untouched.

turns_per_hour_override
integer | null
Required range: x > 0

Response

Success.

data
ConversationRouteCreateResult · object
required

The created/replaced route.

callback_secret is the api-door callback signing secret surfaced ONCE (null for a channel route); route is the stored view with its secret stripped.