v1Stable
A task represents a conversation thread with an Apollo-1 agent. Create a task before sending messages, and use the task ID to scope all interactions within that thread.
Create a Task
Creates a new conversation thread and returns a welcome message from the agent.cURL
POST /v1/messaging/tasks
Base URL: https://api.aui.io
Headers
| Header | Required | Description |
|---|---|---|
x-aui-api-key | Yes | Your API key |
x-aui-organization-id | Yes | Organization identifier |
x-aui-account-id | Yes | Account identifier |
Content-Type | Yes | Must be application/json |
Request Body
The agent management ID. Apollo resolves the network and active version from this.
Unique identifier for the user starting the conversation.
Origin of the conversation. Common values:
web-widget, api, third-party.Pin the thread to a specific draft version. If omitted, uses the agent’s active version.
Pin the thread to a specific revision tag (e.g.,
v8.14).Response
Unique task identifier. Use this as
task_id when sending messages.The user identifier provided in the request.
Auto-generated task title.
The agent’s initial greeting message.
AI-generated conversation starter suggestions.
Code Examples
Get Task Trace
Retrieve the complete reasoning trace for all interactions in a task.cURL
GET /v1/messaging/tasks/{task_id}/trace-info
Returns an array of interaction traces — one per message exchange in the thread. Each trace contains:
- Intent parsing results
- Entities resolved
- Rules evaluated
- Parameters extracted
- Tools invoked
- Decisions made
The task identifier.
Query Parameters
Optional. Fetch a single interaction’s trace instead of all traces.
Errors
| Status | Description |
|---|---|
401 | Missing or invalid x-aui-api-key header |
403 | Insufficient permissions for the specified agent |
422 | Validation error — invalid request parameters |
401
422
