Skip to main content
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

HeaderRequiredDescription
x-aui-api-keyYesYour API key
x-aui-organization-idYesOrganization identifier
x-aui-account-idYesAccount identifier
Content-TypeYesMust be application/json

Request Body

agent_id
string
required
The agent management ID. Apollo resolves the network and active version from this.
user_id
string
required
Unique identifier for the user starting the conversation.
task_origin_type
string
default:"web-widget"
Origin of the conversation. Common values: web-widget, api, third-party.
version_id
string
Pin the thread to a specific draft version. If omitted, uses the agent’s active version.
version_tag
string
Pin the thread to a specific revision tag (e.g., v8.14).

Response

id
string
Unique task identifier. Use this as task_id when sending messages.
user_id
string
The user identifier provided in the request.
title
string
Auto-generated task title.
welcome_message
string
The agent’s initial greeting message.
followup_suggestions
array
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
task_id
string
required
The task identifier.

Query Parameters

interaction_id
string
Optional. Fetch a single interaction’s trace instead of all traces.

Errors

StatusDescription
401Missing or invalid x-aui-api-key header
403Insufficient permissions for the specified agent
422Validation error — invalid request parameters
401
422