Skip to main content
POST

Code Examples

Headers

integer
required
Workspace ID. Required as of 2026-09-01. Until then, if omitted, the user’s selected workspace is used (deprecated). After the cutoff, a missing header returns 422.

Path Parameters

Request Body

How to use memories in an executionTo inject memory context into an agent, pass Memory Collection IDs in the memory_collections field. The full flow is:
  1. Create a CollectionPOST /api/memory-collections — and save the returned id.
  2. Create MemoriesPOST /api/memories — passing collection_id and the memory text in the memory field.
  3. Execute the Agent — include "memory_collections": [collection_id] in the request body.
The agent will automatically use the relevant memories to contextualize the response.See the full guide at Memories.

Messages Roles (Chat Type Templates)

For chat type templates, the messages array supports the following roles: Important rules:
  • Messages must alternate between user and assistant roles (after the optional developer message).
  • The developer role can only appear as the first message in the array and will be extracted before processing the rest.
  • If two consecutive messages have the same role (e.g., two user messages), the API will return a validation error: “Chat messages must be a pair of user/assistant”.
  • The system role is not supported and will cause an error.
Example with developer message:
Example without developer message:
Get more details of which options are accepted by this Agent requesting this endpoint: Get Agent

Response

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-workspace-id
integer
required

Workspace ID. Required as of 2026-09-01. Until then, if omitted, the user's selected workspace is used (deprecated). After the cutoff, a missing header returns 422.

Path Parameters

id
integer
required

The agent ID.

Body

application/json

Send a JSON object. Known fields are supported, and you can add custom fields directly at the root (for example: department, reporting_period, include_risks).

Free-form JSON object. Send known fields and any custom agent fields directly at the root level.

Response

200

Execution started (or completed if waitExecution: true).