Skip to main content
PATCH
Update a procedure

Authorizations

Authorization
string
header
required

API key from your account settings

Path Parameters

agentId
string
required

The agent ID

Minimum string length: 1
Example:

"5QHA6VB-DIAbBhxwqxfdi"

procedureId
string<uuid>
required

The procedure ID

Example:

"b1d47c2e-5a3f-4e8b-9c1d-2f6a7b8c9d0e"

Body

application/json
name
string

New name: 1 to 100 characters, no line breaks, unique within the agent

Required string length: 1 - 100
Pattern: ^[^\n\r]+$
Example:

"Refund request"

trigger
string

When the agent should start the procedure, up to 500 characters

Required string length: 1 - 500
Example:

"The customer wants their money back"

steps
object[]

Replaces all steps, so send the full list in order, including unchanged steps. An instruction step is one line; in it @ plus an action name in lowercase, with - written as _, mentions that action (Order-Issue becomes @order_issue), and {{variable}} inserts one of the agent's variables. A branch step runs the instructions of its first matching condition (1 to 5), or else otherwise; a branch cannot contain another branch. Up to 15 instruction steps in total, counting those inside branches.

Minimum array length: 1
status
enum<string>

Turns the procedure on or off

Available options:
enabled,
disabled

Response

The updated procedure

id
string
required

Procedure ID

name
string
required

Procedure name, unique within the agent

status
enum<string>
required

Whether the agent can run the procedure.

Available options:
enabled,
disabled
trigger
string
required

When the agent should start the procedure

Example:

"The customer asks for a refund"

unavailableActions
string[]
required

Action mentions in the steps, such as @refund_payment, whose action is missing or disabled. While any is listed, the agent skips the procedure. It also skips the procedure on a channel where a mentioned action is switched off.

Example:
steps
object[]
required

The steps in order.