Skip to main content
POST
/
tasks
/
{task_id}
/
events
Send Event to Task
curl --request POST \
  --url https://api.example.com/tasks/{task_id}/events \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": {
    "text": "<string>",
    "type": "text"
  },
  "idempotency_key": "<string>",
  "persist_message": true
}
'
{
  "agent_id": "<string>",
  "id": "<string>",
  "sequence_id": 123,
  "task_id": "<string>",
  "content": {
    "text": "<string>",
    "type": "text"
  },
  "created_at": "2023-11-07T05:31:56Z",
  "streamCapabilities": [
    "<string>"
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.terminaluse.com/llms.txt

Use this file to discover all available pages before exploring further.

Content Types

TextPart

{
  "type": "text",
  "text": "Your message content"
}

DataPart

{
  "type": "data",
  "data": { "key": "value" }
}

Path Parameters

task_id
string
required

Body

application/json

Request for POST /tasks/{task_id}/events

Content accepts TextPart or DataPart only. Other message types (tool calls, reasoning, etc.) are agent-generated and sent via the /raw-events endpoint.

content
TextPart · object

Text content part.

idempotency_key
string | null

Optional idempotency key for retry-safe event delivery.

Required string length: 1 - 256
persist_message
boolean
default:true

Whether to also create a message record for this event. Defaults to True.

Response

Successful Response

Event returned from the events API.

Content is TextPart or DataPart (human-readable content only).

agent_id
string
required

The UUID of the agent that the event belongs to

id
string
required

The UUID of the event

sequence_id
integer
required

The sequence ID of the event

task_id
string
required

The UUID of the task that the event belongs to

content
TextPart · object

Text content part.

created_at
string<date-time> | null

The timestamp of the event

streamCapabilities
string[] | null

Server-advertised stream lifecycle capabilities for this event