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

--event: array of BetaManagedAgentsEventParams

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.

--workspace-id: optional string

Header param: Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).

Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

Returns
beta_managed_agents_send_session_events: object{ data }

Events that were successfully sent to the session.

One of the following:
beta_managed_agents_user_message_event: object{ type: "user.message", id, content, processed_at }

A user message event in the session conversation.

beta_managed_agents_user_interrupt_event: object{ type: "user.interrupt", id, processed_at, session_thread_id }

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

type: "user.interrupt"
id: string

Unique identifier for this event.

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{ type: "user.tool_confirmation", id, result, 4 more }

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

type: "user.tool_confirmation"
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.

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

Set by the server to the subagent thread this confirmation was routed to. Omitted when it was routed to the primary thread.

beta_managed_agents_user_custom_tool_result_event: object{ type: "user.custom_tool_result", id, custom_tool_use_id, 4 more }

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

beta_managed_agents_user_define_outcome_event: object{ type: "user.define_outcome", id, description, 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{ type: "user.tool_result", id, tool_use_id, 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{ type: "system.message", id, content, processed_at }

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

type: "system.message"
id: string

Unique identifier for this event.

content: array of BetaManagedAgentsSystemContentBlock { type: "text", text }

System content blocks. Text-only.

type: "text"
text: string

The text content.

minLength1
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}'
Returns Examples
Response 200
{
  "data": [
    {
      "id": "sevt_011CZkZGOp0iBcp4kaQSihUmy",
      "content": [
        {
          "text": "Where is my order #1234?",
          "type": "text"
        }
      ],
      "type": "user.message",
      "processed_at": "2026-03-15T10:00:00Z"
    }
  ]
}