Endpoint ·
POST /conversation/actionsai_employee is optional — without it, it uses the one
assigned to the conversation. instructions is optional.
Fields
ai_employee—{ name }of the AI employee (optional; without it, uses the one assigned to the conversation).instructions— free text (optional).
actions array of a POST /conversation/actions — see Assembling an action list.
The run may leave a scheduled message behind. If the employee’s instructions or the conversation lead it to schedule itself, the conversation may end up with an active AI scheduled message. In an action list that affects the actions that follow: in a later
assign_ai_employee always send scheduled_message_action (otherwise it may fail with SCHEDULED_MESSAGE_ACTION_REQUIRED), and a later cancellation or unassign_ai cancels the follow-up the employee just promised the customer. The run may also cancel the pending scheduled message. If it cancels one your team scheduled, the conversation moves to pending so a person reschedules it; it also moves to pending if the employee decides to schedule in a conversation with no AI assigned and wrote to the customer in that run. This capability is being enabled gradually. A v2 employee (new engine) doesn’t decide to schedule or cancel in this run, but its powers can change the active scheduled message: handing off to a human cancels it if an AI employee was handling the conversation, and assigning to another employee cancels it or, if an AI employee was already handling the conversation and the business configured it that way, transfers it.Executable example
Arun_ai on a conversation identified by phone and channel. With ai_employee
it runs an explicit employee; without it, it runs the AI employee assigned to the
conversation. instructions is optional.
Request
Response
202 Accepted — the group was accepted and runs in the background. The
per-action result does not travel in the response (query it later — see How it runs).