Start the routine from a message in a connected chat [write]
Changed onA message starts a run when it is on the connection, in thread_id when one is given, and starts with text_prefix when one is given (leading mentions of the bot and letter case are ignored). Only messages from the person the routine belongs to start a run: the person who connected the chat, or a chat identity they linked to the same account. Anyone else's message is routed as if there were no trigger. The text after the prefix is added to the run's first message under the label "Input for this run:". The run is a task of the routine's creator (trigger_context {type:"channel", connection_id, thread_id}), and when its turn ends its last message is posted, once, in the conversation the message came from, with a link to the run. A message that started a run is sent nowhere else. One message starts at most one run; when several routines match, the one naming a thread and then the longest prefix wins. A paused or archived routine starts nothing, and more than 30 runs of one routine in a minute are dropped. Only the routine's creator can set the trigger (403 otherwise), on a connected chat of their own in this workspace (404 otherwise). thread_id must be a conversation on that connection and text_prefix 1 to 200 characters (400 otherwise). Setting a trigger replaces the earlier one. An archived routine answers 409.
Request
- Base URLhttps://api.agentsky.dev/v1
- URLhttps://api.agentsky.dev/v1/routines/{id}/channel-trigger
- AuthHTTP bearer
Path parameters
The routine id (rtn_…)
Request body
Response
OK
Changes
- info
endpoint added
- info