Channels
Create a route
action is required; agent_id is required when it is agent, text when it is message; repeat is only valid alongside action: message. surface, when present, must be one this channel's kind serves (GET /v1/channel-kinds) — otherwise 400 unknown_surface. match keys must be predicates that kind's registry declares — otherwise 400 unknown_predicate. Writing a route for a surface whose transport mode is off (e.g. a Discord guild_thread route before mention_threads is enabled) still succeeds, with unreachable_surface in the response warnings.
post/v1/projects/{project_id}/channels/{channel_id}/routes
Request
- Base URL: https://api.naturali.ai
- URL: https://api.naturali.ai/v1/projects/{project_id}/channels/{channel_id}/routes
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://api.naturali.ai/authorize, token URL https://api.naturali.ai/token, scopes: mcp:access)
Request body
Example request
{
"surface": "guild_thread",
"match": {
"guild_id": "9988776655"
},
"action": "agent",
"agent_id": "agent_V1StGXR8Z5jdHi6B",
"text": "Subscribe at https://example.com/pricing",
"language": "en-US"
}Response
Route created.
Example response
{
"action": "agent",
"agent_id": "agent_V1StGXR8Z5jdHi6B",
"text": "Subscribe at https://example.com/pricing",
"language": "en-US",
"config": {
"media": {
"audio": "transcribe"
},
"discord": {
"allowed_role_ids": [
"1290000000000000042"
]
}
},
"id": "route_V1StGXR8Z5jdHi6B",
"project_id": "proj_V1StGXR8Z5jdHi6B",
"channel_id": "chan_V1StGXR8Z5jdHi6B",
"surface": "guild_thread",
"match": {
"guild_id": "9988776655"
},
"status": "active"
}Changes
No recorded changes to this operation across all 1 revision of this API.