Send Events
anthropic-beta: managed-agents-2026-04-01. Learn how to send beta headers.Send Events
Parameters
--event: array of BetaManagedAgentsEventParamsEvents to send to the session.
Events to send to the session.
beta_managed_agents_user_message_event_params: object{ type: "user.message", content }Parameters for sending a user message to the session.
Parameters for sending a user message to the session.
beta_managed_agents_user_interrupt_event_params: object{ type: "user.interrupt", session_thread_id }Parameters for sending an interrupt to pause the agent.
Parameters for sending an interrupt to pause the agent.
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_params: object{ type: "user.tool_confirmation", result, tool_use_id, deny_message }Parameters for confirming or denying a tool execution request.
Parameters for confirming or denying a tool execution request.
result: "allow" or "deny"The confirmation result: 'allow' or 'deny'.
The confirmation result: 'allow' or 'deny'.
tool_use_id: stringThe 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.
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 stringOptional message providing context for a 'deny' decision. Only allowed when result is 'deny'.
Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.
beta_managed_agents_user_custom_tool_result_event_params: object{ type: "user.custom_tool_result", custom_tool_use_id, content, is_error }Parameters for providing the result of a custom tool execution.
Parameters for providing the result of a custom tool execution.
beta_managed_agents_user_define_outcome_event_params: object{ type: "user.define_outcome", description, rubric, max_iterations }Parameters for defining an outcome the agent should work toward. The agent begins work on receipt.
Parameters for defining an outcome the agent should work toward. The agent begins work on receipt.
beta_managed_agents_user_tool_result_event_params: object{ type: "user.tool_result", tool_use_id, content, is_error }Parameters for 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.
Parameters for 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_params: object{ type: "system.message", content }Privileged context for the accompanying turn and all subsequent turns, appended to the session's system context as a role: "system" turn rather than replacing the top-level system prompt. At most one per request: it must be the final event and immediately follow the user.message, user.tool_result, or user.custom_tool_result it accompanies. Only supported on models that accept mid-conversation system messages.
Privileged context for the accompanying turn and all subsequent turns, appended to the session's system context as a role: "system" turn rather than replacing the top-level system prompt. At most one per request: it must be the final event and immediately follow the user.message, user.tool_result, or user.custom_tool_result it accompanies. Only supported on models that accept mid-conversation system messages.
content: array of BetaManagedAgentsSystemContentBlock { type: "text", text }System content blocks to append. Text-only.
System content blocks to append. Text-only.
text: stringThe text content.
The text content.
--beta: optional array of AnthropicBetaHeader parameterThis endpoint is in beta: requests must send managed-agents-2026-04-01 in this header.
This endpoint is in beta: requests must send managed-agents-2026-04-01 in this header.
"message-batches-2024-09-24"Deprecated
"prompt-caching-2024-07-31"Deprecated
"pdfs-2024-09-25"Deprecated
"token-counting-2024-11-01"Deprecated
"token-efficient-tools-2025-02-19"Deprecated
"files-api-2025-04-14"Deprecated
"extended-cache-ttl-2025-04-11"Deprecated
"skills-2025-10-02"Deprecated
"cache-diagnosis-2026-04-07"Deprecated
"ce-user-management-2026-07-13"Deprecated
--workspace-id: optional stringHeader parameterOptional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).
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.
Events that were successfully sent to the session.
ant beta:sessions:events send \
--session-id sesn_011CZkZAtmR3yMPDzynEDxu7 \
--event '{content: [{text: "Where is my order #1234?", type: text}], type: user.message}'{
"data": [
{
"id": "sevt_011CZkZGPp1iBcp4kaQSihUm",
"content": [
{
"text": "Where is my order #1234?",
"type": "text"
}
],
"type": "user.message",
"processed_at": "2026-03-15T10:00:00Z"
}
]
}Returns Examples
{
"data": [
{
"id": "sevt_011CZkZGPp1iBcp4kaQSihUm",
"content": [
{
"text": "Where is my order #1234?",
"type": "text"
}
],
"type": "user.message",
"processed_at": "2026-03-15T10:00:00Z"
}
]
}