Skip to main content
POST
Create procedure

Headers

x-api-key
string | null

Your API key for programmatic access. Send it in the x-api-key header; you can create and manage keys from the Developers page.

Path Parameters

agent_id
string
required

Agent ID to get the procedure draft from

Example:

"agent_3701k3ttaq12ewp8b7qv5rfyszkz"

branch_id
string
required

Branch ID to get the procedure draft from

Example:

"agtbranch_0901k4aafjxxfxt93gd841r7tv5t"

Body

application/json
name
string
default:""

Procedure name

Maximum string length: 200
content
string
default:""

Initial procedure content

type
enum<string>
default:free_form

Procedure type

Available options:
free_form,
deterministic,
folder
trigger
string | null

When the agent should use this procedure. Empty string means this is a sub-procedure that should only start when another procedure references it. If omitted or null, the trigger is derived from the content instead. Also accepts description as an alias.

folder_parent_id
string | null

Procedure ID of the folder to create this procedure in, or null for root.

Response

Successful Response

procedure_id
string
required

ID of the created procedure