Claude Platform Docs

Send Events

$ ant beta:sessions:events send
POST/v1/sessions/{session_id}/events

Send Events

Parameters
--session-id: string

Path param: Path parameter session_id

Body param: Events to send to the session.

--beta: optional array of AnthropicBeta

Header param: Optional header to specify the beta version(s) you want to use.

Returns
beta_managed_agents_send_session_events: object{ data }

Events that were successfully sent to the session.

data: optional array of BetaManagedAgentsUserMessageEvent { id, content, type, processed_at } or BetaManagedAgentsUserInterruptEvent { id, type, processed_at, session_thread_id } or BetaManagedAgentsUserToolConfirmationEvent { id, result, tool_use_id, 4 more } or 4 more

Sent events

One of the following:
beta_managed_agents_user_message_event: object{ id, content, type, processed_at }

A user message event in the session conversation.

beta_managed_agents_user_interrupt_event: object{ id, type, processed_at, session_thread_id }

An interrupt event that pauses agent execution and returns control to the user.

id: string

Unique identifier for this event.

type: "user.interrupt"
processed_at: optional string

A timestamp in RFC 3339 format

formatdate-time
session_thread_id: optional string

If absent, interrupts every non-archived thread in a multiagent session (or the primary alone in a single-agent session). If present, interrupts only the named thread.

beta_managed_agents_user_tool_confirmation_event: object{ id, result, tool_use_id, 4 more }

A tool confirmation event that approves or denies a pending tool execution.

id: string

Unique identifier for this event.

result: "allow" or "deny"

UserToolConfirmationResult enum

One of the following:
"allow"
"deny"
tool_use_id: string

The id of the agent.tool_use or agent.mcp_tool_use event this result corresponds to, which can be found in the last session.status_idle event's stop_reason.event_ids field.

type: "user.tool_confirmation"
deny_message: optional string

Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.

maxLength10000
processed_at: optional string

A timestamp in RFC 3339 format

formatdate-time
session_thread_id: optional string

When set, the confirmation routes to this subagent's thread rather than the primary. Echo this from the session_thread_id on the agent.tool_use or agent.mcp_tool_use event that prompted the approval.

beta_managed_agents_user_custom_tool_result_event: object{ id, custom_tool_use_id, type, 4 more }

Event sent by the client providing the result of a custom tool execution.

beta_managed_agents_user_define_outcome_event: object{ id, description, max_iterations, 4 more }

Echo of a user.define_outcome input event. Carries the server-generated outcome_id that subsequent span.outcome_evaluation_* events reference.

beta_managed_agents_user_tool_result_event: object{ id, tool_use_id, type, 4 more }

Event sent by the client providing the result of an agent-toolset tool execution. Only valid on self_hosted environments, where sandbox-routed tools are executed by the client rather than the server.

beta_managed_agents_system_message_event: object{ id, content, type, processed_at }

A mid-conversation system message event. Carries system-role content that is appended to the session as a role: "system" turn.

id: string

Unique identifier for this event.

content: array of BetaManagedAgentsSystemContentBlock { text, type }

System content blocks. Text-only.

text: string

The text content.

minLength1
type: "text"
type: "system.message"
processed_at: optional string

A timestamp in RFC 3339 format

formatdate-time

Send Events

ant beta:sessions:events send \
  --api-key my-anthropic-api-key \
  --session-id sesn_011CZkZAtmR3yMPDzynEDxu7 \
  --event '{content: [{text: '\''Where is my order #1234?'\'', type: text}], type: user.message}'
{
  "data": [
    {
      "id": "sevt_011CZkZGOp0iBcp4kaQSihUmy",
      "content": [
        {
          "text": "Where is my order #1234?",
          "type": "text"
        }
      ],
      "type": "user.message",
      "processed_at": "2026-03-15T10:00:00Z"
    }
  ]
}
Returns Examples
{
  "data": [
    {
      "id": "sevt_011CZkZGOp0iBcp4kaQSihUmy",
      "content": [
        {
          "text": "Where is my order #1234?",
          "type": "text"
        }
      ],
      "type": "user.message",
      "processed_at": "2026-03-15T10:00:00Z"
    }
  ]
}