Skip to main content
POST
Send Event to Task

Content Types

TextPart

DataPart

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