Sends events to a session and returns them as stored, in order. A user.message starts a turn (queued behind an open one, or handed to the running turn when it asks for steering with BMA’s bma_delivery_mode); a user.interrupt cancels the open turn and is marked processed when that turn has ended (with no open turn it is recorded with bma_interrupt_outcome: no_active_turn); user.tool_confirmation and user.custom_tool_result answer a call the turn waits for, and the last answer resumes it. Turns run asynchronously: follow them with the event stream or list. user.define_outcome, user.tool_result and system.message are refused with 400. Repeating an answer that was already accepted returns it again without a second effect. Send an Idempotency-Key to make retries safe (the same key and body replay the first answer); without a key, an official SDK retry of the same body within 10 minutes is merged with the first request. An archived session answers 409 conflict_error.
Authorization: Organization API key (x-api-key: bma_org_v1_…), personal access token (Authorization: Bearer bma_pat_v1_…), OAuth access token or signed-in dashboard session; a user credential names its organization with bma-organization-id. The request acts in one workspace: the one named by bma-workspace-id (or anthropic-workspace-id; when both are sent they must agree), else the credential’s default workspace (an API key’s own workspace, else its organization’s Default workspace), else the only workspace the credential can use. The caller’s workspace role must be admin, developer or operator (viewer is refused); organization owners and admins act as workspace admins in every workspace of their organization.
Limits:
Request body: at most 32 MiB (33,554,432 bytes).
Idempotency-Key: 1 to 255 visible ASCII characters; a completed key replays its answer for 24 hours; a key whose request is still running blocks the key for at most 10 minutes.
A steering user.message: content at most 40 KiB.
A user.bma_controlled_message: at most 10 selected skills, each SKILL.md at most 64 KiB, 256 KiB in total.
Rate limit: one request of the organization’s write budget (Rate limits).
Errors (besides the common errors (401 authentication, 429 rate_limited, 500)):
Status
error.type
error.code
Cause
Fix
400
invalid_request_error
idempotency_key_reused
The Idempotency-Key was used in the last 24 hours with a different request.
Correct the request as the message describes and send it again; the same request will keep failing.
400
invalid_request_error
invalid_idempotency_key
Idempotency-Key is not 1 to 255 visible ASCII characters.
Correct the request as the message describes and send it again; the same request will keep failing.
400
invalid_request_error
invalid_json
The body cannot be read or is not a JSON object.
Correct the request as the message describes and send it again; the same request will keep failing.
400
invalid_request_error
organization_required
A user credential (personal access token, OAuth token, dashboard session) names no organization.
Name the organization with the bma-organization-id header.
400
invalid_request_error
project_required
The credential can use several workspaces and the request names none.
Name the workspace with the bma-workspace-id header.
400
invalid_request_error
workspace_id_conflict
bma-workspace-id and anthropic-workspace-id name different workspaces.
Correct the request as the message describes and send it again; the same request will keep failing.
403
permission_error
permission_denied
The caller’s workspace role is viewer, which may read sessions but not change them.
Use a credential with the required role or access; retrying with the same credential will not help.
404
not_found_error
skill_not_found
A skill selected by a user.bma_controlled_message is no longer readable by the workspace.
Check the ID and the organization or workspace it belongs to; do not retry the same request.
404
not_found_error
skill_version_not_found
A skill revision selected by a user.bma_controlled_message no longer exists.
Check the ID and the organization or workspace it belongs to; do not retry the same request.
409
conflict_error
confirmation_closed
The user.tool_confirmation answers a prompt whose turn closed without a decision.
Re-read the resource, resolve the conflicting state, then send the request again.
409
conflict_error
custom_tool_use_closed
The user.custom_tool_result answers a custom tool call whose turn closed without a result.
Re-read the resource, resolve the conflicting state, then send the request again.
409
conflict_error
idempotency_key_in_use
A request with the same Idempotency-Key is still being processed.
Retry after a short delay; the first request’s answer is replayed once it completes.
409
conflict_error
interaction_withdrawn
The executor withdrew the interaction of this tool_use_id.
Re-read the resource, resolve the conflicting state, then send the request again.
413
request_too_large
request_too_large
The body is larger than 32 MiB.
Reduce the size of the request body or upload in smaller parts.
ID of the session (ses_ followed by 26 lowercase base32 characters). A session of another workspace, a deleted session and an unknown ID all answer 404 not_found_error without an error.code.
Body
application/json
events
object[]
required
The events to send, at least one, processed in order: user.message, user.interrupt, user.tool_confirmation, user.custom_tool_result and BMA's user.bma_controlled_message. A user.message needs a non-empty content of text and image blocks. user.define_outcome, user.tool_result and system.message are refused with 400.
Union type for event parameters that can be sent to a session.
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6
Option 7
Show child attributes
Response
Success.
Events that were successfully sent to the session.
data
object[]
The events of the request as stored, in order, each with its id, bma_sequence and (for a user.message) bma_input_id; processed_at is absent until the event is processed.
A user message event in the session conversation.
Option 1
Option 2
Option 3
Option 4
Option 5
Option 6
Option 7
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"BMA Developer Docs","description":"BMA (BeeOS Managed Agents): an open-source agent runtime. Any brain × any hands, computer use, remote desktop, terminal, a replaceable scheduler and a durable event log, with the Anthropic Managed Agents API under /v1, the official SDKs and the Executor Protocol.","colors":{"primary":"#F97316","light":"#FB923C","dark":"#C2410C"},"logo":{"light":"/logo/light.svg","dark":"/logo/dark.svg","href":"/"},"favicon":"/favicon.svg","api":{"playground":{"display":"simple"},"examples":{"languages":["curl","python","javascript","go"]}},"appearance":{"default":"system"},"navbar":{"links":[{"href":"https://github.com/beeos-ai/bma-sdk","label":"bma-sdk"},{"href":"https://github.com/beeos-ai/bma-executor-sdk","label":"bma-executor-sdk"}]},"footer":{"socials":{"github":"https://github.com/beeos-ai"}},"fonts":{"heading":{"family":"Inter","weight":600},"body":{"family":"Inter","weight":400}},"integrations":{"telemetry":{"enabled":false}},"navigation":{"languages":[{"language":"en","default":true,"href":""},{"language":"zh","href":"zh"},{"language":"zh-Hant","href":"zh-Hant"},{"language":"ja","href":"ja"},{"language":"ko","href":"ko"}]}},"deployment":{"deploymentMetadataValue":{"hasAudioNarration":false,"customDomains":[],"gitSource":{"type":"github","owner":"local","repo":"local","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"local","isBase":true},"buildId":"local","clientVersion":"0.0.4338"},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false,"isLoggedInCli":false,"mintExport":{}},"customCss":[{"filePath":"style.css","content":"html:lang(zh){--font-family-body-custom: Inter, \"PingFang SC\", \"Hiragino Sans GB\", \"Microsoft YaHei\", \"Noto Sans SC\", \"Noto Sans CJK SC\";--font-family-headings-custom: var(--font-family-body-custom)}html:lang(zh-Hant){--font-family-body-custom: Inter, \"PingFang TC\", \"Microsoft JhengHei\", \"Noto Sans TC\", \"Noto Sans CJK TC\"}html:is(:lang(zh),:lang(ja),:lang(ko)) [data-layout-item=\"page-header\"] .prose{font-size:1.0625rem;line-height:1.8}html:is(:lang(zh),:lang(ja),:lang(ko)) :is(h1,h2,h3,h4){letter-spacing:normal}html:is(:lang(zh),:lang(ja),:lang(ko)) .prose :not(pre)>code{padding:0.125em 0.3em}html:is(:lang(zh),:lang(ja),:lang(ko)) .prose :is(td,th){line-height:1.65}"}]}
{"page":{"pagePath":"api-reference/endpoints/sessions/send-events","slug":"/api-reference/endpoints/sessions/send-events","pageMetadata":{"openapi":"/api-reference/bma.openapi.yaml post /v1/sessions/{session_id}/events","description":"Sends events to a session and returns them as stored, in order. A `user.message` starts a turn (queued behind an open one, or handed to the running turn when it asks for steering with BMA's `bma_delivery_mode`); a `user.interrupt` cancels the open turn and is marked processed when that turn has ended (with no open turn it is recorded with `bma_interrupt_outcome: no_active_turn`); `user.tool_confirmation` and `user.custom_tool_result` answer a call the turn waits for, and the last answer resumes it. Turns run asynchronously: follow them with the event stream or list. `user.define_outcome`, `user.tool_result` and `system.message` are refused with 400. Repeating an answer that was already accepted returns it again without a second effect. Send an `Idempotency-Key` to make retries safe (the same key and body replay the first answer); without a key, an official SDK retry of the same body within 10 minutes is merged with the first request. An archived session answers 409 `conflict_error`.\n\n**Authorization:** Organization API key (`x-api-key: bma_org_v1_…`), personal access token (`Authorization: Bearer bma_pat_v1_…`), OAuth access token or signed-in dashboard session; a user credential names its organization with `bma-organization-id`. The request acts in one workspace: the one named by `bma-workspace-id` (or `anthropic-workspace-id`; when both are sent they must agree), else the credential's default workspace (an API key's own workspace, else its organization's Default workspace), else the only workspace the credential can use. The caller's workspace role must be `admin`, `developer` or `operator` (`viewer` is refused); organization owners and admins act as workspace admins in every workspace of their organization.\n\n**Limits:**\n\n- Request body: at most 32 MiB (33,554,432 bytes).\n- `Idempotency-Key`: 1 to 255 visible ASCII characters; a completed key replays its answer for 24 hours; a key whose request is still running blocks the key for at most 10 minutes.\n- A steering `user.message`: content at most 40 KiB.\n- A `user.bma_controlled_message`: at most 10 selected skills, each SKILL.md at most 64 KiB, 256 KiB in total.\n- Rate limit: one request of the organization's write budget ([Rate limits](https://docs.beeos.ai/guides/limits)).\n\n**Errors** (besides the [common errors](https://docs.beeos.ai/api-reference/errors) (401 authentication, 429 `rate_limited`, 500)):\n\n| Status | `error.type` | `error.code` | Cause | Fix |\n| --- | --- | --- | --- | --- |\n| 400 | `invalid_request_error` | `idempotency_key_reused` | The `Idempotency-Key` was used in the last 24 hours with a different request. | Correct the request as the message describes and send it again; the same request will keep failing. |\n| 400 | `invalid_request_error` | `invalid_idempotency_key` | `Idempotency-Key` is not 1 to 255 visible ASCII characters. | Correct the request as the message describes and send it again; the same request will keep failing. |\n| 400 | `invalid_request_error` | `invalid_json` | The body cannot be read or is not a JSON object. | Correct the request as the message describes and send it again; the same request will keep failing. |\n| 400 | `invalid_request_error` | `organization_required` | A user credential (personal access token, OAuth token, dashboard session) names no organization. | Name the organization with the `bma-organization-id` header. |\n| 400 | `invalid_request_error` | `project_required` | The credential can use several workspaces and the request names none. | Name the workspace with the `bma-workspace-id` header. |\n| 400 | `invalid_request_error` | `workspace_id_conflict` | `bma-workspace-id` and `anthropic-workspace-id` name different workspaces. | Correct the request as the message describes and send it again; the same request will keep failing. |\n| 403 | `permission_error` | `permission_denied` | The caller's workspace role is `viewer`, which may read sessions but not change them. | Use a credential with the required role or access; retrying with the same credential will not help. |\n| 404 | `not_found_error` | `skill_not_found` | A skill selected by a `user.bma_controlled_message` is no longer readable by the workspace. | Check the ID and the organization or workspace it belongs to; do not retry the same request. |\n| 404 | `not_found_error` | `skill_version_not_found` | A skill revision selected by a `user.bma_controlled_message` no longer exists. | Check the ID and the organization or workspace it belongs to; do not retry the same request. |\n| 409 | `conflict_error` | `confirmation_closed` | The `user.tool_confirmation` answers a prompt whose turn closed without a decision. | Re-read the resource, resolve the conflicting state, then send the request again. |\n| 409 | `conflict_error` | `custom_tool_use_closed` | The `user.custom_tool_result` answers a custom tool call whose turn closed without a result. | Re-read the resource, resolve the conflicting state, then send the request again. |\n| 409 | `conflict_error` | `idempotency_key_in_use` | A request with the same `Idempotency-Key` is still being processed. | Retry after a short delay; the first request's answer is replayed once it completes. |\n| 409 | `conflict_error` | `interaction_withdrawn` | The executor withdrew the interaction of this `tool_use_id`. | Re-read the resource, resolve the conflicting state, then send the request again. |\n| 413 | `request_too_large` | `request_too_large` | The body is larger than 32 MiB. | Reduce the size of the request body or upload in smaller parts. |","href":"/api-reference/endpoints/sessions/send-events","title":"Send Events"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n code: \"code\",\n li: \"li\",\n p: \"p\",\n strong: \"strong\",\n table: \"table\",\n tbody: \"tbody\",\n td: \"td\",\n th: \"th\",\n thead: \"thead\",\n tr: \"tr\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Sends events to a session and returns them as stored, in order. A \", _jsx(_components.code, {\n children: \"user.message\"\n }), \" starts a turn (queued behind an open one, or handed to the running turn when it asks for steering with BMA’s \", _jsx(_components.code, {\n children: \"bma_delivery_mode\"\n }), \"); a \", _jsx(_components.code, {\n children: \"user.interrupt\"\n }), \" cancels the open turn and is marked processed when that turn has ended (with no open turn it is recorded with \", _jsx(_components.code, {\n children: \"bma_interrupt_outcome: no_active_turn\"\n }), \"); \", _jsx(_components.code, {\n children: \"user.tool_confirmation\"\n }), \" and \", _jsx(_components.code, {\n children: \"user.custom_tool_result\"\n }), \" answer a call the turn waits for, and the last answer resumes it. Turns run asynchronously: follow them with the event stream or list. \", _jsx(_components.code, {\n children: \"user.define_outcome\"\n }), \", \", _jsx(_components.code, {\n children: \"user.tool_result\"\n }), \" and \", _jsx(_components.code, {\n children: \"system.message\"\n }), \" are refused with 400. Repeating an answer that was already accepted returns it again without a second effect. Send an \", _jsx(_components.code, {\n children: \"Idempotency-Key\"\n }), \" to make retries safe (the same key and body replay the first answer); without a key, an official SDK retry of the same body within 10 minutes is merged with the first request. An archived session answers 409 \", _jsx(_components.code, {\n children: \"conflict_error\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Authorization:\"\n }), \" Organization API key (\", _jsx(_components.code, {\n children: \"x-api-key: bma_org_v1_…\"\n }), \"), personal access token (\", _jsx(_components.code, {\n children: \"Authorization: Bearer bma_pat_v1_…\"\n }), \"), OAuth access token or signed-in dashboard session; a user credential names its organization with \", _jsx(_components.code, {\n children: \"bma-organization-id\"\n }), \". The request acts in one workspace: the one named by \", _jsx(_components.code, {\n children: \"bma-workspace-id\"\n }), \" (or \", _jsx(_components.code, {\n children: \"anthropic-workspace-id\"\n }), \"; when both are sent they must agree), else the credential’s default workspace (an API key’s own workspace, else its organization’s Default workspace), else the only workspace the credential can use. The caller’s workspace role must be \", _jsx(_components.code, {\n children: \"admin\"\n }), \", \", _jsx(_components.code, {\n children: \"developer\"\n }), \" or \", _jsx(_components.code, {\n children: \"operator\"\n }), \" (\", _jsx(_components.code, {\n children: \"viewer\"\n }), \" is refused); organization owners and admins act as workspace admins in every workspace of their organization.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Limits:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsx(_components.li, {\n children: \"Request body: at most 32 MiB (33,554,432 bytes).\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"Idempotency-Key\"\n }), \": 1 to 255 visible ASCII characters; a completed key replays its answer for 24 hours; a key whose request is still running blocks the key for at most 10 minutes.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"A steering \", _jsx(_components.code, {\n children: \"user.message\"\n }), \": content at most 40 KiB.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"A \", _jsx(_components.code, {\n children: \"user.bma_controlled_message\"\n }), \": at most 10 selected skills, each SKILL.md at most 64 KiB, 256 KiB in total.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Rate limit: one request of the organization’s write budget (\", _jsx(_components.a, {\n href: \"https://docs.beeos.ai/guides/limits\",\n children: \"Rate limits\"\n }), \").\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Errors\"\n }), \" (besides the \", _jsx(_components.a, {\n href: \"https://docs.beeos.ai/api-reference/errors\",\n children: \"common errors\"\n }), \" (401 authentication, 429 \", _jsx(_components.code, {\n children: \"rate_limited\"\n }), \", 500)):\"]\n }), \"\\n\", _jsxs(_components.table, {\n children: [_jsx(_components.thead, {\n children: _jsxs(_components.tr, {\n children: [_jsx(_components.th, {\n children: \"Status\"\n }), _jsx(_components.th, {\n children: _jsx(_components.code, {\n children: \"error.type\"\n })\n }), _jsx(_components.th, {\n children: _jsx(_components.code, {\n children: \"error.code\"\n })\n }), _jsx(_components.th, {\n children: \"Cause\"\n }), _jsx(_components.th, {\n children: \"Fix\"\n })]\n })\n }), _jsxs(_components.tbody, {\n children: [_jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"400\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"invalid_request_error\"\n })\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"idempotency_key_reused\"\n })\n }), _jsxs(_components.td, {\n children: [\"The \", _jsx(_components.code, {\n children: \"Idempotency-Key\"\n }), \" was used in the last 24 hours with a different request.\"]\n }), _jsx(_components.td, {\n children: \"Correct the request as the message describes and send it again; the same request will keep failing.\"\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"400\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"invalid_request_error\"\n })\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"invalid_idempotency_key\"\n })\n }), _jsxs(_components.td, {\n children: [_jsx(_components.code, {\n children: \"Idempotency-Key\"\n }), \" is not 1 to 255 visible ASCII characters.\"]\n }), _jsx(_components.td, {\n children: \"Correct the request as the message describes and send it again; the same request will keep failing.\"\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"400\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"invalid_request_error\"\n })\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"invalid_json\"\n })\n }), _jsx(_components.td, {\n children: \"The body cannot be read or is not a JSON object.\"\n }), _jsx(_components.td, {\n children: \"Correct the request as the message describes and send it again; the same request will keep failing.\"\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"400\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"invalid_request_error\"\n })\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"organization_required\"\n })\n }), _jsx(_components.td, {\n children: \"A user credential (personal access token, OAuth token, dashboard session) names no organization.\"\n }), _jsxs(_components.td, {\n children: [\"Name the organization with the \", _jsx(_components.code, {\n children: \"bma-organization-id\"\n }), \" header.\"]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"400\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"invalid_request_error\"\n })\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"project_required\"\n })\n }), _jsx(_components.td, {\n children: \"The credential can use several workspaces and the request names none.\"\n }), _jsxs(_components.td, {\n children: [\"Name the workspace with the \", _jsx(_components.code, {\n children: \"bma-workspace-id\"\n }), \" header.\"]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"400\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"invalid_request_error\"\n })\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"workspace_id_conflict\"\n })\n }), _jsxs(_components.td, {\n children: [_jsx(_components.code, {\n children: \"bma-workspace-id\"\n }), \" and \", _jsx(_components.code, {\n children: \"anthropic-workspace-id\"\n }), \" name different workspaces.\"]\n }), _jsx(_components.td, {\n children: \"Correct the request as the message describes and send it again; the same request will keep failing.\"\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"403\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"permission_error\"\n })\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"permission_denied\"\n })\n }), _jsxs(_components.td, {\n children: [\"The caller’s workspace role is \", _jsx(_components.code, {\n children: \"viewer\"\n }), \", which may read sessions but not change them.\"]\n }), _jsx(_components.td, {\n children: \"Use a credential with the required role or access; retrying with the same credential will not help.\"\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"404\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"not_found_error\"\n })\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"skill_not_found\"\n })\n }), _jsxs(_components.td, {\n children: [\"A skill selected by a \", _jsx(_components.code, {\n children: \"user.bma_controlled_message\"\n }), \" is no longer readable by the workspace.\"]\n }), _jsx(_components.td, {\n children: \"Check the ID and the organization or workspace it belongs to; do not retry the same request.\"\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"404\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"not_found_error\"\n })\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"skill_version_not_found\"\n })\n }), _jsxs(_components.td, {\n children: [\"A skill revision selected by a \", _jsx(_components.code, {\n children: \"user.bma_controlled_message\"\n }), \" no longer exists.\"]\n }), _jsx(_components.td, {\n children: \"Check the ID and the organization or workspace it belongs to; do not retry the same request.\"\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"409\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"conflict_error\"\n })\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"confirmation_closed\"\n })\n }), _jsxs(_components.td, {\n children: [\"The \", _jsx(_components.code, {\n children: \"user.tool_confirmation\"\n }), \" answers a prompt whose turn closed without a decision.\"]\n }), _jsx(_components.td, {\n children: \"Re-read the resource, resolve the conflicting state, then send the request again.\"\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"409\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"conflict_error\"\n })\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"custom_tool_use_closed\"\n })\n }), _jsxs(_components.td, {\n children: [\"The \", _jsx(_components.code, {\n children: \"user.custom_tool_result\"\n }), \" answers a custom tool call whose turn closed without a result.\"]\n }), _jsx(_components.td, {\n children: \"Re-read the resource, resolve the conflicting state, then send the request again.\"\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"409\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"conflict_error\"\n })\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"idempotency_key_in_use\"\n })\n }), _jsxs(_components.td, {\n children: [\"A request with the same \", _jsx(_components.code, {\n children: \"Idempotency-Key\"\n }), \" is still being processed.\"]\n }), _jsx(_components.td, {\n children: \"Retry after a short delay; the first request’s answer is replayed once it completes.\"\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"409\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"conflict_error\"\n })\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"interaction_withdrawn\"\n })\n }), _jsxs(_components.td, {\n children: [\"The executor withdrew the interaction of this \", _jsx(_components.code, {\n children: \"tool_use_id\"\n }), \".\"]\n }), _jsx(_components.td, {\n children: \"Re-read the resource, resolve the conflicting state, then send the request again.\"\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"413\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"request_too_large\"\n })\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"request_too_large\"\n })\n }), _jsx(_components.td, {\n children: \"The body is larger than 32 MiB.\"\n }), _jsx(_components.td, {\n children: \"Reduce the size of the request body or upload in smaller parts.\"\n })]\n })]\n })]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"openapi":"/api-reference/bma.openapi.yaml post /v1/sessions/{session_id}/events","description":"Sends events to a session and returns them as stored, in order. A `user.message` starts a turn (queued behind an open one, or handed to the running turn when it asks for steering with BMA's `bma_delivery_mode`); a `user.interrupt` cancels the open turn and is marked processed when that turn has ended (with no open turn it is recorded with `bma_interrupt_outcome: no_active_turn`); `user.tool_confirmation` and `user.custom_tool_result` answer a call the turn waits for, and the last answer resumes it. Turns run asynchronously: follow them with the event stream or list. `user.define_outcome`, `user.tool_result` and `system.message` are refused with 400. Repeating an answer that was already accepted returns it again without a second effect. Send an `Idempotency-Key` to make retries safe (the same key and body replay the first answer); without a key, an official SDK retry of the same body within 10 minutes is merged with the first request. An archived session answers 409 `conflict_error`.\n\n**Authorization:** Organization API key (`x-api-key: bma_org_v1_…`), personal access token (`Authorization: Bearer bma_pat_v1_…`), OAuth access token or signed-in dashboard session; a user credential names its organization with `bma-organization-id`. The request acts in one workspace: the one named by `bma-workspace-id` (or `anthropic-workspace-id`; when both are sent they must agree), else the credential's default workspace (an API key's own workspace, else its organization's Default workspace), else the only workspace the credential can use. The caller's workspace role must be `admin`, `developer` or `operator` (`viewer` is refused); organization owners and admins act as workspace admins in every workspace of their organization.\n\n**Limits:**\n\n- Request body: at most 32 MiB (33,554,432 bytes).\n- `Idempotency-Key`: 1 to 255 visible ASCII characters; a completed key replays its answer for 24 hours; a key whose request is still running blocks the key for at most 10 minutes.\n- A steering `user.message`: content at most 40 KiB.\n- A `user.bma_controlled_message`: at most 10 selected skills, each SKILL.md at most 64 KiB, 256 KiB in total.\n- Rate limit: one request of the organization's write budget ([Rate limits](https://docs.beeos.ai/guides/limits)).\n\n**Errors** (besides the [common errors](https://docs.beeos.ai/api-reference/errors) (401 authentication, 429 `rate_limited`, 500)):\n\n| Status | `error.type` | `error.code` | Cause | Fix |\n| --- | --- | --- | --- | --- |\n| 400 | `invalid_request_error` | `idempotency_key_reused` | The `Idempotency-Key` was used in the last 24 hours with a different request. | Correct the request as the message describes and send it again; the same request will keep failing. |\n| 400 | `invalid_request_error` | `invalid_idempotency_key` | `Idempotency-Key` is not 1 to 255 visible ASCII characters. | Correct the request as the message describes and send it again; the same request will keep failing. |\n| 400 | `invalid_request_error` | `invalid_json` | The body cannot be read or is not a JSON object. | Correct the request as the message describes and send it again; the same request will keep failing. |\n| 400 | `invalid_request_error` | `organization_required` | A user credential (personal access token, OAuth token, dashboard session) names no organization. | Name the organization with the `bma-organization-id` header. |\n| 400 | `invalid_request_error` | `project_required` | The credential can use several workspaces and the request names none. | Name the workspace with the `bma-workspace-id` header. |\n| 400 | `invalid_request_error` | `workspace_id_conflict` | `bma-workspace-id` and `anthropic-workspace-id` name different workspaces. | Correct the request as the message describes and send it again; the same request will keep failing. |\n| 403 | `permission_error` | `permission_denied` | The caller's workspace role is `viewer`, which may read sessions but not change them. | Use a credential with the required role or access; retrying with the same credential will not help. |\n| 404 | `not_found_error` | `skill_not_found` | A skill selected by a `user.bma_controlled_message` is no longer readable by the workspace. | Check the ID and the organization or workspace it belongs to; do not retry the same request. |\n| 404 | `not_found_error` | `skill_version_not_found` | A skill revision selected by a `user.bma_controlled_message` no longer exists. | Check the ID and the organization or workspace it belongs to; do not retry the same request. |\n| 409 | `conflict_error` | `confirmation_closed` | The `user.tool_confirmation` answers a prompt whose turn closed without a decision. | Re-read the resource, resolve the conflicting state, then send the request again. |\n| 409 | `conflict_error` | `custom_tool_use_closed` | The `user.custom_tool_result` answers a custom tool call whose turn closed without a result. | Re-read the resource, resolve the conflicting state, then send the request again. |\n| 409 | `conflict_error` | `idempotency_key_in_use` | A request with the same `Idempotency-Key` is still being processed. | Retry after a short delay; the first request's answer is replayed once it completes. |\n| 409 | `conflict_error` | `interaction_withdrawn` | The executor withdrew the interaction of this `tool_use_id`. | Re-read the resource, resolve the conflicting state, then send the request again. |\n| 413 | `request_too_large` | `request_too_large` | The body is larger than 32 MiB. | Reduce the size of the request body or upload in smaller parts. |","href":"/api-reference/endpoints/sessions/send-events","title":"Send Events"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"sessions.events.send","tags":["Sessions"],"summary":"Send Events","x-bma-extension":false,"parameters":["3cde89f7-fd48-447b-ad84-a29fc0526313"],"requestBody":"84d181fb-a3cc-43e5-8c0e-baeea4700832","responses":{"200":"216fc8a4-ae22-48bc-98cb-d6c59a3b8410","4XX":"98cacf06-ea3b-4ee5-9995-55d8d992569a","5XX":"f1406c36-889d-46ad-b458-4e134266b196"},"description":"Sends events to a session and returns them as stored, in order. A `user.message` starts a turn (queued behind an open one, or handed to the running turn when it asks for steering with BMA's `bma_delivery_mode`); a `user.interrupt` cancels the open turn and is marked processed when that turn has ended (with no open turn it is recorded with `bma_interrupt_outcome: no_active_turn`); `user.tool_confirmation` and `user.custom_tool_result` answer a call the turn waits for, and the last answer resumes it. Turns run asynchronously: follow them with the event stream or list. `user.define_outcome`, `user.tool_result` and `system.message` are refused with 400. Repeating an answer that was already accepted returns it again without a second effect. Send an `Idempotency-Key` to make retries safe (the same key and body replay the first answer); without a key, an official SDK retry of the same body within 10 minutes is merged with the first request. An archived session answers 409 `conflict_error`.\n\n**Authorization:** Organization API key (`x-api-key: bma_org_v1_…`), personal access token (`Authorization: Bearer bma_pat_v1_…`), OAuth access token or signed-in dashboard session; a user credential names its organization with `bma-organization-id`. The request acts in one workspace: the one named by `bma-workspace-id` (or `anthropic-workspace-id`; when both are sent they must agree), else the credential's default workspace (an API key's own workspace, else its organization's Default workspace), else the only workspace the credential can use. The caller's workspace role must be `admin`, `developer` or `operator` (`viewer` is refused); organization owners and admins act as workspace admins in every workspace of their organization.\n\n**Limits:**\n\n- Request body: at most 32 MiB (33,554,432 bytes).\n- `Idempotency-Key`: 1 to 255 visible ASCII characters; a completed key replays its answer for 24 hours; a key whose request is still running blocks the key for at most 10 minutes.\n- A steering `user.message`: content at most 40 KiB.\n- A `user.bma_controlled_message`: at most 10 selected skills, each SKILL.md at most 64 KiB, 256 KiB in total.\n- Rate limit: one request of the organization's write budget ([Rate limits](https://docs.beeos.ai/guides/limits)).\n\n**Errors** (besides the [common errors](https://docs.beeos.ai/api-reference/errors) (401 authentication, 429 `rate_limited`, 500)):\n\n| Status | `error.type` | `error.code` | Cause | Fix |\n| --- | --- | --- | --- | --- |\n| 400 | `invalid_request_error` | `idempotency_key_reused` | The `Idempotency-Key` was used in the last 24 hours with a different request. | Correct the request as the message describes and send it again; the same request will keep failing. |\n| 400 | `invalid_request_error` | `invalid_idempotency_key` | `Idempotency-Key` is not 1 to 255 visible ASCII characters. | Correct the request as the message describes and send it again; the same request will keep failing. |\n| 400 | `invalid_request_error` | `invalid_json` | The body cannot be read or is not a JSON object. | Correct the request as the message describes and send it again; the same request will keep failing. |\n| 400 | `invalid_request_error` | `organization_required` | A user credential (personal access token, OAuth token, dashboard session) names no organization. | Name the organization with the `bma-organization-id` header. |\n| 400 | `invalid_request_error` | `project_required` | The credential can use several workspaces and the request names none. | Name the workspace with the `bma-workspace-id` header. |\n| 400 | `invalid_request_error` | `workspace_id_conflict` | `bma-workspace-id` and `anthropic-workspace-id` name different workspaces. | Correct the request as the message describes and send it again; the same request will keep failing. |\n| 403 | `permission_error` | `permission_denied` | The caller's workspace role is `viewer`, which may read sessions but not change them. | Use a credential with the required role or access; retrying with the same credential will not help. |\n| 404 | `not_found_error` | `skill_not_found` | A skill selected by a `user.bma_controlled_message` is no longer readable by the workspace. | Check the ID and the organization or workspace it belongs to; do not retry the same request. |\n| 404 | `not_found_error` | `skill_version_not_found` | A skill revision selected by a `user.bma_controlled_message` no longer exists. | Check the ID and the organization or workspace it belongs to; do not retry the same request. |\n| 409 | `conflict_error` | `confirmation_closed` | The `user.tool_confirmation` answers a prompt whose turn closed without a decision. | Re-read the resource, resolve the conflicting state, then send the request again. |\n| 409 | `conflict_error` | `custom_tool_use_closed` | The `user.custom_tool_result` answers a custom tool call whose turn closed without a result. | Re-read the resource, resolve the conflicting state, then send the request again. |\n| 409 | `conflict_error` | `idempotency_key_in_use` | A request with the same `Idempotency-Key` is still being processed. | Retry after a short delay; the first request's answer is replayed once it completes. |\n| 409 | `conflict_error` | `interaction_withdrawn` | The executor withdrew the interaction of this `tool_use_id`. | Re-read the resource, resolve the conflicting state, then send the request again. |\n| 413 | `request_too_large` | `request_too_large` | The body is larger than 32 MiB. | Reduce the size of the request body or upload in smaller parts. |","x-bma-auth":"Organization API key (`x-api-key: bma_org_v1_…`), personal access token (`Authorization: Bearer bma_pat_v1_…`), OAuth access token or signed-in dashboard session; a user credential names its organization with `bma-organization-id`. The request acts in one workspace: the one named by `bma-workspace-id` (or `anthropic-workspace-id`; when both are sent they must agree), else the credential's default workspace (an API key's own workspace, else its organization's Default workspace), else the only workspace the credential can use. The caller's workspace role must be `admin`, `developer` or `operator` (`viewer` is refused); organization owners and admins act as workspace admins in every workspace of their organization.","x-bma-limits":["Request body: at most 32 MiB (33,554,432 bytes).","`Idempotency-Key`: 1 to 255 visible ASCII characters; a completed key replays its answer for 24 hours; a key whose request is still running blocks the key for at most 10 minutes.","A steering `user.message`: content at most 40 KiB.","A `user.bma_controlled_message`: at most 10 selected skills, each SKILL.md at most 64 KiB, 256 KiB in total."],"x-bma-errors":[{"code":"invalid_json","when":"The body cannot be read or is not a JSON object."},{"code":"request_too_large","when":"The body is larger than 32 MiB."},{"code":"invalid_idempotency_key","when":"`Idempotency-Key` is not 1 to 255 visible ASCII characters."},{"code":"idempotency_key_reused","when":"The `Idempotency-Key` was used in the last 24 hours with a different request."},{"code":"permission_denied","when":"The caller's workspace role is `viewer`, which may read sessions but not change them."},{"code":"idempotency_key_in_use","when":"A request with the same `Idempotency-Key` is still being processed.","fix":"Retry after a short delay; the first request's answer is replayed once it completes."},{"code":"confirmation_closed","when":"The `user.tool_confirmation` answers a prompt whose turn closed without a decision."},{"code":"custom_tool_use_closed","when":"The `user.custom_tool_result` answers a custom tool call whose turn closed without a result."},{"code":"interaction_withdrawn","when":"The executor withdrew the interaction of this `tool_use_id`."},{"code":"skill_not_found","when":"A skill selected by a `user.bma_controlled_message` is no longer readable by the workspace."},{"code":"skill_version_not_found","when":"A skill revision selected by a `user.bma_controlled_message` no longer exists."},{"code":"workspace_id_conflict","when":"`bma-workspace-id` and `anthropic-workspace-id` name different workspaces."},{"code":"project_required","when":"The credential can use several workspaces and the request names none.","fix":"Name the workspace with the `bma-workspace-id` header."},{"code":"organization_required","when":"A user credential (personal access token, OAuth token, dashboard session) names no organization.","fix":"Name the organization with the `bma-organization-id` header."}],"x-codeSamples":[{"lang":"bash","label":"curl","source":"curl -sS -X POST \"$BMA_BASE_URL/v1/sessions/ses_agray4o575ytrcguudsrm73sbq/events\" \\\n -H \"x-api-key: $BMA_API_KEY\" \\\n -H \"bma-workspace-id: $BMA_PROJECT_ID\" \\\n -H \"content-type: application/json\" \\\n -d '{\n \"events\": [\n {\n \"type\": \"user.message\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"Draft the Q3 revenue summary from data/q3.csv.\"\n }\n ]\n }\n ]\n}'"},{"lang":"python","label":"Python","source":"from bma_sdk import Bma\n\nclient = Bma() # BMA_API_KEY, BMA_BASE_URL, BMA_PROJECT_ID\n\nresult = client.beta.sessions.events.send(\n \"ses_agray4o575ytrcguudsrm73sbq\",\n events=[\n {\n \"type\": \"user.message\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"Draft the Q3 revenue summary from data/q3.csv.\",\n },\n ],\n },\n ],\n)\nprint(result)\n"},{"lang":"typescript","label":"TypeScript","source":"import { BmaClient } from \"@beeos-ai/bma-sdk\";\n\nconst client = new BmaClient(); // BMA_API_KEY, BMA_BASE_URL, BMA_PROJECT_ID\n\nconst result = await client.beta.sessions.events.send(\"ses_agray4o575ytrcguudsrm73sbq\", {\n events: [\n {\n type: \"user.message\",\n content: [\n {\n type: \"text\",\n text: \"Draft the Q3 revenue summary from data/q3.csv.\",\n },\n ],\n },\n ],\n});\nconsole.log(result);\n"},{"lang":"go","label":"Go","source":"import (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n\n\tbmasdk \"github.com/beeos-ai/bma-sdk/v4\"\n)\n\nclient := bmasdk.NewClient() // BMA_API_KEY, BMA_BASE_URL, BMA_PROJECT_ID\nvar res map[string]any\nerr := client.Execute(context.TODO(), http.MethodPost, \"v1/sessions/ses_agray4o575ytrcguudsrm73sbq/events\",\n\tmap[string]any{\n\t\t\"events\": []any{\n\t\t\tmap[string]any{\n\t\t\t\t\"type\": \"user.message\",\n\t\t\t\t\"content\": []any{\n\t\t\t\t\tmap[string]any{\n\t\t\t\t\t\t\"type\": \"text\",\n\t\t\t\t\t\t\"text\": \"Draft the Q3 revenue summary from data/q3.csv.\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}, \u0026res)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Println(res)\n"},{"lang":"bash","label":"CLI","source":"bma sessions events create ses_agray4o575ytrcguudsrm73sbq --events '[{\"type\":\"user.message\",\"content\":[{\"type\":\"text\",\"text\":\"Draft the Q3 revenue summary from data/q3.csv.\"}]}]'"}],"method":"post","type":"path","servers":["aab6fce6-43f5-423b-92da-bb742711199d","f34f48fd-3007-467d-9d05-2d18bb2f0252"],"security":["a7a05916-0e8d-41df-b94e-ca8691ee2568","6e714eac-c5f9-497c-947a-aeaa7d4f124d"],"path":"/v1/sessions/{session_id}/events","baseUrlOptions":["https://api.beeos.ai","http://127.0.0.1:58080"],"title":"Send Events","codeSamples":[{"label":"curl","lang":"bash","source":"curl -sS -X POST \"$BMA_BASE_URL/v1/sessions/ses_agray4o575ytrcguudsrm73sbq/events\" \\\n -H \"x-api-key: $BMA_API_KEY\" \\\n -H \"bma-workspace-id: $BMA_PROJECT_ID\" \\\n -H \"content-type: application/json\" \\\n -d '{\n \"events\": [\n {\n \"type\": \"user.message\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"Draft the Q3 revenue summary from data/q3.csv.\"\n }\n ]\n }\n ]\n}'"},{"label":"Python","lang":"python","source":"from bma_sdk import Bma\n\nclient = Bma() # BMA_API_KEY, BMA_BASE_URL, BMA_PROJECT_ID\n\nresult = client.beta.sessions.events.send(\n \"ses_agray4o575ytrcguudsrm73sbq\",\n events=[\n {\n \"type\": \"user.message\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"Draft the Q3 revenue summary from data/q3.csv.\",\n },\n ],\n },\n ],\n)\nprint(result)\n"},{"label":"TypeScript","lang":"typescript","source":"import { BmaClient } from \"@beeos-ai/bma-sdk\";\n\nconst client = new BmaClient(); // BMA_API_KEY, BMA_BASE_URL, BMA_PROJECT_ID\n\nconst result = await client.beta.sessions.events.send(\"ses_agray4o575ytrcguudsrm73sbq\", {\n events: [\n {\n type: \"user.message\",\n content: [\n {\n type: \"text\",\n text: \"Draft the Q3 revenue summary from data/q3.csv.\",\n },\n ],\n },\n ],\n});\nconsole.log(result);\n"},{"label":"Go","lang":"go","source":"import (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n\n\tbmasdk \"github.com/beeos-ai/bma-sdk/v4\"\n)\n\nclient := bmasdk.NewClient() // BMA_API_KEY, BMA_BASE_URL, BMA_PROJECT_ID\nvar res map[string]any\nerr := client.Execute(context.TODO(), http.MethodPost, \"v1/sessions/ses_agray4o575ytrcguudsrm73sbq/events\",\n\tmap[string]any{\n\t\t\"events\": []any{\n\t\t\tmap[string]any{\n\t\t\t\t\"type\": \"user.message\",\n\t\t\t\t\"content\": []any{\n\t\t\t\t\tmap[string]any{\n\t\t\t\t\t\t\"type\": \"text\",\n\t\t\t\t\t\t\"text\": \"Draft the Q3 revenue summary from data/q3.csv.\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t}, \u0026res)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Println(res)\n"},{"label":"CLI","lang":"bash","source":"bma sessions events create ses_agray4o575ytrcguudsrm73sbq --events '[{\"type\":\"user.message\",\"content\":[{\"type\":\"text\",\"text\":\"Draft the Q3 revenue summary from data/q3.csv.\"}]}]'"}],"requestExampleLanguages":["bash","python","javascript","go"],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"3cde89f7-fd48-447b-ad84-a29fc0526313":{"name":"session_id","in":"path","required":true,"schema":{"type":"string","isRequired":true,"description":"ID of the session (`ses_` followed by 26 lowercase base32 characters). A session of another workspace, a deleted session and an unknown ID all answer 404 `not_found_error` without an `error.code`.","uniqueKey":"","typeLabel":"string"},"description":"ID of the session (`ses_` followed by 26 lowercase base32 characters). A session of another workspace, a deleted session and an unknown ID all answer 404 `not_found_error` without an `error.code`.","example":"ses_agray4o575ytrcguudsrm73sbq"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"oneOf":[{"type":"object","description":"Union type for event parameters that can be sent to a session.","required":["content","type"],"properties":{"content":{"type":"array","items":{"oneOf":[{"type":"object","description":"Regular text content.","required":["text","type"],"properties":{"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.0.text","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.0.type","typeLabel":"string"}},"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"Image content specified directly as base64 data or as a reference via a URL.","required":["source","type"],"properties":{"source":{"oneOf":[{"type":"object","description":"The source of the image data.","required":["data","media_type","type"],"properties":{"data":{"type":"string","description":"Base64-encoded image data.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.0.data","typeLabel":"string"},"media_type":{"type":"string","description":"MIME type of the image (e.g., \"image/png\", \"image/jpeg\", \"image/gif\", \"image/webp\").","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.0.media_type","typeLabel":"string"},"type":{"type":"string","const":"base64","description":"Always `base64`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.0.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.0","typeLabel":"object"},{"type":"object","description":"The source of the image data.","required":["type","url"],"properties":{"type":{"type":"string","const":"url","description":"Always `url`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.1.type","typeLabel":"string"},"url":{"type":"string","description":"URL of the image to fetch.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.1.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.1","typeLabel":"object"},{"type":"object","description":"The source of the image data.","required":["file_id","type"],"properties":{"file_id":{"type":"string","description":"ID of a previously uploaded file.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.2.file_id","typeLabel":"string"},"type":{"type":"string","const":"file","description":"Always `file`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.2.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.2","typeLabel":"object"}],"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source","typeLabel":"object"},"type":{"type":"string","const":"image","description":"Always `image`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.type","typeLabel":"string"}},"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"Document content, either specified directly as base64 data, as text, or as a reference via a URL.","required":["source","type"],"properties":{"source":{"oneOf":[{"type":"object","description":"The source of the document data.","required":["data","media_type","type"],"properties":{"data":{"type":"string","description":"Base64-encoded document data.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.0.data","typeLabel":"string"},"media_type":{"type":"string","description":"MIME type of the document (e.g., \"application/pdf\").","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.0.media_type","typeLabel":"string"},"type":{"type":"string","const":"base64","description":"Always `base64`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.0.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.0","typeLabel":"object"},{"type":"object","description":"The source of the document data.","required":["data","media_type","type"],"properties":{"data":{"type":"string","description":"The plain text content.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.1.data","typeLabel":"string"},"media_type":{"type":"string","const":"text/plain","description":"MIME type of the text content. Must be \"text/plain\".","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.1.media_type","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.1.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.1","typeLabel":"object"},{"type":"object","description":"The source of the document data.","required":["type","url"],"properties":{"type":{"type":"string","const":"url","description":"Always `url`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.2.type","typeLabel":"string"},"url":{"type":"string","description":"URL of the document to fetch.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.2.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.2","typeLabel":"object"},{"type":"object","description":"The source of the document data.","required":["file_id","type"],"properties":{"file_id":{"type":"string","description":"ID of a previously uploaded file.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.3.file_id","typeLabel":"string"},"type":{"type":"string","const":"file","description":"Always `file`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.3.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source","typeLabel":"object"},"type":{"type":"string","const":"document","description":"Always `document`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.type","typeLabel":"string"},"context":{"oneOf":[{"type":"string","description":"Additional context about the document for the model.","uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.context.oneOf.0","typeLabel":"string"},{"type":"null","description":"Additional context about the document for the model.","uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.context.oneOf.1","typeLabel":"null"}],"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.context","typeLabel":"string | null"},"title":{"oneOf":[{"type":"string","description":"The title of the document.","uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.title.oneOf.0","typeLabel":"string"},{"type":"null","description":"The title of the document.","uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.title.oneOf.1","typeLabel":"null"}],"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.title","typeLabel":"string | null"}},"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"Placeholder for content withheld by Anthropic model policy.","required":["type"],"properties":{"type":{"type":"string","const":"redacted","description":"Always `redacted`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.3.type","typeLabel":"string"}},"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.3","typeLabel":"object"}],"uniqueKey":"events.items.[INDEX].oneOf.0.content.items.[INDEX]","typeLabel":"object"},"description":"Array of content blocks for the user message.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.content","typeLabel":"object[]"},"type":{"type":"string","const":"user.message","description":"Always `user.message`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.0.type","typeLabel":"string"}},"uniqueKey":"events.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"Union type for event parameters that can be sent to a session.","required":["type"],"properties":{"type":{"type":"string","const":"user.interrupt","description":"Always `user.interrupt`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.1.type","typeLabel":"string"},"session_thread_id":{"oneOf":[{"type":"string","description":"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.","uniqueKey":"events.items.[INDEX].oneOf.1.session_thread_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"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.","uniqueKey":"events.items.[INDEX].oneOf.1.session_thread_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"events.items.[INDEX].oneOf.1.session_thread_id","typeLabel":"string | null"}},"uniqueKey":"events.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"Union type for event parameters that can be sent to a session.","required":["result","tool_use_id","type"],"properties":{"result":{"type":"string","enum":["allow","deny"],"description":"The confirmation result: 'allow' or 'deny'.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.2.result","typeLabel":"enum\u003cstring>"},"tool_use_id":{"type":"string","description":"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](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.2.tool_use_id","typeLabel":"string"},"type":{"type":"string","const":"user.tool_confirmation","description":"Always `user.tool_confirmation`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.2.type","typeLabel":"string"},"deny_message":{"oneOf":[{"type":"string","description":"Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.","uniqueKey":"events.items.[INDEX].oneOf.2.deny_message.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.","uniqueKey":"events.items.[INDEX].oneOf.2.deny_message.oneOf.1","typeLabel":"null"}],"uniqueKey":"events.items.[INDEX].oneOf.2.deny_message","typeLabel":"string | null"}},"uniqueKey":"events.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"Union type for event parameters that can be sent to a session.","required":["custom_tool_use_id","type"],"properties":{"custom_tool_use_id":{"type":"string","description":"The id of the `agent.custom_tool_use` event this result corresponds to. It is also listed in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.custom_tool_use_id","typeLabel":"string"},"type":{"type":"string","const":"user.custom_tool_result","description":"Always `user.custom_tool_result`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.type","typeLabel":"string"},"content":{"type":"array","items":{"oneOf":[{"type":"object","description":"Regular text content.","required":["text","type"],"properties":{"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.0.text","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.0.type","typeLabel":"string"}},"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"Image content specified directly as base64 data or as a reference via a URL.","required":["source","type"],"properties":{"source":{"oneOf":[{"type":"object","description":"The source of the image data.","required":["data","media_type","type"],"properties":{"data":{"type":"string","description":"Base64-encoded image data.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.0.data","typeLabel":"string"},"media_type":{"type":"string","description":"MIME type of the image (e.g., \"image/png\", \"image/jpeg\", \"image/gif\", \"image/webp\").","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.0.media_type","typeLabel":"string"},"type":{"type":"string","const":"base64","description":"Always `base64`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.0.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.0","typeLabel":"object"},{"type":"object","description":"The source of the image data.","required":["type","url"],"properties":{"type":{"type":"string","const":"url","description":"Always `url`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.1.type","typeLabel":"string"},"url":{"type":"string","description":"URL of the image to fetch.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.1.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.1","typeLabel":"object"},{"type":"object","description":"The source of the image data.","required":["file_id","type"],"properties":{"file_id":{"type":"string","description":"ID of a previously uploaded file.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.2.file_id","typeLabel":"string"},"type":{"type":"string","const":"file","description":"Always `file`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.2.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.2","typeLabel":"object"}],"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source","typeLabel":"object"},"type":{"type":"string","const":"image","description":"Always `image`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.type","typeLabel":"string"}},"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"Document content, either specified directly as base64 data, as text, or as a reference via a URL.","required":["source","type"],"properties":{"source":{"oneOf":[{"type":"object","description":"The source of the document data.","required":["data","media_type","type"],"properties":{"data":{"type":"string","description":"Base64-encoded document data.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.0.data","typeLabel":"string"},"media_type":{"type":"string","description":"MIME type of the document (e.g., \"application/pdf\").","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.0.media_type","typeLabel":"string"},"type":{"type":"string","const":"base64","description":"Always `base64`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.0.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.0","typeLabel":"object"},{"type":"object","description":"The source of the document data.","required":["data","media_type","type"],"properties":{"data":{"type":"string","description":"The plain text content.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.1.data","typeLabel":"string"},"media_type":{"type":"string","const":"text/plain","description":"MIME type of the text content. Must be \"text/plain\".","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.1.media_type","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.1.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.1","typeLabel":"object"},{"type":"object","description":"The source of the document data.","required":["type","url"],"properties":{"type":{"type":"string","const":"url","description":"Always `url`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.2.type","typeLabel":"string"},"url":{"type":"string","description":"URL of the document to fetch.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.2.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.2","typeLabel":"object"},{"type":"object","description":"The source of the document data.","required":["file_id","type"],"properties":{"file_id":{"type":"string","description":"ID of a previously uploaded file.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.3.file_id","typeLabel":"string"},"type":{"type":"string","const":"file","description":"Always `file`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.3.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source","typeLabel":"object"},"type":{"type":"string","const":"document","description":"Always `document`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.type","typeLabel":"string"},"context":{"oneOf":[{"type":"string","description":"Additional context about the document for the model.","uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.context.oneOf.0","typeLabel":"string"},{"type":"null","description":"Additional context about the document for the model.","uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.context.oneOf.1","typeLabel":"null"}],"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.context","typeLabel":"string | null"},"title":{"oneOf":[{"type":"string","description":"The title of the document.","uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.title.oneOf.0","typeLabel":"string"},{"type":"null","description":"The title of the document.","uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.title.oneOf.1","typeLabel":"null"}],"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.title","typeLabel":"string | null"}},"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"A block containing a web search result.","required":["citations","content","source","title","type"],"properties":{"citations":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether citations are enabled for this search result.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3.citations.enabled","typeLabel":"boolean"}},"required":["enabled"],"description":"Citation settings for this search result.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3.citations","typeLabel":"object"},"content":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3.content.items.[INDEX].text","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3.content.items.[INDEX].type","typeLabel":"string"}},"required":["text","type"],"description":"Text content within a search result.","uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3.content.items.[INDEX]","typeLabel":"object"},"description":"Array of text content blocks from the search result.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3.content","typeLabel":"object[]"},"source":{"type":"string","description":"The URL source of the search result.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3.source","typeLabel":"string"},"title":{"type":"string","description":"The title of the search result.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3.title","typeLabel":"string"},"type":{"type":"string","const":"search_result","description":"Always `search_result`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3.type","typeLabel":"string"}},"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3","typeLabel":"object"}],"uniqueKey":"events.items.[INDEX].oneOf.3.content.items.[INDEX]","typeLabel":"object"},"description":"The result content returned by the tool.","uniqueKey":"events.items.[INDEX].oneOf.3.content","typeLabel":"object[]"},"is_error":{"oneOf":[{"type":"boolean","description":"Whether the tool execution resulted in an error.","uniqueKey":"events.items.[INDEX].oneOf.3.is_error.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether the tool execution resulted in an error.","uniqueKey":"events.items.[INDEX].oneOf.3.is_error.oneOf.1","typeLabel":"null"}],"uniqueKey":"events.items.[INDEX].oneOf.3.is_error","typeLabel":"boolean | null"}},"uniqueKey":"events.items.[INDEX].oneOf.3","typeLabel":"object"},{"type":"object","description":"Union type for event parameters that can be sent to a session.","required":["description","rubric","type"],"x-bma-unsupported":"Sending `user.define_outcome` is refused with 400.","properties":{"description":{"type":"string","description":"What the agent should produce. This is the task specification.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.4.description","typeLabel":"string"},"rubric":{"oneOf":[{"type":"object","description":"How to grade the outcome. Text or file reference.","required":["file_id","type"],"properties":{"file_id":{"type":"string","description":"ID of the rubric file.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.4.rubric.oneOf.0.file_id","typeLabel":"string"},"type":{"type":"string","const":"file","description":"Always `file`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.4.rubric.oneOf.0.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.4.rubric.oneOf.0","typeLabel":"object"},{"type":"object","description":"How to grade the outcome. Text or file reference.","required":["content","type"],"properties":{"content":{"type":"string","description":"Rubric content. Plain text or markdown — the grader treats it as freeform text. Maximum 262144 characters.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.4.rubric.oneOf.1.content","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.4.rubric.oneOf.1.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.4.rubric.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.4.rubric","typeLabel":"object"},"type":{"type":"string","const":"user.define_outcome","description":"Always `user.define_outcome`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.4.type","typeLabel":"string"},"max_iterations":{"oneOf":[{"type":"number","description":"Eval→revision cycles before giving up. Default 3, max 20.","uniqueKey":"events.items.[INDEX].oneOf.4.max_iterations.oneOf.0","typeLabel":"number"},{"type":"null","description":"Eval→revision cycles before giving up. Default 3, max 20.","uniqueKey":"events.items.[INDEX].oneOf.4.max_iterations.oneOf.1","typeLabel":"null"}],"uniqueKey":"events.items.[INDEX].oneOf.4.max_iterations","typeLabel":"number | null"}},"uniqueKey":"events.items.[INDEX].oneOf.4","typeLabel":"object"},{"type":"object","description":"Union type for event parameters that can be sent to a session.","required":["tool_use_id","type"],"x-bma-unsupported":"Sending `user.tool_result` is refused with 400: BMA runs the agent toolset itself. Answer a custom tool with `user.custom_tool_result`.","properties":{"tool_use_id":{"type":"string","description":"The id of the `agent.tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.tool_use_id","typeLabel":"string"},"type":{"type":"string","const":"user.tool_result","description":"Always `user.tool_result`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.type","typeLabel":"string"},"content":{"type":"array","items":{"oneOf":[{"type":"object","description":"Regular text content.","required":["text","type"],"properties":{"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.0.text","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.0.type","typeLabel":"string"}},"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"Image content specified directly as base64 data or as a reference via a URL.","required":["source","type"],"properties":{"source":{"oneOf":[{"type":"object","description":"The source of the image data.","required":["data","media_type","type"],"properties":{"data":{"type":"string","description":"Base64-encoded image data.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.0.data","typeLabel":"string"},"media_type":{"type":"string","description":"MIME type of the image (e.g., \"image/png\", \"image/jpeg\", \"image/gif\", \"image/webp\").","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.0.media_type","typeLabel":"string"},"type":{"type":"string","const":"base64","description":"Always `base64`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.0.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.0","typeLabel":"object"},{"type":"object","description":"The source of the image data.","required":["type","url"],"properties":{"type":{"type":"string","const":"url","description":"Always `url`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.1.type","typeLabel":"string"},"url":{"type":"string","description":"URL of the image to fetch.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.1.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.1","typeLabel":"object"},{"type":"object","description":"The source of the image data.","required":["file_id","type"],"properties":{"file_id":{"type":"string","description":"ID of a previously uploaded file.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.2.file_id","typeLabel":"string"},"type":{"type":"string","const":"file","description":"Always `file`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.2.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.2","typeLabel":"object"}],"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source","typeLabel":"object"},"type":{"type":"string","const":"image","description":"Always `image`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.type","typeLabel":"string"}},"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"Document content, either specified directly as base64 data, as text, or as a reference via a URL.","required":["source","type"],"properties":{"source":{"oneOf":[{"type":"object","description":"The source of the document data.","required":["data","media_type","type"],"properties":{"data":{"type":"string","description":"Base64-encoded document data.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.0.data","typeLabel":"string"},"media_type":{"type":"string","description":"MIME type of the document (e.g., \"application/pdf\").","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.0.media_type","typeLabel":"string"},"type":{"type":"string","const":"base64","description":"Always `base64`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.0.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.0","typeLabel":"object"},{"type":"object","description":"The source of the document data.","required":["data","media_type","type"],"properties":{"data":{"type":"string","description":"The plain text content.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.1.data","typeLabel":"string"},"media_type":{"type":"string","const":"text/plain","description":"MIME type of the text content. Must be \"text/plain\".","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.1.media_type","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.1.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.1","typeLabel":"object"},{"type":"object","description":"The source of the document data.","required":["type","url"],"properties":{"type":{"type":"string","const":"url","description":"Always `url`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.2.type","typeLabel":"string"},"url":{"type":"string","description":"URL of the document to fetch.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.2.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.2","typeLabel":"object"},{"type":"object","description":"The source of the document data.","required":["file_id","type"],"properties":{"file_id":{"type":"string","description":"ID of a previously uploaded file.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.3.file_id","typeLabel":"string"},"type":{"type":"string","const":"file","description":"Always `file`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.3.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source","typeLabel":"object"},"type":{"type":"string","const":"document","description":"Always `document`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.type","typeLabel":"string"},"context":{"oneOf":[{"type":"string","description":"Additional context about the document for the model.","uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.context.oneOf.0","typeLabel":"string"},{"type":"null","description":"Additional context about the document for the model.","uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.context.oneOf.1","typeLabel":"null"}],"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.context","typeLabel":"string | null"},"title":{"oneOf":[{"type":"string","description":"The title of the document.","uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.title.oneOf.0","typeLabel":"string"},{"type":"null","description":"The title of the document.","uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.title.oneOf.1","typeLabel":"null"}],"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.title","typeLabel":"string | null"}},"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"A block containing a web search result.","required":["citations","content","source","title","type"],"properties":{"citations":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether citations are enabled for this search result.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3.citations.enabled","typeLabel":"boolean"}},"required":["enabled"],"description":"Citation settings for this search result.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3.citations","typeLabel":"object"},"content":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3.content.items.[INDEX].text","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3.content.items.[INDEX].type","typeLabel":"string"}},"required":["text","type"],"description":"Text content within a search result.","uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3.content.items.[INDEX]","typeLabel":"object"},"description":"Array of text content blocks from the search result.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3.content","typeLabel":"object[]"},"source":{"type":"string","description":"The URL source of the search result.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3.source","typeLabel":"string"},"title":{"type":"string","description":"The title of the search result.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3.title","typeLabel":"string"},"type":{"type":"string","const":"search_result","description":"Always `search_result`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3.type","typeLabel":"string"}},"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3","typeLabel":"object"}],"uniqueKey":"events.items.[INDEX].oneOf.5.content.items.[INDEX]","typeLabel":"object"},"description":"The result content returned by the tool.","uniqueKey":"events.items.[INDEX].oneOf.5.content","typeLabel":"object[]"},"is_error":{"oneOf":[{"type":"boolean","description":"Whether the tool execution resulted in an error.","uniqueKey":"events.items.[INDEX].oneOf.5.is_error.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether the tool execution resulted in an error.","uniqueKey":"events.items.[INDEX].oneOf.5.is_error.oneOf.1","typeLabel":"null"}],"uniqueKey":"events.items.[INDEX].oneOf.5.is_error","typeLabel":"boolean | null"}},"uniqueKey":"events.items.[INDEX].oneOf.5","typeLabel":"object"},{"type":"object","description":"Union type for event parameters that can be sent to a session.","required":["content","type"],"x-bma-unsupported":"Sending `system.message` is refused with 400.","properties":{"content":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.6.content.items.[INDEX].text","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.6.content.items.[INDEX].type","typeLabel":"string"}},"required":["text","type"],"description":"Content block in a mid-conversation system message. Text-only.","uniqueKey":"events.items.[INDEX].oneOf.6.content.items.[INDEX]","typeLabel":"object"},"description":"System content blocks to append. Text-only.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.6.content","typeLabel":"object[]"},"type":{"type":"string","const":"system.message","description":"Always `system.message`.","isRequired":true,"uniqueKey":"events.items.[INDEX].oneOf.6.type","typeLabel":"string"}},"uniqueKey":"events.items.[INDEX].oneOf.6","typeLabel":"object"}],"uniqueKey":"events.items.[INDEX]","typeLabel":"object"},"description":"The events to send, at least one, processed in order: `user.message`, `user.interrupt`, `user.tool_confirmation`, `user.custom_tool_result` and BMA's `user.bma_controlled_message`. A `user.message` needs a non-empty `content` of `text` and `image` blocks. `user.define_outcome`, `user.tool_result` and `system.message` are refused with 400.","isRequired":true,"uniqueKey":"events","typeLabel":"object[]"}},"required":["events"],"uniqueKey":"","typeLabel":"object"},"example":{"events":[{"type":"user.message","content":[{"type":"text","text":"Draft the Q3 revenue summary from data/q3.csv."}]}]},"examples":{"Example":{"title":"Example","value":{"events":[{"type":"user.message","content":[{"type":"text","text":"Draft the Q3 revenue summary from data/q3.csv."}]}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"216fc8a4-ae22-48bc-98cb-d6c59a3b8410":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"oneOf":[{"type":"object","description":"A user message event in the session conversation.","required":["id","content","type"],"properties":{"id":{"type":"string","description":"Unique identifier for this event.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.id","typeLabel":"string"},"content":{"type":"array","items":{"oneOf":[{"type":"object","description":"Regular text content.","required":["text","type"],"properties":{"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.0.text","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.0.type","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"Image content specified directly as base64 data or as a reference via a URL.","required":["source","type"],"properties":{"source":{"oneOf":[{"type":"object","description":"The source of the image data.","required":["data","media_type","type"],"properties":{"data":{"type":"string","description":"Base64-encoded image data.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.0.data","typeLabel":"string"},"media_type":{"type":"string","description":"MIME type of the image (e.g., \"image/png\", \"image/jpeg\", \"image/gif\", \"image/webp\").","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.0.media_type","typeLabel":"string"},"type":{"type":"string","const":"base64","description":"Always `base64`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.0.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.0","typeLabel":"object"},{"type":"object","description":"The source of the image data.","required":["type","url"],"properties":{"type":{"type":"string","const":"url","description":"Always `url`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.1.type","typeLabel":"string"},"url":{"type":"string","description":"URL of the image to fetch.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.1.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.1","typeLabel":"object"},{"type":"object","description":"The source of the image data.","required":["file_id","type"],"properties":{"file_id":{"type":"string","description":"ID of a previously uploaded file.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.2.file_id","typeLabel":"string"},"type":{"type":"string","const":"file","description":"Always `file`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.2.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source.oneOf.2","typeLabel":"object"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.source","typeLabel":"object"},"type":{"type":"string","const":"image","description":"Always `image`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1.type","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"Document content, either specified directly as base64 data, as text, or as a reference via a URL.","required":["source","type"],"properties":{"source":{"oneOf":[{"type":"object","description":"The source of the document data.","required":["data","media_type","type"],"properties":{"data":{"type":"string","description":"Base64-encoded document data.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.0.data","typeLabel":"string"},"media_type":{"type":"string","description":"MIME type of the document (e.g., \"application/pdf\").","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.0.media_type","typeLabel":"string"},"type":{"type":"string","const":"base64","description":"Always `base64`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.0.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.0","typeLabel":"object"},{"type":"object","description":"The source of the document data.","required":["data","media_type","type"],"properties":{"data":{"type":"string","description":"The plain text content.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.1.data","typeLabel":"string"},"media_type":{"type":"string","const":"text/plain","description":"MIME type of the text content. Must be \"text/plain\".","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.1.media_type","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.1.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.1","typeLabel":"object"},{"type":"object","description":"The source of the document data.","required":["type","url"],"properties":{"type":{"type":"string","const":"url","description":"Always `url`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.2.type","typeLabel":"string"},"url":{"type":"string","description":"URL of the document to fetch.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.2.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.2","typeLabel":"object"},{"type":"object","description":"The source of the document data.","required":["file_id","type"],"properties":{"file_id":{"type":"string","description":"ID of a previously uploaded file.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.3.file_id","typeLabel":"string"},"type":{"type":"string","const":"file","description":"Always `file`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.3.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.source","typeLabel":"object"},"type":{"type":"string","const":"document","description":"Always `document`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.type","typeLabel":"string"},"context":{"oneOf":[{"type":"string","description":"Additional context about the document for the model.","uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.context.oneOf.0","typeLabel":"string"},{"type":"null","description":"Additional context about the document for the model.","uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.context.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.context","typeLabel":"string | null"},"title":{"oneOf":[{"type":"string","description":"The title of the document.","uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.title.oneOf.0","typeLabel":"string"},{"type":"null","description":"The title of the document.","uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.title.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2.title","typeLabel":"string | null"}},"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"Placeholder for content withheld by Anthropic model policy.","required":["type"],"properties":{"type":{"type":"string","const":"redacted","description":"Always `redacted`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.3.type","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX].oneOf.3","typeLabel":"object"}],"uniqueKey":"data.items.[INDEX].oneOf.0.content.items.[INDEX]","typeLabel":"object"},"description":"Array of content blocks comprising the user message.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.content","typeLabel":"object[]"},"type":{"type":"string","const":"user.message","description":"Always `user.message`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.0.type","typeLabel":"string"},"processed_at":{"oneOf":[{"type":"string","description":"Timestamp when the agent finished processing this message.","uniqueKey":"data.items.[INDEX].oneOf.0.processed_at.oneOf.0","typeLabel":"string"},{"type":"null","description":"Timestamp when the agent finished processing this message.","uniqueKey":"data.items.[INDEX].oneOf.0.processed_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].oneOf.0.processed_at","typeLabel":"string | null"}},"uniqueKey":"data.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"An interrupt event that pauses agent execution and returns control to the user.","required":["id","type"],"properties":{"id":{"type":"string","description":"Unique identifier for this event.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.1.id","typeLabel":"string"},"type":{"type":"string","const":"user.interrupt","description":"Always `user.interrupt`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.1.type","typeLabel":"string"},"processed_at":{"oneOf":[{"type":"string","description":"Timestamp when the interrupt was processed.","uniqueKey":"data.items.[INDEX].oneOf.1.processed_at.oneOf.0","typeLabel":"string"},{"type":"null","description":"Timestamp when the interrupt was processed.","uniqueKey":"data.items.[INDEX].oneOf.1.processed_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].oneOf.1.processed_at","typeLabel":"string | null"},"session_thread_id":{"oneOf":[{"type":"string","description":"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.","uniqueKey":"data.items.[INDEX].oneOf.1.session_thread_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"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.","uniqueKey":"data.items.[INDEX].oneOf.1.session_thread_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].oneOf.1.session_thread_id","typeLabel":"string | null"}},"uniqueKey":"data.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"A tool confirmation event that approves or denies a pending tool execution.","required":["id","result","tool_use_id","type"],"properties":{"id":{"type":"string","description":"Unique identifier for this event.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.2.id","typeLabel":"string"},"result":{"type":"string","enum":["allow","deny"],"description":"The confirmation result: 'allow' or 'deny'.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.2.result","typeLabel":"enum\u003cstring>"},"tool_use_id":{"type":"string","description":"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](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.2.tool_use_id","typeLabel":"string"},"type":{"type":"string","const":"user.tool_confirmation","description":"Always `user.tool_confirmation`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.2.type","typeLabel":"string"},"deny_message":{"oneOf":[{"type":"string","description":"Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.","uniqueKey":"data.items.[INDEX].oneOf.2.deny_message.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'.","uniqueKey":"data.items.[INDEX].oneOf.2.deny_message.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].oneOf.2.deny_message","typeLabel":"string | null"},"processed_at":{"oneOf":[{"type":"string","description":"Timestamp when the confirmation was processed.","uniqueKey":"data.items.[INDEX].oneOf.2.processed_at.oneOf.0","typeLabel":"string"},{"type":"null","description":"Timestamp when the confirmation was processed.","uniqueKey":"data.items.[INDEX].oneOf.2.processed_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].oneOf.2.processed_at","typeLabel":"string | null"},"session_thread_id":{"oneOf":[{"type":"string","description":"Set by the server to the subagent thread this confirmation was routed to. Omitted when it was routed to the primary thread.","uniqueKey":"data.items.[INDEX].oneOf.2.session_thread_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Set by the server to the subagent thread this confirmation was routed to. Omitted when it was routed to the primary thread.","uniqueKey":"data.items.[INDEX].oneOf.2.session_thread_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].oneOf.2.session_thread_id","typeLabel":"string | null"}},"uniqueKey":"data.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"Event sent by the client providing the result of a custom tool execution.","required":["id","custom_tool_use_id","type"],"properties":{"id":{"type":"string","description":"Unique identifier for this event.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.id","typeLabel":"string"},"custom_tool_use_id":{"type":"string","description":"The id of the `agent.custom_tool_use` event this result corresponds to. It is also listed in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.custom_tool_use_id","typeLabel":"string"},"type":{"type":"string","const":"user.custom_tool_result","description":"Always `user.custom_tool_result`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.type","typeLabel":"string"},"content":{"type":"array","items":{"oneOf":[{"type":"object","description":"Regular text content.","required":["text","type"],"properties":{"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.0.text","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.0.type","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"Image content specified directly as base64 data or as a reference via a URL.","required":["source","type"],"properties":{"source":{"oneOf":[{"type":"object","description":"The source of the image data.","required":["data","media_type","type"],"properties":{"data":{"type":"string","description":"Base64-encoded image data.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.0.data","typeLabel":"string"},"media_type":{"type":"string","description":"MIME type of the image (e.g., \"image/png\", \"image/jpeg\", \"image/gif\", \"image/webp\").","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.0.media_type","typeLabel":"string"},"type":{"type":"string","const":"base64","description":"Always `base64`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.0.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.0","typeLabel":"object"},{"type":"object","description":"The source of the image data.","required":["type","url"],"properties":{"type":{"type":"string","const":"url","description":"Always `url`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.1.type","typeLabel":"string"},"url":{"type":"string","description":"URL of the image to fetch.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.1.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.1","typeLabel":"object"},{"type":"object","description":"The source of the image data.","required":["file_id","type"],"properties":{"file_id":{"type":"string","description":"ID of a previously uploaded file.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.2.file_id","typeLabel":"string"},"type":{"type":"string","const":"file","description":"Always `file`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.2.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source.oneOf.2","typeLabel":"object"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.source","typeLabel":"object"},"type":{"type":"string","const":"image","description":"Always `image`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1.type","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"Document content, either specified directly as base64 data, as text, or as a reference via a URL.","required":["source","type"],"properties":{"source":{"oneOf":[{"type":"object","description":"The source of the document data.","required":["data","media_type","type"],"properties":{"data":{"type":"string","description":"Base64-encoded document data.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.0.data","typeLabel":"string"},"media_type":{"type":"string","description":"MIME type of the document (e.g., \"application/pdf\").","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.0.media_type","typeLabel":"string"},"type":{"type":"string","const":"base64","description":"Always `base64`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.0.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.0","typeLabel":"object"},{"type":"object","description":"The source of the document data.","required":["data","media_type","type"],"properties":{"data":{"type":"string","description":"The plain text content.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.1.data","typeLabel":"string"},"media_type":{"type":"string","const":"text/plain","description":"MIME type of the text content. Must be \"text/plain\".","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.1.media_type","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.1.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.1","typeLabel":"object"},{"type":"object","description":"The source of the document data.","required":["type","url"],"properties":{"type":{"type":"string","const":"url","description":"Always `url`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.2.type","typeLabel":"string"},"url":{"type":"string","description":"URL of the document to fetch.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.2.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.2","typeLabel":"object"},{"type":"object","description":"The source of the document data.","required":["file_id","type"],"properties":{"file_id":{"type":"string","description":"ID of a previously uploaded file.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.3.file_id","typeLabel":"string"},"type":{"type":"string","const":"file","description":"Always `file`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.3.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.source","typeLabel":"object"},"type":{"type":"string","const":"document","description":"Always `document`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.type","typeLabel":"string"},"context":{"oneOf":[{"type":"string","description":"Additional context about the document for the model.","uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.context.oneOf.0","typeLabel":"string"},{"type":"null","description":"Additional context about the document for the model.","uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.context.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.context","typeLabel":"string | null"},"title":{"oneOf":[{"type":"string","description":"The title of the document.","uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.title.oneOf.0","typeLabel":"string"},{"type":"null","description":"The title of the document.","uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.title.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2.title","typeLabel":"string | null"}},"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"A block containing a web search result.","required":["citations","content","source","title","type"],"properties":{"citations":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether citations are enabled for this search result.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3.citations.enabled","typeLabel":"boolean"}},"required":["enabled"],"description":"Citation settings for this search result.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3.citations","typeLabel":"object"},"content":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3.content.items.[INDEX].text","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3.content.items.[INDEX].type","typeLabel":"string"}},"required":["text","type"],"description":"Text content within a search result.","uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3.content.items.[INDEX]","typeLabel":"object"},"description":"Array of text content blocks from the search result.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3.content","typeLabel":"object[]"},"source":{"type":"string","description":"The URL source of the search result.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3.source","typeLabel":"string"},"title":{"type":"string","description":"The title of the search result.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3.title","typeLabel":"string"},"type":{"type":"string","const":"search_result","description":"Always `search_result`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3.type","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX].oneOf.3","typeLabel":"object"}],"uniqueKey":"data.items.[INDEX].oneOf.3.content.items.[INDEX]","typeLabel":"object"},"description":"The result content returned by the tool.","uniqueKey":"data.items.[INDEX].oneOf.3.content","typeLabel":"object[]"},"is_error":{"oneOf":[{"type":"boolean","description":"Whether the tool execution resulted in an error.","uniqueKey":"data.items.[INDEX].oneOf.3.is_error.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether the tool execution resulted in an error.","uniqueKey":"data.items.[INDEX].oneOf.3.is_error.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].oneOf.3.is_error","typeLabel":"boolean | null"},"processed_at":{"oneOf":[{"type":"string","description":"Timestamp when this result was processed.","uniqueKey":"data.items.[INDEX].oneOf.3.processed_at.oneOf.0","typeLabel":"string"},{"type":"null","description":"Timestamp when this result was processed.","uniqueKey":"data.items.[INDEX].oneOf.3.processed_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].oneOf.3.processed_at","typeLabel":"string | null"},"session_thread_id":{"oneOf":[{"type":"string","description":"Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread.","uniqueKey":"data.items.[INDEX].oneOf.3.session_thread_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread.","uniqueKey":"data.items.[INDEX].oneOf.3.session_thread_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].oneOf.3.session_thread_id","typeLabel":"string | null"}},"uniqueKey":"data.items.[INDEX].oneOf.3","typeLabel":"object"},{"type":"object","description":"Echo of a `user.define_outcome` input event. Carries the server-generated `outcome_id` that subsequent `span.outcome_evaluation_*` events reference.","required":["id","description","max_iterations","outcome_id","processed_at","rubric","type"],"properties":{"id":{"type":"string","description":"Unique identifier for this event.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.4.id","typeLabel":"string"},"description":{"type":"string","description":"What the agent should produce. Copied from the input event.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.4.description","typeLabel":"string"},"max_iterations":{"oneOf":[{"type":"number","description":"Evaluate-then-revise cycles before giving up. Default 3, max 20.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.4.max_iterations.oneOf.0","typeLabel":"number"},{"type":"null","description":"Evaluate-then-revise cycles before giving up. Default 3, max 20.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.4.max_iterations.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.4.max_iterations","typeLabel":"number | null"},"outcome_id":{"type":"string","description":"Server-generated `outc_` ID for this outcome. Referenced by `span.outcome_evaluation_*` events and the session's `outcome_evaluations` list.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.4.outcome_id","typeLabel":"string"},"processed_at":{"type":"string","description":"Timestamp when the outcome was accepted.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.4.processed_at","typeLabel":"string"},"rubric":{"oneOf":[{"type":"object","description":"How to grade the outcome. File rubrics are currently resolved to their text content; clients should handle both variants.","required":["file_id","type"],"properties":{"file_id":{"type":"string","description":"ID of the rubric file.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.4.rubric.oneOf.0.file_id","typeLabel":"string"},"type":{"type":"string","const":"file","description":"Always `file`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.4.rubric.oneOf.0.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.4.rubric.oneOf.0","typeLabel":"object"},{"type":"object","description":"How to grade the outcome. File rubrics are currently resolved to their text content; clients should handle both variants.","required":["content","type"],"properties":{"content":{"type":"string","description":"Rubric content. Plain text or markdown — the grader treats it as freeform text.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.4.rubric.oneOf.1.content","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.4.rubric.oneOf.1.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.4.rubric.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.4.rubric","typeLabel":"object"},"type":{"type":"string","const":"user.define_outcome","description":"Always `user.define_outcome`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.4.type","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].oneOf.4","typeLabel":"object"},{"type":"object","description":"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.","required":["id","tool_use_id","type"],"properties":{"id":{"type":"string","description":"Unique identifier for this event.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.id","typeLabel":"string"},"tool_use_id":{"type":"string","description":"The id of the `agent.tool_use` event this result corresponds to, which can be found in the last `session.status_idle` [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids) `stop_reason.event_ids` field.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.tool_use_id","typeLabel":"string"},"type":{"type":"string","const":"user.tool_result","description":"Always `user.tool_result`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.type","typeLabel":"string"},"content":{"type":"array","items":{"oneOf":[{"type":"object","description":"Regular text content.","required":["text","type"],"properties":{"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.0.text","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.0.type","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"Image content specified directly as base64 data or as a reference via a URL.","required":["source","type"],"properties":{"source":{"oneOf":[{"type":"object","description":"The source of the image data.","required":["data","media_type","type"],"properties":{"data":{"type":"string","description":"Base64-encoded image data.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.0.data","typeLabel":"string"},"media_type":{"type":"string","description":"MIME type of the image (e.g., \"image/png\", \"image/jpeg\", \"image/gif\", \"image/webp\").","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.0.media_type","typeLabel":"string"},"type":{"type":"string","const":"base64","description":"Always `base64`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.0.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.0","typeLabel":"object"},{"type":"object","description":"The source of the image data.","required":["type","url"],"properties":{"type":{"type":"string","const":"url","description":"Always `url`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.1.type","typeLabel":"string"},"url":{"type":"string","description":"URL of the image to fetch.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.1.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.1","typeLabel":"object"},{"type":"object","description":"The source of the image data.","required":["file_id","type"],"properties":{"file_id":{"type":"string","description":"ID of a previously uploaded file.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.2.file_id","typeLabel":"string"},"type":{"type":"string","const":"file","description":"Always `file`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.2.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source.oneOf.2","typeLabel":"object"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.source","typeLabel":"object"},"type":{"type":"string","const":"image","description":"Always `image`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1.type","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","description":"Document content, either specified directly as base64 data, as text, or as a reference via a URL.","required":["source","type"],"properties":{"source":{"oneOf":[{"type":"object","description":"The source of the document data.","required":["data","media_type","type"],"properties":{"data":{"type":"string","description":"Base64-encoded document data.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.0.data","typeLabel":"string"},"media_type":{"type":"string","description":"MIME type of the document (e.g., \"application/pdf\").","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.0.media_type","typeLabel":"string"},"type":{"type":"string","const":"base64","description":"Always `base64`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.0.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.0","typeLabel":"object"},{"type":"object","description":"The source of the document data.","required":["data","media_type","type"],"properties":{"data":{"type":"string","description":"The plain text content.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.1.data","typeLabel":"string"},"media_type":{"type":"string","const":"text/plain","description":"MIME type of the text content. Must be \"text/plain\".","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.1.media_type","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.1.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.1","typeLabel":"object"},{"type":"object","description":"The source of the document data.","required":["type","url"],"properties":{"type":{"type":"string","const":"url","description":"Always `url`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.2.type","typeLabel":"string"},"url":{"type":"string","description":"URL of the document to fetch.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.2.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.2","typeLabel":"object"},{"type":"object","description":"The source of the document data.","required":["file_id","type"],"properties":{"file_id":{"type":"string","description":"ID of a previously uploaded file.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.3.file_id","typeLabel":"string"},"type":{"type":"string","const":"file","description":"Always `file`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.3.type","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.source","typeLabel":"object"},"type":{"type":"string","const":"document","description":"Always `document`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.type","typeLabel":"string"},"context":{"oneOf":[{"type":"string","description":"Additional context about the document for the model.","uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.context.oneOf.0","typeLabel":"string"},{"type":"null","description":"Additional context about the document for the model.","uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.context.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.context","typeLabel":"string | null"},"title":{"oneOf":[{"type":"string","description":"The title of the document.","uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.title.oneOf.0","typeLabel":"string"},{"type":"null","description":"The title of the document.","uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.title.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2.title","typeLabel":"string | null"}},"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","description":"A block containing a web search result.","required":["citations","content","source","title","type"],"properties":{"citations":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether citations are enabled for this search result.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3.citations.enabled","typeLabel":"boolean"}},"required":["enabled"],"description":"Citation settings for this search result.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3.citations","typeLabel":"object"},"content":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3.content.items.[INDEX].text","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3.content.items.[INDEX].type","typeLabel":"string"}},"required":["text","type"],"description":"Text content within a search result.","uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3.content.items.[INDEX]","typeLabel":"object"},"description":"Array of text content blocks from the search result.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3.content","typeLabel":"object[]"},"source":{"type":"string","description":"The URL source of the search result.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3.source","typeLabel":"string"},"title":{"type":"string","description":"The title of the search result.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3.title","typeLabel":"string"},"type":{"type":"string","const":"search_result","description":"Always `search_result`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3.type","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX].oneOf.3","typeLabel":"object"}],"uniqueKey":"data.items.[INDEX].oneOf.5.content.items.[INDEX]","typeLabel":"object"},"description":"The result content returned by the tool.","uniqueKey":"data.items.[INDEX].oneOf.5.content","typeLabel":"object[]"},"is_error":{"oneOf":[{"type":"boolean","description":"Whether the tool execution resulted in an error.","uniqueKey":"data.items.[INDEX].oneOf.5.is_error.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether the tool execution resulted in an error.","uniqueKey":"data.items.[INDEX].oneOf.5.is_error.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].oneOf.5.is_error","typeLabel":"boolean | null"},"processed_at":{"oneOf":[{"type":"string","description":"Timestamp when this result was processed.","uniqueKey":"data.items.[INDEX].oneOf.5.processed_at.oneOf.0","typeLabel":"string"},{"type":"null","description":"Timestamp when this result was processed.","uniqueKey":"data.items.[INDEX].oneOf.5.processed_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].oneOf.5.processed_at","typeLabel":"string | null"},"session_thread_id":{"oneOf":[{"type":"string","description":"Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread.","uniqueKey":"data.items.[INDEX].oneOf.5.session_thread_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread.","uniqueKey":"data.items.[INDEX].oneOf.5.session_thread_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].oneOf.5.session_thread_id","typeLabel":"string | null"}},"uniqueKey":"data.items.[INDEX].oneOf.5","typeLabel":"object"},{"type":"object","description":"A mid-conversation system message event. Carries system-role content that is appended to the session as a `role: \"system\"` turn.","required":["id","content","type"],"properties":{"id":{"type":"string","description":"Unique identifier for this event.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.6.id","typeLabel":"string"},"content":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"The text content.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.6.content.items.[INDEX].text","typeLabel":"string"},"type":{"type":"string","const":"text","description":"Always `text`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.6.content.items.[INDEX].type","typeLabel":"string"}},"required":["text","type"],"description":"Content block in a mid-conversation system message. Text-only.","uniqueKey":"data.items.[INDEX].oneOf.6.content.items.[INDEX]","typeLabel":"object"},"description":"System content blocks. Text-only.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.6.content","typeLabel":"object[]"},"type":{"type":"string","const":"system.message","description":"Always `system.message`.","isRequired":true,"uniqueKey":"data.items.[INDEX].oneOf.6.type","typeLabel":"string"},"processed_at":{"oneOf":[{"type":"string","description":"Timestamp when this system message was processed.","uniqueKey":"data.items.[INDEX].oneOf.6.processed_at.oneOf.0","typeLabel":"string"},{"type":"null","description":"Timestamp when this system message was processed.","uniqueKey":"data.items.[INDEX].oneOf.6.processed_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].oneOf.6.processed_at","typeLabel":"string | null"}},"uniqueKey":"data.items.[INDEX].oneOf.6","typeLabel":"object"}],"uniqueKey":"data.items.[INDEX]","typeLabel":"object"},"description":"The events of the request as stored, in order, each with its `id`, `bma_sequence` and (for a `user.message`) `bma_input_id`; `processed_at` is absent until the event is processed.","uniqueKey":"data","typeLabel":"object[]"}},"description":"Events that were successfully sent to the session.","uniqueKey":"","typeLabel":"object"},"example":{"data":[{"type":"user.message","id":"sevt_agray4o575y3liuohu6axeow6y","content":[{"type":"text","text":"Draft the Q3 revenue summary from data/q3.csv."}],"bma_sequence":1,"bma_input_id":"ain_agray4o575y4la2ja6nv6pfacu"}]},"examples":{"Example":{"title":"Example","value":{"data":[{"type":"user.message","id":"sevt_agray4o575y3liuohu6axeow6y","content":[{"type":"text","text":"Draft the Q3 revenue summary from data/q3.csv."}],"bma_sequence":1,"bma_input_id":"ain_agray4o575y4la2ja6nv6pfacu"}]}}},"exampleType":"examples"}},"exampleType":"examples"},"98cacf06-ea3b-4ee5-9995-55d8d992569a":{"description":"Anthropic error envelope.","content":{"application/json":{"schema":{"type":"object","x-bma-official-shape":"ErrorResponse","x-bma-official-fields":["type","error","request_id"],"description":"The error envelope of every failed request.","required":["type","error"],"properties":{"type":{"const":"error","description":"Always `error`.","isRequired":true,"uniqueKey":"type","typeLabel":"any"},"error":{"type":"object","description":"What went wrong.","required":["type","message"],"properties":{"type":{"type":"string","description":"The error class, which fixes the HTTP status (for example `not_found_error` for 404).","enum":["invalid_request_error","authentication_error","permission_error","billing_error","not_found_error","conflict_error","request_too_large","rate_limit_error","api_error","timeout_error","overloaded_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable explanation; its wording may change, so branch on `code`.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"code":{"type":"string","description":"Stable snake_case reason ([error codes](https://docs.beeos.ai/api-reference/errors)); absent when the error has none. BMA repeats it as `bma_error_code`.","uniqueKey":"error.code","typeLabel":"string"},"bma_error_code":{"type":"string","description":"The same value as `code`, present whenever `code` is (BMA extension).","uniqueKey":"error.bma_error_code","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"ID of the request, to quote when reporting a problem.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"error","error":{"type":"invalid_request_error","message":"\u003cstring>","code":"\u003cstring>","bma_error_code":"\u003cstring>"},"request_id":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"f1406c36-889d-46ad-b458-4e134266b196":{"description":"Anthropic error envelope.","content":{"application/json":{"schema":{"type":"object","x-bma-official-shape":"ErrorResponse","x-bma-official-fields":["type","error","request_id"],"description":"The error envelope of every failed request.","required":["type","error"],"properties":{"type":{"const":"error","description":"Always `error`.","isRequired":true,"uniqueKey":"type","typeLabel":"any"},"error":{"type":"object","description":"What went wrong.","required":["type","message"],"properties":{"type":{"type":"string","description":"The error class, which fixes the HTTP status (for example `not_found_error` for 404).","enum":["invalid_request_error","authentication_error","permission_error","billing_error","not_found_error","conflict_error","request_too_large","rate_limit_error","api_error","timeout_error","overloaded_error"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable explanation; its wording may change, so branch on `code`.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"code":{"type":"string","description":"Stable snake_case reason ([error codes](https://docs.beeos.ai/api-reference/errors)); absent when the error has none. BMA repeats it as `bma_error_code`.","uniqueKey":"error.code","typeLabel":"string"},"bma_error_code":{"type":"string","description":"The same value as `code`, present whenever `code` is (BMA extension).","uniqueKey":"error.bma_error_code","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"ID of the request, to quote when reporting a problem.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"error","error":{"type":"invalid_request_error","message":"\u003cstring>","code":"\u003cstring>","bma_error_code":"\u003cstring>"},"request_id":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"a7a05916-0e8d-41df-b94e-ca8691ee2568":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","scopes":[],"schemeName":"apiKey"}},"6e714eac-c5f9-497c-947a-aeaa7d4f124d":{"bearer":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"bearer"}}},"servers":{"aab6fce6-43f5-423b-92da-bb742711199d":{"url":"https://api.beeos.ai","description":"Production"},"f34f48fd-3007-467d-9d05-2d18bb2f0252":{"url":"http://127.0.0.1:58080","description":"Self-hosted (docker compose quickstart)"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","scopes":[],"schemeName":"apiKey"},"schema":{"title":"x-api-key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"apiKey","name":"x-api-key"}],"title":"apiKey"},{"schemes":[{"scheme":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"bearer"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearer","name":"Authorization"}],"title":"bearer"}]},"originalFileLocation":"api-reference/bma.openapi.yaml"},"subdomain":"localhost","siteName":"BMA Developer Docs","title":"Send Events - BMA Developer Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/endpoints/sessions/send-events","matchLevel":0},"zh":{"href":"/zh/api-reference/endpoints/sessions/send-events","matchLevel":1},"zh-Hant":{"href":"/zh-hant/api-reference/endpoints/sessions/send-events","matchLevel":1},"ja":{"href":"/ja/api-reference/endpoints/sessions/send-events","matchLevel":1},"ko":{"href":"/ko/api-reference/endpoints/sessions/send-events","matchLevel":1}}},"originalFileLocation":"api-reference/endpoints/sessions/send-events.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Sends events to a session and returns them as stored, in order. A user.message starts a turn (queued behind an open one, or handed to the running turn when it asks for steering with BMA\u0026#x27;s bma_delivery_mode); a user.interrupt cancels the open turn and is marked processed when that turn has ended (with no open turn it is recorded with bma_interrupt_outcome: no_active_turn); user.tool_confirmation and user.custom_tool_result answer a call the turn waits for, and the last answer resumes it. Turns run asynchronously: follow them with the event stream or list. user.define_outcome, user.tool_result and system.message are refused with 400. Repeating an answer that was already accepted returns it again without a second effect. Send an Idempotency-Key to make retries safe (the same key and body replay the first answer); without a key, an official SDK retry of the same body within 10 minutes is merged with the first request. An archived session answers 409 conflict_error. Authorization: Organization API key (x-api-key: bma_org_v1_…), personal access token (Authorization: Bearer bma_pat_v1_…), OAuth access token or signed-in dashboard session; a user credential names its organization with bma-organization-id. The request acts in one workspace: the one named by bma-workspace-id (or anthropic-workspace-id; when both are sent they must agree), else the credential\u0026#x27;s default workspace (an API key\u0026#x27;s own workspace, else its organization\u0026#x27;s Default workspace), else the only workspace the credential can use. The caller\u0026#x27;s workspace role must be admin, developer or operator (viewer is refused); organization owners and admins act as workspace admins in every workspace of their organization. Limits: - Request body: at most 32 MiB (33,554,432 bytes). - Idempotency-Key: 1 to 255 visible ASCII characters; a completed key replays its answer for 24 hours; a key whose request is still running blocks the key for at most 10 minutes. - A steering user.message: content at most 40 KiB. - A user.bma_controlled_message: at most 10 selected skills, each SKILL.md at most 64 KiB, 256 KiB in total. - Rate limit: one request of the organization\u0026#x27;s write budget (Rate limits). Errors (besides the common errors (401 authentication, 429 rate_limited, 500)): | Status | error.type | error.code | Cause | Fix | | --- | --- | --- | --- | --- | | 400 | invalid_request_error | idempotency_key_reused | The Idempotency-Key was used in the last 24 hours with a different request. | Correct the request as the message describes and send it again; the same request will keep failing. | | 400 | invalid_request_error | invalid_idempotency_key | Idempotency-Key is not 1 to 255 visible ASCII characters. | Correct the request as the message describes and send it again; the same request will keep failing. | | 400 | invalid_request_error | invalid_json | The body cannot be read or is not a JSON object. | Correct the request as the message describes and send it again; the same request will keep failing. | | 400 | invalid_request_error | organization_required | A user credential (personal access token, OAuth token, dashboard session) names no organization. | Name the organization with the bma-organization-id header. | | 400 | invalid_request_error | project_required | The credential can use several workspaces and the request names none. | Name the workspace with the bma-workspace-id header. | | 400 | invalid_request_error | workspace_id_conflict | bma-workspace-id and anthropic-workspace-id name different workspaces. | Correct the request as the message describes and send it again; the same request will keep failing. | | 403 | permission_error | permission_denied | The caller\u0026#x27;s workspace role is viewer, which may read sessions but not change them. | Use a credential with the required role or access; retrying with the same credential will not help. | | 404 | not_found_error | skill_not_found | A skill selected by a user.bma_controlled_message is no longer readable by the workspace. | Check the ID and the organization or workspace it belongs to; do not retry the same request. | | 404 | not_found_error | skill_version_not_found | A skill revision selected by a user.bma_controlled_message no longer exists. | Check the ID and the organization or workspace it belongs to; do not retry the same request. | | 409 | conflict_error | confirmation_closed | The user.tool_confirmation answers a prompt whose turn closed without a decision. | Re-read the resource, resolve the conflicting state, then send the request again. | | 409 | conflict_error | custom_tool_use_closed | The user.custom_tool_result answers a custom tool call whose turn closed without a result. | Re-read the resource, resolve the conflicting state, then send the request again. | | 409 | conflict_error | idempotency_key_in_use | A request with the same Idempotency-Key is still being processed. | Retry after a short delay; the first request\u0026#x27;s answer is replayed once it completes. | | 409 | conflict_error | interaction_withdrawn | The executor withdrew the interaction of this tool_use_id. | Re-read the resource, resolve the conflicting state, then send the request again. | | 413 | request_too_large | request_too_large | The body is larger than 32 MiB. | Reduce the size of the request body or upload in smaller parts. |\">\u003cmeta data-mint-head name=\"application-name\" content=\"BMA Developer Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/favicons/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/favicons/favicon-32x32.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/favicons/favicon-16x16.png\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/favicons/favicon.ico\">\u003cmeta data-mint-head property=\"og:title\" content=\"Send Events - BMA Developer Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Sends events to a session and returns them as stored, in order. A user.message starts a turn (queued behind an open one, or handed to the running turn when it asks for steering with BMA\u0026#x27;s bma_delivery_mode); a user.interrupt cancels the open turn and is marked processed when that turn has ended (with no open turn it is recorded with bma_interrupt_outcome: no_active_turn); user.tool_confirmation and user.custom_tool_result answer a call the turn waits for, and the last answer resumes it. Turns run asynchronously: follow them with the event stream or list. user.define_outcome, user.tool_result and system.message are refused with 400. Repeating an answer that was already accepted returns it again without a second effect. Send an Idempotency-Key to make retries safe (the same key and body replay the first answer); without a key, an official SDK retry of the same body within 10 minutes is merged with the first request. An archived session answers 409 conflict_error. Authorization: Organization API key (x-api-key: bma_org_v1_…), personal access token (Authorization: Bearer bma_pat_v1_…), OAuth access token or signed-in dashboard session; a user credential names its organization with bma-organization-id. The request acts in one workspace: the one named by bma-workspace-id (or anthropic-workspace-id; when both are sent they must agree), else the credential\u0026#x27;s default workspace (an API key\u0026#x27;s own workspace, else its organization\u0026#x27;s Default workspace), else the only workspace the credential can use. The caller\u0026#x27;s workspace role must be admin, developer or operator (viewer is refused); organization owners and admins act as workspace admins in every workspace of their organization. Limits: - Request body: at most 32 MiB (33,554,432 bytes). - Idempotency-Key: 1 to 255 visible ASCII characters; a completed key replays its answer for 24 hours; a key whose request is still running blocks the key for at most 10 minutes. - A steering user.message: content at most 40 KiB. - A user.bma_controlled_message: at most 10 selected skills, each SKILL.md at most 64 KiB, 256 KiB in total. - Rate limit: one request of the organization\u0026#x27;s write budget (Rate limits). Errors (besides the common errors (401 authentication, 429 rate_limited, 500)): | Status | error.type | error.code | Cause | Fix | | --- | --- | --- | --- | --- | | 400 | invalid_request_error | idempotency_key_reused | The Idempotency-Key was used in the last 24 hours with a different request. | Correct the request as the message describes and send it again; the same request will keep failing. | | 400 | invalid_request_error | invalid_idempotency_key | Idempotency-Key is not 1 to 255 visible ASCII characters. | Correct the request as the message describes and send it again; the same request will keep failing. | | 400 | invalid_request_error | invalid_json | The body cannot be read or is not a JSON object. | Correct the request as the message describes and send it again; the same request will keep failing. | | 400 | invalid_request_error | organization_required | A user credential (personal access token, OAuth token, dashboard session) names no organization. | Name the organization with the bma-organization-id header. | | 400 | invalid_request_error | project_required | The credential can use several workspaces and the request names none. | Name the workspace with the bma-workspace-id header. | | 400 | invalid_request_error | workspace_id_conflict | bma-workspace-id and anthropic-workspace-id name different workspaces. | Correct the request as the message describes and send it again; the same request will keep failing. | | 403 | permission_error | permission_denied | The caller\u0026#x27;s workspace role is viewer, which may read sessions but not change them. | Use a credential with the required role or access; retrying with the same credential will not help. | | 404 | not_found_error | skill_not_found | A skill selected by a user.bma_controlled_message is no longer readable by the workspace. | Check the ID and the organization or workspace it belongs to; do not retry the same request. | | 404 | not_found_error | skill_version_not_found | A skill revision selected by a user.bma_controlled_message no longer exists. | Check the ID and the organization or workspace it belongs to; do not retry the same request. | | 409 | conflict_error | confirmation_closed | The user.tool_confirmation answers a prompt whose turn closed without a decision. | Re-read the resource, resolve the conflicting state, then send the request again. | | 409 | conflict_error | custom_tool_use_closed | The user.custom_tool_result answers a custom tool call whose turn closed without a result. | Re-read the resource, resolve the conflicting state, then send the request again. | | 409 | conflict_error | idempotency_key_in_use | A request with the same Idempotency-Key is still being processed. | Retry after a short delay; the first request\u0026#x27;s answer is replayed once it completes. | | 409 | conflict_error | interaction_withdrawn | The executor withdrew the interaction of this tool_use_id. | Re-read the resource, resolve the conflicting state, then send the request again. | | 413 | request_too_large | request_too_large | The body is larger than 32 MiB. | Reduce the size of the request body or upload in smaller parts. |\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"BMA Developer Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://local./api-reference/endpoints/sessions/send-events\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Send Events - BMA Developer Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Sends events to a session and returns them as stored, in order. A user.message starts a turn (queued behind an open one, or handed to the running turn when it asks for steering with BMA\u0026#x27;s bma_delivery_mode); a user.interrupt cancels the open turn and is marked processed when that turn has ended (with no open turn it is recorded with bma_interrupt_outcome: no_active_turn); user.tool_confirmation and user.custom_tool_result answer a call the turn waits for, and the last answer resumes it. Turns run asynchronously: follow them with the event stream or list. user.define_outcome, user.tool_result and system.message are refused with 400. Repeating an answer that was already accepted returns it again without a second effect. Send an Idempotency-Key to make retries safe (the same key and body replay the first answer); without a key, an official SDK retry of the same body within 10 minutes is merged with the first request. An archived session answers 409 conflict_error. Authorization: Organization API key (x-api-key: bma_org_v1_…), personal access token (Authorization: Bearer bma_pat_v1_…), OAuth access token or signed-in dashboard session; a user credential names its organization with bma-organization-id. The request acts in one workspace: the one named by bma-workspace-id (or anthropic-workspace-id; when both are sent they must agree), else the credential\u0026#x27;s default workspace (an API key\u0026#x27;s own workspace, else its organization\u0026#x27;s Default workspace), else the only workspace the credential can use. The caller\u0026#x27;s workspace role must be admin, developer or operator (viewer is refused); organization owners and admins act as workspace admins in every workspace of their organization. Limits: - Request body: at most 32 MiB (33,554,432 bytes). - Idempotency-Key: 1 to 255 visible ASCII characters; a completed key replays its answer for 24 hours; a key whose request is still running blocks the key for at most 10 minutes. - A steering user.message: content at most 40 KiB. - A user.bma_controlled_message: at most 10 selected skills, each SKILL.md at most 64 KiB, 256 KiB in total. - Rate limit: one request of the organization\u0026#x27;s write budget (Rate limits). Errors (besides the common errors (401 authentication, 429 rate_limited, 500)): | Status | error.type | error.code | Cause | Fix | | --- | --- | --- | --- | --- | | 400 | invalid_request_error | idempotency_key_reused | The Idempotency-Key was used in the last 24 hours with a different request. | Correct the request as the message describes and send it again; the same request will keep failing. | | 400 | invalid_request_error | invalid_idempotency_key | Idempotency-Key is not 1 to 255 visible ASCII characters. | Correct the request as the message describes and send it again; the same request will keep failing. | | 400 | invalid_request_error | invalid_json | The body cannot be read or is not a JSON object. | Correct the request as the message describes and send it again; the same request will keep failing. | | 400 | invalid_request_error | organization_required | A user credential (personal access token, OAuth token, dashboard session) names no organization. | Name the organization with the bma-organization-id header. | | 400 | invalid_request_error | project_required | The credential can use several workspaces and the request names none. | Name the workspace with the bma-workspace-id header. | | 400 | invalid_request_error | workspace_id_conflict | bma-workspace-id and anthropic-workspace-id name different workspaces. | Correct the request as the message describes and send it again; the same request will keep failing. | | 403 | permission_error | permission_denied | The caller\u0026#x27;s workspace role is viewer, which may read sessions but not change them. | Use a credential with the required role or access; retrying with the same credential will not help. | | 404 | not_found_error | skill_not_found | A skill selected by a user.bma_controlled_message is no longer readable by the workspace. | Check the ID and the organization or workspace it belongs to; do not retry the same request. | | 404 | not_found_error | skill_version_not_found | A skill revision selected by a user.bma_controlled_message no longer exists. | Check the ID and the organization or workspace it belongs to; do not retry the same request. | | 409 | conflict_error | confirmation_closed | The user.tool_confirmation answers a prompt whose turn closed without a decision. | Re-read the resource, resolve the conflicting state, then send the request again. | | 409 | conflict_error | custom_tool_use_closed | The user.custom_tool_result answers a custom tool call whose turn closed without a result. | Re-read the resource, resolve the conflicting state, then send the request again. | | 409 | conflict_error | idempotency_key_in_use | A request with the same Idempotency-Key is still being processed. | Retry after a short delay; the first request\u0026#x27;s answer is replayed once it completes. | | 409 | conflict_error | interaction_withdrawn | The executor withdrew the interaction of this tool_use_id. | Re-read the resource, resolve the conflicting state, then send the request again. | | 413 | request_too_large | request_too_large | The body is larger than 32 MiB. | Reduce the size of the request body or upload in smaller parts. |\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/favicons/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"BMA Developer Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#F97316\">\u003clink data-mint-head rel=\"canonical\" href=\"https://local./api-reference/endpoints/sessions/send-events\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoints/sessions/send-events.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://local./api-reference/endpoints/sessions/send-events\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://local./zh/api-reference/endpoints/sessions/send-events\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hant\" href=\"https://local./zh-hant/api-reference/endpoints/sessions/send-events\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://local./ja/api-reference/endpoints/sessions/send-events\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ko\" href=\"https://local./ko/api-reference/endpoints/sessions/send-events\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://local./api-reference/endpoints/sessions/send-events\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"BMA Developer Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"BMA Developer Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/endpoints/sessions/send-events.md","siteName":"BMA Developer Docs","nav":{"languages":[{"language":"en","default":true,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks/overview"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli/getting-started"}]},{"tab":"API reference","groups":[{"group":"API reference","pages":[{"title":"API reference","icon":"book","href":"/api-reference/introduction"}]},{"group":"bma-sdk","pages":[{"title":"bma-sdk HTTP API","sidebarTitle":"HTTP API overview","icon":"globe","href":"/api-reference/bma-sdk/overview"},{"title":"Errors","href":"/api-reference/errors"},{"title":"Use the official Anthropic SDK","sidebarTitle":"Anthropic SDK","icon":"scale-balanced","href":"/compatibility"},{"group":"Endpoints","expanded":true,"pages":[{"group":"Agents","pages":[{"title":"List Agents","openapi":"/api-reference/bma.openapi.yaml get /v1/agents","href":"/api-reference/endpoints/agents/list-agents"},{"title":"Create Agent","openapi":"/api-reference/bma.openapi.yaml post /v1/agents","href":"/api-reference/endpoints/agents/create-agent"},{"title":"Get Agent","openapi":"/api-reference/bma.openapi.yaml get /v1/agents/{agent_id}","href":"/api-reference/endpoints/agents/get-agent"},{"title":"Update Agent","openapi":"/api-reference/bma.openapi.yaml post /v1/agents/{agent_id}","href":"/api-reference/endpoints/agents/update-agent"},{"title":"Archive Agent","openapi":"/api-reference/bma.openapi.yaml post /v1/agents/{agent_id}/archive","href":"/api-reference/endpoints/agents/archive-agent"},{"title":"List agent versions","openapi":"/api-reference/bma.openapi.yaml get /v1/agents/{agent_id}/versions","href":"/api-reference/endpoints/agents/list-agent-versions"}]},{"group":"Desktop sessions","pages":[{"title":"Create a desktop session","openapi":"/api-reference/bma.openapi.yaml post /v1/desktop_sessions","href":"/api-reference/endpoints/desktop-sessions/create-a-desktop-session"},{"title":"Retrieve a desktop session (control state in `control`)","openapi":"/api-reference/bma.openapi.yaml get /v1/desktop_sessions/{desktop_session_id}","href":"/api-reference/endpoints/desktop-sessions/retrieve-a-desktop-session-control-state-in-`control`"},{"title":"Take input control","openapi":"/api-reference/bma.openapi.yaml post /v1/desktop_sessions/{desktop_session_id}/acquire_control","href":"/api-reference/endpoints/desktop-sessions/take-input-control"},{"title":"Send input actions","openapi":"/api-reference/bma.openapi.yaml post /v1/desktop_sessions/{desktop_session_id}/actions","href":"/api-reference/endpoints/desktop-sessions/send-input-actions"},{"title":"Close a desktop session","openapi":"/api-reference/bma.openapi.yaml post /v1/desktop_sessions/{desktop_session_id}/close","href":"/api-reference/endpoints/desktop-sessions/close-a-desktop-session"},{"title":"Hand control back to the agent","openapi":"/api-reference/bma.openapi.yaml post /v1/desktop_sessions/{desktop_session_id}/handback_control","href":"/api-reference/endpoints/desktop-sessions/hand-control-back-to-the-agent"},{"title":"Extend the running screen capture's keepalive deadline","openapi":"/api-reference/bma.openapi.yaml post /v1/desktop_sessions/{desktop_session_id}/keepalive","href":"/api-reference/endpoints/desktop-sessions/extend-the-running-screen-captures-keepalive-deadline"},{"title":"Release control","openapi":"/api-reference/bma.openapi.yaml post /v1/desktop_sessions/{desktop_session_id}/release_control","href":"/api-reference/endpoints/desktop-sessions/release-control"},{"title":"Renew the control lease","openapi":"/api-reference/bma.openapi.yaml post /v1/desktop_sessions/{desktop_session_id}/renew_control","href":"/api-reference/endpoints/desktop-sessions/renew-the-control-lease"},{"title":"Capture a screenshot","openapi":"/api-reference/bma.openapi.yaml post /v1/desktop_sessions/{desktop_session_id}/screenshot","href":"/api-reference/endpoints/desktop-sessions/capture-a-screenshot"},{"title":"Mint a desktop watch credential","openapi":"/api-reference/bma.openapi.yaml post /v1/desktop_sessions/{desktop_session_id}/tickets","href":"/api-reference/endpoints/desktop-sessions/mint-a-desktop-watch-credential"},{"title":"Revoke a screen capture viewer and confirm its connections are closed","openapi":"/api-reference/bma.openapi.yaml post /v1/desktop_sessions/{desktop_session_id}/viewers/{viewer}/revoke","href":"/api-reference/endpoints/desktop-sessions/revoke-a-screen-capture-viewer-and-confirm-its-connections-are-closed"}]},{"group":"Environments","pages":[{"title":"List environments with pagination support.","openapi":"/api-reference/bma.openapi.yaml get /v1/environments","href":"/api-reference/endpoints/environments/list-environments-with-pagination-support"},{"title":"Create a new environment with the specified configuration.","openapi":"/api-reference/bma.openapi.yaml post /v1/environments","href":"/api-reference/endpoints/environments/create-a-new-environment-with-the-specified-configuration"},{"title":"Retrieve a specific environment by ID.","openapi":"/api-reference/bma.openapi.yaml get /v1/environments/{environment_id}","href":"/api-reference/endpoints/environments/retrieve-a-specific-environment-by-id"},{"title":"Update an existing environment's configuration.","openapi":"/api-reference/bma.openapi.yaml post /v1/environments/{environment_id}","href":"/api-reference/endpoints/environments/update-an-existing-environments-configuration"},{"title":"Delete an environment by ID. Returns a confirmation of the deletion.","openapi":"/api-reference/bma.openapi.yaml delete /v1/environments/{environment_id}","href":"/api-reference/endpoints/environments/delete-an-environment-by-id-returns-a-confirmation-of-the-deletion"},{"title":"Archive an environment by ID. Archived environments cannot be used to create new","openapi":"/api-reference/bma.openapi.yaml post /v1/environments/{environment_id}/archive","href":"/api-reference/endpoints/environments/archive-an-environment-by-id-archived-environments-cannot-be-used-to-create-new"}]},{"group":"Files","pages":[{"title":"List Files","openapi":"/api-reference/bma.openapi.yaml get /v1/files","href":"/api-reference/endpoints/files/list-files"},{"title":"Upload File","openapi":"/api-reference/bma.openapi.yaml post /v1/files","href":"/api-reference/endpoints/files/upload-file"},{"title":"Get File Metadata","openapi":"/api-reference/bma.openapi.yaml get /v1/files/{file_id}","href":"/api-reference/endpoints/files/get-file-metadata"},{"title":"Delete File","openapi":"/api-reference/bma.openapi.yaml delete /v1/files/{file_id}","href":"/api-reference/endpoints/files/delete-file"},{"title":"Download File","openapi":"/api-reference/bma.openapi.yaml get /v1/files/{file_id}/content","href":"/api-reference/endpoints/files/download-file"}]},{"group":"Machine pools","pages":[{"title":"List machine pools","openapi":"/api-reference/bma.openapi.yaml get /v1/machine_pools","href":"/api-reference/endpoints/machine-pools/list-machine-pools"},{"title":"Create a machine pool","openapi":"/api-reference/bma.openapi.yaml post /v1/machine_pools","href":"/api-reference/endpoints/machine-pools/create-a-machine-pool"},{"title":"Retrieve a machine pool","openapi":"/api-reference/bma.openapi.yaml get /v1/machine_pools/{pool_id}","href":"/api-reference/endpoints/machine-pools/retrieve-a-machine-pool"},{"title":"Update a machine pool","openapi":"/api-reference/bma.openapi.yaml post /v1/machine_pools/{pool_id}","href":"/api-reference/endpoints/machine-pools/update-a-machine-pool"},{"title":"Delete a machine pool","openapi":"/api-reference/bma.openapi.yaml delete /v1/machine_pools/{pool_id}","href":"/api-reference/endpoints/machine-pools/delete-a-machine-pool"},{"title":"List the pool grants of a project","openapi":"/api-reference/bma.openapi.yaml get /v1/machine_pools/{pool_id}/grants","href":"/api-reference/endpoints/machine-pools/list-the-pool-grants-of-a-project"},{"title":"Retrieve a pool grant","openapi":"/api-reference/bma.openapi.yaml get /v1/machine_pools/{pool_id}/grants/{grant_id}","href":"/api-reference/endpoints/machine-pools/retrieve-a-pool-grant"}]},{"group":"Machines","pages":[{"title":"List machines","openapi":"/api-reference/bma.openapi.yaml get /v1/machines","href":"/api-reference/endpoints/machines/list-machines"},{"title":"Create a machine","openapi":"/api-reference/bma.openapi.yaml post /v1/machines","href":"/api-reference/endpoints/machines/create-a-machine"},{"title":"Retrieve a machine","openapi":"/api-reference/bma.openapi.yaml get /v1/machines/{machine_id}","href":"/api-reference/endpoints/machines/retrieve-a-machine"},{"title":"Update a machine","openapi":"/api-reference/bma.openapi.yaml post /v1/machines/{machine_id}","href":"/api-reference/endpoints/machines/update-a-machine"},{"title":"Delete a machine","openapi":"/api-reference/bma.openapi.yaml delete /v1/machines/{machine_id}","href":"/api-reference/endpoints/machines/delete-a-machine"},{"title":"Bind an agent to a machine","openapi":"/api-reference/bma.openapi.yaml put /v1/machines/{machine_id}/agents/{agent_id}","href":"/api-reference/endpoints/machines/bind-an-agent-to-a-machine"},{"title":"Unbind an agent from a machine","openapi":"/api-reference/bma.openapi.yaml delete /v1/machines/{machine_id}/agents/{agent_id}","href":"/api-reference/endpoints/machines/unbind-an-agent-from-a-machine"},{"title":"List a machine's backups","openapi":"/api-reference/bma.openapi.yaml get /v1/machines/{machine_id}/backups","href":"/api-reference/endpoints/machines/list-a-machines-backups"},{"title":"Machine interaction capabilities","openapi":"/api-reference/bma.openapi.yaml get /v1/machines/{machine_id}/capabilities","href":"/api-reference/endpoints/machines/machine-interaction-capabilities"},{"title":"List executor tokens","openapi":"/api-reference/bma.openapi.yaml get /v1/machines/{machine_id}/executor_tokens","href":"/api-reference/endpoints/machines/list-executor-tokens"},{"title":"Create an executor token","openapi":"/api-reference/bma.openapi.yaml post /v1/machines/{machine_id}/executor_tokens","href":"/api-reference/endpoints/machines/create-an-executor-token"},{"title":"Revoke an executor token","openapi":"/api-reference/bma.openapi.yaml post /v1/machines/{machine_id}/executor_tokens/{token_id}/revoke","href":"/api-reference/endpoints/machines/revoke-an-executor-token"},{"title":"Pause a running machine","openapi":"/api-reference/bma.openapi.yaml post /v1/machines/{machine_id}/pause","href":"/api-reference/endpoints/machines/pause-a-running-machine"},{"title":"Rebuild a machine from a backup","openapi":"/api-reference/bma.openapi.yaml post /v1/machines/{machine_id}/restore","href":"/api-reference/endpoints/machines/rebuild-a-machine-from-a-backup"},{"title":"Resume a paused machine","openapi":"/api-reference/bma.openapi.yaml post /v1/machines/{machine_id}/resume","href":"/api-reference/endpoints/machines/resume-a-paused-machine"}]},{"group":"MCP OAuth","pages":[{"title":"Start an MCP OAuth authorization","openapi":"/api-reference/bma.openapi.yaml post /v1/mcp_oauth_authorizations","href":"/api-reference/endpoints/mcp-oauth/start-an-mcp-oauth-authorization"},{"title":"Get an MCP OAuth authorization","openapi":"/api-reference/bma.openapi.yaml get /v1/mcp_oauth_authorizations/{authorization_id}","href":"/api-reference/endpoints/mcp-oauth/get-an-mcp-oauth-authorization"},{"title":"Complete an MCP OAuth authorization","openapi":"/api-reference/bma.openapi.yaml post /v1/mcp_oauth/callback","href":"/api-reference/endpoints/mcp-oauth/complete-an-mcp-oauth-authorization"}]},{"group":"Organizations \u0026 workspaces","pages":[{"title":"List the invites sent to me","openapi":"/api-reference/bma.openapi.yaml get /v1/me/invites","href":"/api-reference/endpoints/organizations-\u0026-workspaces/list-the-invites-sent-to-me"},{"title":"Accept an invite","openapi":"/api-reference/bma.openapi.yaml post /v1/me/invites/{invite_id}/accept","href":"/api-reference/endpoints/organizations-\u0026-workspaces/accept-an-invite"},{"title":"Decline an invite","openapi":"/api-reference/bma.openapi.yaml post /v1/me/invites/{invite_id}/decline","href":"/api-reference/endpoints/organizations-\u0026-workspaces/decline-an-invite"},{"title":"Create an organization","openapi":"/api-reference/bma.openapi.yaml post /v1/me/organizations","href":"/api-reference/endpoints/organizations-\u0026-workspaces/create-an-organization"},{"title":"List my personal access tokens","openapi":"/api-reference/bma.openapi.yaml get /v1/me/personal_access_tokens","href":"/api-reference/endpoints/organizations-\u0026-workspaces/list-my-personal-access-tokens"},{"title":"Create a personal access token","openapi":"/api-reference/bma.openapi.yaml post /v1/me/personal_access_tokens","href":"/api-reference/endpoints/organizations-\u0026-workspaces/create-a-personal-access-token"},{"title":"Revoke a personal access token","openapi":"/api-reference/bma.openapi.yaml post /v1/me/personal_access_tokens/{token_id}/revoke","href":"/api-reference/endpoints/organizations-\u0026-workspaces/revoke-a-personal-access-token"},{"title":"List API Keys","openapi":"/api-reference/bma.openapi.yaml get /v1/organizations/api_keys","href":"/api-reference/endpoints/organizations-\u0026-workspaces/list-api-keys"},{"title":"Create an API key","openapi":"/api-reference/bma.openapi.yaml post /v1/organizations/api_keys","href":"/api-reference/endpoints/organizations-\u0026-workspaces/create-an-api-key"},{"title":"Get API Key","openapi":"/api-reference/bma.openapi.yaml get /v1/organizations/api_keys/{api_key_id}","href":"/api-reference/endpoints/organizations-\u0026-workspaces/get-api-key"},{"title":"Update API Key","openapi":"/api-reference/bma.openapi.yaml post /v1/organizations/api_keys/{api_key_id}","href":"/api-reference/endpoints/organizations-\u0026-workspaces/update-api-key"},{"title":"Get the cost report","openapi":"/api-reference/bma.openapi.yaml get /v1/organizations/cost_report","href":"/api-reference/endpoints/organizations-\u0026-workspaces/get-the-cost-report"},{"title":"List the organization's invites.","openapi":"/api-reference/bma.openapi.yaml get /v1/organizations/invites","href":"/api-reference/endpoints/organizations-\u0026-workspaces/list-the-organizations-invites"},{"title":"Invite a user to join the organization by email.","openapi":"/api-reference/bma.openapi.yaml post /v1/organizations/invites","href":"/api-reference/endpoints/organizations-\u0026-workspaces/invite-a-user-to-join-the-organization-by-email"},{"title":"Retrieve an invite by ID.","openapi":"/api-reference/bma.openapi.yaml get /v1/organizations/invites/{invite_id}","href":"/api-reference/endpoints/organizations-\u0026-workspaces/retrieve-an-invite-by-id"},{"title":"Delete a pending invite.","openapi":"/api-reference/bma.openapi.yaml delete /v1/organizations/invites/{invite_id}","href":"/api-reference/endpoints/organizations-\u0026-workspaces/delete-a-pending-invite"},{"title":"Retrieve information about the organization associated with the authenticated","openapi":"/api-reference/bma.openapi.yaml get /v1/organizations/me","href":"/api-reference/endpoints/organizations-\u0026-workspaces/retrieve-information-about-the-organization-associated-with-the-authenticated"},{"title":"Get the messages usage report","openapi":"/api-reference/bma.openapi.yaml get /v1/organizations/usage_report/messages","href":"/api-reference/endpoints/organizations-\u0026-workspaces/get-the-messages-usage-report"},{"title":"List the organization's members.","openapi":"/api-reference/bma.openapi.yaml get /v1/organizations/users","href":"/api-reference/endpoints/organizations-\u0026-workspaces/list-the-organizations-members"},{"title":"Retrieve a member of the organization by user ID.","openapi":"/api-reference/bma.openapi.yaml get /v1/organizations/users/{user_id}","href":"/api-reference/endpoints/organizations-\u0026-workspaces/retrieve-a-member-of-the-organization-by-user-id"},{"title":"Update a member's organization role.","openapi":"/api-reference/bma.openapi.yaml post /v1/organizations/users/{user_id}","href":"/api-reference/endpoints/organizations-\u0026-workspaces/update-a-members-organization-role"},{"title":"Remove a member from the organization.","openapi":"/api-reference/bma.openapi.yaml delete /v1/organizations/users/{user_id}","href":"/api-reference/endpoints/organizations-\u0026-workspaces/remove-a-member-from-the-organization"},{"title":"List Workspaces","openapi":"/api-reference/bma.openapi.yaml get /v1/organizations/workspaces","href":"/api-reference/endpoints/organizations-\u0026-workspaces/list-workspaces"},{"title":"Create Workspace","openapi":"/api-reference/bma.openapi.yaml post /v1/organizations/workspaces","href":"/api-reference/endpoints/organizations-\u0026-workspaces/create-workspace"},{"title":"Get Workspace","openapi":"/api-reference/bma.openapi.yaml get /v1/organizations/workspaces/{workspace_id}","href":"/api-reference/endpoints/organizations-\u0026-workspaces/get-workspace"},{"title":"Update Workspace","openapi":"/api-reference/bma.openapi.yaml post /v1/organizations/workspaces/{workspace_id}","href":"/api-reference/endpoints/organizations-\u0026-workspaces/update-workspace"},{"title":"Archive Workspace","openapi":"/api-reference/bma.openapi.yaml post /v1/organizations/workspaces/{workspace_id}/archive","href":"/api-reference/endpoints/organizations-\u0026-workspaces/archive-workspace"},{"title":"List Workspace Members","openapi":"/api-reference/bma.openapi.yaml get /v1/organizations/workspaces/{workspace_id}/members","href":"/api-reference/endpoints/organizations-\u0026-workspaces/list-workspace-members"},{"title":"Create Workspace Member","openapi":"/api-reference/bma.openapi.yaml post /v1/organizations/workspaces/{workspace_id}/members","href":"/api-reference/endpoints/organizations-\u0026-workspaces/create-workspace-member"},{"title":"Get Workspace Member","openapi":"/api-reference/bma.openapi.yaml get /v1/organizations/workspaces/{workspace_id}/members/{user_id}","href":"/api-reference/endpoints/organizations-\u0026-workspaces/get-workspace-member"},{"title":"Update Workspace Member","openapi":"/api-reference/bma.openapi.yaml post /v1/organizations/workspaces/{workspace_id}/members/{user_id}","href":"/api-reference/endpoints/organizations-\u0026-workspaces/update-workspace-member"},{"title":"Delete Workspace Member","openapi":"/api-reference/bma.openapi.yaml delete /v1/organizations/workspaces/{workspace_id}/members/{user_id}","href":"/api-reference/endpoints/organizations-\u0026-workspaces/delete-workspace-member"}]},{"group":"Memory stores","pages":[{"title":"List Memory Stores","openapi":"/api-reference/bma.openapi.yaml get /v1/memory_stores","href":"/api-reference/endpoints/memory-stores/list-memory-stores"},{"title":"Create a Memory Store","openapi":"/api-reference/bma.openapi.yaml post /v1/memory_stores","href":"/api-reference/endpoints/memory-stores/create-a-memory-store"},{"title":"Retrieve a Memory Store","openapi":"/api-reference/bma.openapi.yaml get /v1/memory_stores/{memory_store_id}","href":"/api-reference/endpoints/memory-stores/retrieve-a-memory-store"},{"title":"Update a Memory Store","openapi":"/api-reference/bma.openapi.yaml post /v1/memory_stores/{memory_store_id}","href":"/api-reference/endpoints/memory-stores/update-a-memory-store"},{"title":"Delete a Memory Store","openapi":"/api-reference/bma.openapi.yaml delete /v1/memory_stores/{memory_store_id}","href":"/api-reference/endpoints/memory-stores/delete-a-memory-store"},{"title":"Archive a memory store","openapi":"/api-reference/bma.openapi.yaml post /v1/memory_stores/{memory_store_id}/archive","href":"/api-reference/endpoints/memory-stores/archive-a-memory-store"},{"title":"List Memories","openapi":"/api-reference/bma.openapi.yaml get /v1/memory_stores/{memory_store_id}/memories","href":"/api-reference/endpoints/memory-stores/list-memories"},{"title":"Create a Memory","openapi":"/api-reference/bma.openapi.yaml post /v1/memory_stores/{memory_store_id}/memories","href":"/api-reference/endpoints/memory-stores/create-a-memory"},{"title":"Retrieve a Memory","openapi":"/api-reference/bma.openapi.yaml get /v1/memory_stores/{memory_store_id}/memories/{memory_id}","href":"/api-reference/endpoints/memory-stores/retrieve-a-memory"},{"title":"Update a Memory","openapi":"/api-reference/bma.openapi.yaml post /v1/memory_stores/{memory_store_id}/memories/{memory_id}","href":"/api-reference/endpoints/memory-stores/update-a-memory"},{"title":"Delete a Memory","openapi":"/api-reference/bma.openapi.yaml delete /v1/memory_stores/{memory_store_id}/memories/{memory_id}","href":"/api-reference/endpoints/memory-stores/delete-a-memory"},{"title":"List memory versions","openapi":"/api-reference/bma.openapi.yaml get /v1/memory_stores/{memory_store_id}/memory_versions","href":"/api-reference/endpoints/memory-stores/list-memory-versions"},{"title":"Retrieve a memory version","openapi":"/api-reference/bma.openapi.yaml get /v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}","href":"/api-reference/endpoints/memory-stores/retrieve-a-memory-version"},{"title":"Redact a memory version","openapi":"/api-reference/bma.openapi.yaml post /v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/redact","href":"/api-reference/endpoints/memory-stores/redact-a-memory-version"}]},{"group":"Models \u0026 providers","pages":[{"title":"List model providers","openapi":"/api-reference/bma.openapi.yaml get /v1/model_providers","href":"/api-reference/endpoints/models-\u0026-providers/list-model-providers"},{"title":"Create a model provider","openapi":"/api-reference/bma.openapi.yaml post /v1/model_providers","href":"/api-reference/endpoints/models-\u0026-providers/create-a-model-provider"},{"title":"Get a model provider","openapi":"/api-reference/bma.openapi.yaml get /v1/model_providers/{provider_id}","href":"/api-reference/endpoints/models-\u0026-providers/get-a-model-provider"},{"title":"Update a model provider","openapi":"/api-reference/bma.openapi.yaml post /v1/model_providers/{provider_id}","href":"/api-reference/endpoints/models-\u0026-providers/update-a-model-provider"},{"title":"Delete a model provider","openapi":"/api-reference/bma.openapi.yaml delete /v1/model_providers/{provider_id}","href":"/api-reference/endpoints/models-\u0026-providers/delete-a-model-provider"},{"title":"List a provider's models","openapi":"/api-reference/bma.openapi.yaml get /v1/model_providers/{provider_id}/models","href":"/api-reference/endpoints/models-\u0026-providers/list-a-providers-models"},{"title":"Create a model","openapi":"/api-reference/bma.openapi.yaml post /v1/model_providers/{provider_id}/models","href":"/api-reference/endpoints/models-\u0026-providers/create-a-model"},{"title":"Get a model","openapi":"/api-reference/bma.openapi.yaml get /v1/model_providers/{provider_id}/models/{model_id}","href":"/api-reference/endpoints/models-\u0026-providers/get-a-model"},{"title":"Update a model","openapi":"/api-reference/bma.openapi.yaml post /v1/model_providers/{provider_id}/models/{model_id}","href":"/api-reference/endpoints/models-\u0026-providers/update-a-model"},{"title":"Delete a model","openapi":"/api-reference/bma.openapi.yaml delete /v1/model_providers/{provider_id}/models/{model_id}","href":"/api-reference/endpoints/models-\u0026-providers/delete-a-model"},{"title":"List available models.","openapi":"/api-reference/bma.openapi.yaml get /v1/models","href":"/api-reference/endpoints/models-\u0026-providers/list-available-models"},{"title":"Get a specific model.","openapi":"/api-reference/bma.openapi.yaml get /v1/models/{model_id}","href":"/api-reference/endpoints/models-\u0026-providers/get-a-specific-model"},{"title":"List a model's grants","openapi":"/api-reference/bma.openapi.yaml get /v1/models/{model_id}/grants","href":"/api-reference/endpoints/models-\u0026-providers/list-a-models-grants"},{"title":"Grant a model to a workspace","openapi":"/api-reference/bma.openapi.yaml post /v1/models/{model_id}/grants","href":"/api-reference/endpoints/models-\u0026-providers/grant-a-model-to-a-workspace"},{"title":"Revoke a model grant","openapi":"/api-reference/bma.openapi.yaml delete /v1/models/{model_id}/grants/{workspace_id}","href":"/api-reference/endpoints/models-\u0026-providers/revoke-a-model-grant"}]},{"group":"Webhooks","pages":[{"title":"List webhook endpoints","openapi":"/api-reference/bma.openapi.yaml get /v1/organizations/webhooks","href":"/api-reference/endpoints/webhooks/list-webhook-endpoints"},{"title":"Create a webhook endpoint (the response carries the signing secret once)","openapi":"/api-reference/bma.openapi.yaml post /v1/organizations/webhooks","href":"/api-reference/endpoints/webhooks/create-a-webhook-endpoint-the-response-carries-the-signing-secret-once"},{"title":"Retrieve a webhook endpoint","openapi":"/api-reference/bma.openapi.yaml get /v1/organizations/webhooks/{webhook_endpoint_id}","href":"/api-reference/endpoints/webhooks/retrieve-a-webhook-endpoint"},{"title":"Update a webhook endpoint","openapi":"/api-reference/bma.openapi.yaml post /v1/organizations/webhooks/{webhook_endpoint_id}","href":"/api-reference/endpoints/webhooks/update-a-webhook-endpoint"},{"title":"Delete a webhook endpoint","openapi":"/api-reference/bma.openapi.yaml delete /v1/organizations/webhooks/{webhook_endpoint_id}","href":"/api-reference/endpoints/webhooks/delete-a-webhook-endpoint"},{"title":"Replace the signing secret (the response carries it once)","openapi":"/api-reference/bma.openapi.yaml post /v1/organizations/webhooks/{webhook_endpoint_id}/regenerate_signing_secret","href":"/api-reference/endpoints/webhooks/replace-the-signing-secret-the-response-carries-it-once"}]},{"group":"Sessions","pages":[{"title":"List Sessions","openapi":"/api-reference/bma.openapi.yaml get /v1/sessions","href":"/api-reference/endpoints/sessions/list-sessions"},{"title":"Create Session","openapi":"/api-reference/bma.openapi.yaml post /v1/sessions","href":"/api-reference/endpoints/sessions/create-session"},{"title":"Get Session","openapi":"/api-reference/bma.openapi.yaml get /v1/sessions/{session_id}","href":"/api-reference/endpoints/sessions/get-session"},{"title":"Update Session","openapi":"/api-reference/bma.openapi.yaml post /v1/sessions/{session_id}","href":"/api-reference/endpoints/sessions/update-session"},{"title":"Delete Session","openapi":"/api-reference/bma.openapi.yaml delete /v1/sessions/{session_id}","href":"/api-reference/endpoints/sessions/delete-session"},{"title":"Archive Session","openapi":"/api-reference/bma.openapi.yaml post /v1/sessions/{session_id}/archive","href":"/api-reference/endpoints/sessions/archive-session"},{"title":"Revoke an archived session's executor","openapi":"/api-reference/bma.openapi.yaml post /v1/sessions/{session_id}/bma_executor_revocation","href":"/api-reference/endpoints/sessions/revoke-an-archived-sessions-executor"},{"title":"List Events","description":"Lists the events of a session's log in chronological order (`order=desc` for newest first): the events sent to it, the agent's output, status changes, errors, spans and the `session.updated` entries of title and metadata changes. Every event except `session.updated` carries the BMA extension `bma_sequence`, and several events can share one sequence. `limit` counts sequences, not events: the events of one sequence are never split across pages, so a page can hold more than `limit` events. `next_page` is the cursor of the next page, null on the last. `types` keeps only the named types; BMA's own extension event types (such as `session.bma_placement`) are returned only when `types` names them. The `created_at` bounds keep the events created within them (an event's `processed_at` for `session.updated`); `include_archived` is ignored. Archived sessions can be listed. Read-only.\n\n**Authorization:** Organization API key (`x-api-key: bma_org_v1_…`), personal access token (`Authorization: Bearer bma_pat_v1_…`), OAuth access token or signed-in dashboard session; a user credential names its organization with `bma-organization-id`. The request acts in one workspace: the one named by `bma-workspace-id` (or `anthropic-workspace-id`; when both are sent they must agree), else the credential's default workspace (an API key's own workspace, else its organization's Default workspace), else the only workspace the credential can use. Every workspace role may call it (viewer included); organization owners and admins act as workspace admins in every workspace of their organization.\n\n**Limits:**\n\n- `limit`: default 20, maximum 100 sequences per page.\n- Rate limit: one request of the organization's read budget ([Rate limits](https://docs.beeos.ai/guides/limits)).\n\n**Errors** (besides the [common errors](https://docs.beeos.ai/api-reference/errors) (401 authentication, 429 `rate_limited`, 500)):\n\n| Status | `error.type` | `error.code` | Cause | Fix |\n| --- | --- | --- | --- | --- |\n| 400 | `invalid_request_error` | `organization_required` | A user credential (personal access token, OAuth token, dashboard session) names no organization. | Name the organization with the `bma-organization-id` header. |\n| 400 | `invalid_request_error` | `project_required` | The credential can use several workspaces and the request names none. | Name the workspace with the `bma-workspace-id` header. |\n| 400 | `invalid_request_error` | `workspace_id_conflict` | `bma-workspace-id` and `anthropic-workspace-id` name different workspaces. | Correct the request as the message describes and send it again; the same request will keep failing. |","openapi":"/api-reference/bma.openapi.yaml get /v1/sessions/{session_id}/events","href":"/api-reference/endpoints/sessions/list-events"},{"title":"Send Events","openapi":"/api-reference/bma.openapi.yaml post /v1/sessions/{session_id}/events","href":"/api-reference/endpoints/sessions/send-events"},{"title":"Stream Events","description":"Opens a Server-Sent Events stream of a session's events. Without a `Last-Event-ID` header the stream starts at the current end of the log and delivers only what happens after it opens; with `Last-Event-ID` set to the SSE `id` of a received event it resumes right after that event, and a numeric value resumes after that `bma_sequence` (an ID that is no event of the session is refused with 400). Each frame is `event: \u003ctype>`, `id: \u003cevent id>` and `data: \u003cevent JSON>`; `session.updated` frames carry no `id`. The stream opens with a `: ok` comment and sends a `: keepalive` comment while idle. With `event_deltas` it also sends best-effort `event_start` and `event_delta` previews, which have no `id` and are never stored. BMA's own extension event types are not streamed. If delivery fails after the stream opened, a final `event: error` frame ends it; reconnect with `Last-Event-ID`. The stream stays open until the client disconnects, also after the session is archived.\n\n**Authorization:** Organization API key (`x-api-key: bma_org_v1_…`), personal access token (`Authorization: Bearer bma_pat_v1_…`), OAuth access token or signed-in dashboard session; a user credential names its organization with `bma-organization-id`. The request acts in one workspace: the one named by `bma-workspace-id` (or `anthropic-workspace-id`; when both are sent they must agree), else the credential's default workspace (an API key's own workspace, else its organization's Default workspace), else the only workspace the credential can use. Every workspace role may call it (viewer included); organization owners and admins act as workspace admins in every workspace of their organization.\n\n**Limits:**\n\n- Keepalive: a `: keepalive` comment after 15 seconds without a frame.\n- At most 200 events are read from the log at a time; a backlog is sent in batches without waiting.\n- Rate limit: one request of the organization's read budget ([Rate limits](https://docs.beeos.ai/guides/limits)).\n\n**Errors** (besides the [common errors](https://docs.beeos.ai/api-reference/errors) (401 authentication, 429 `rate_limited`, 500)):\n\n| Status | `error.type` | `error.code` | Cause | Fix |\n| --- | --- | --- | --- | --- |\n| 400 | `invalid_request_error` | `invalid_event_deltas` | `event_deltas` names a type other than `agent.message` and `agent.thinking`. | Correct the request as the message describes and send it again; the same request will keep failing. |\n| 400 | `invalid_request_error` | `organization_required` | A user credential (personal access token, OAuth token, dashboard session) names no organization. | Name the organization with the `bma-organization-id` header. |\n| 400 | `invalid_request_error` | `project_required` | The credential can use several workspaces and the request names none. | Name the workspace with the `bma-workspace-id` header. |\n| 400 | `invalid_request_error` | `workspace_id_conflict` | `bma-workspace-id` and `anthropic-workspace-id` name different workspaces. | Correct the request as the message describes and send it again; the same request will keep failing. |","openapi":"/api-reference/bma.openapi.yaml get /v1/sessions/{session_id}/events/stream","href":"/api-reference/endpoints/sessions/stream-events"},{"title":"Fork a session (copies the conversation only, not files)","openapi":"/api-reference/bma.openapi.yaml post /v1/sessions/{session_id}/fork","href":"/api-reference/endpoints/sessions/fork-a-session-copies-the-conversation-only-not-files"},{"title":"List Session Resources","openapi":"/api-reference/bma.openapi.yaml get /v1/sessions/{session_id}/resources","href":"/api-reference/endpoints/sessions/list-session-resources"},{"title":"Add Session Resource","openapi":"/api-reference/bma.openapi.yaml post /v1/sessions/{session_id}/resources","href":"/api-reference/endpoints/sessions/add-session-resource"},{"title":"Get Session Resource","openapi":"/api-reference/bma.openapi.yaml get /v1/sessions/{session_id}/resources/{resource_id}","href":"/api-reference/endpoints/sessions/get-session-resource"},{"title":"Update Session Resource","openapi":"/api-reference/bma.openapi.yaml post /v1/sessions/{session_id}/resources/{resource_id}","href":"/api-reference/endpoints/sessions/update-session-resource"},{"title":"Delete Session Resource","openapi":"/api-reference/bma.openapi.yaml delete /v1/sessions/{session_id}/resources/{resource_id}","href":"/api-reference/endpoints/sessions/delete-session-resource"},{"title":"List a session's tool grants","openapi":"/api-reference/bma.openapi.yaml get /v1/sessions/{session_id}/tool_grants","href":"/api-reference/endpoints/sessions/list-a-sessions-tool-grants"},{"title":"Revoke a session's tool grant","openapi":"/api-reference/bma.openapi.yaml post /v1/sessions/{session_id}/tool_grants/{grant_id}/revoke","href":"/api-reference/endpoints/sessions/revoke-a-sessions-tool-grant"}]},{"group":"Skills","pages":[{"title":"List skills","openapi":"/api-reference/bma.openapi.yaml get /v1/skills","href":"/api-reference/endpoints/skills/list-skills"},{"title":"Create a skill","openapi":"/api-reference/bma.openapi.yaml post /v1/skills","href":"/api-reference/endpoints/skills/create-a-skill"},{"title":"Retrieve a skill","openapi":"/api-reference/bma.openapi.yaml get /v1/skills/{skill_id}","href":"/api-reference/endpoints/skills/retrieve-a-skill"},{"title":"Delete a skill","openapi":"/api-reference/bma.openapi.yaml delete /v1/skills/{skill_id}","href":"/api-reference/endpoints/skills/delete-a-skill"},{"title":"List skill versions","openapi":"/api-reference/bma.openapi.yaml get /v1/skills/{skill_id}/versions","href":"/api-reference/endpoints/skills/list-skill-versions"},{"title":"Create a skill version","openapi":"/api-reference/bma.openapi.yaml post /v1/skills/{skill_id}/versions","href":"/api-reference/endpoints/skills/create-a-skill-version"},{"title":"Retrieve a skill version","openapi":"/api-reference/bma.openapi.yaml get /v1/skills/{skill_id}/versions/{version}","href":"/api-reference/endpoints/skills/retrieve-a-skill-version"},{"title":"Delete a skill version","openapi":"/api-reference/bma.openapi.yaml delete /v1/skills/{skill_id}/versions/{version}","href":"/api-reference/endpoints/skills/delete-a-skill-version"},{"title":"Download a skill version","openapi":"/api-reference/bma.openapi.yaml get /v1/skills/{skill_id}/versions/{version}/content","href":"/api-reference/endpoints/skills/download-a-skill-version"}]},{"group":"Terminal sessions","pages":[{"title":"List the terminal sessions of a machine","openapi":"/api-reference/bma.openapi.yaml get /v1/terminal_sessions","href":"/api-reference/endpoints/terminal-sessions/list-the-terminal-sessions-of-a-machine"},{"title":"Open a terminal session (body machine_id)","openapi":"/api-reference/bma.openapi.yaml post /v1/terminal_sessions","href":"/api-reference/endpoints/terminal-sessions/open-a-terminal-session-body-machine_id"},{"title":"Retrieve a terminal session","openapi":"/api-reference/bma.openapi.yaml get /v1/terminal_sessions/{terminal_session_id}","href":"/api-reference/endpoints/terminal-sessions/retrieve-a-terminal-session"},{"title":"Close a terminal session","openapi":"/api-reference/bma.openapi.yaml post /v1/terminal_sessions/{terminal_session_id}/close","href":"/api-reference/endpoints/terminal-sessions/close-a-terminal-session"},{"title":"Mint a single-use ticket (purpose connect)","openapi":"/api-reference/bma.openapi.yaml post /v1/terminal_sessions/{terminal_session_id}/tickets","href":"/api-reference/endpoints/terminal-sessions/mint-a-single-use-ticket-purpose-connect"}]},{"group":"User profiles","pages":[{"title":"List user profiles","openapi":"/api-reference/bma.openapi.yaml get /v1/user_profiles","href":"/api-reference/endpoints/user-profiles/list-user-profiles"},{"title":"Create a user profile","openapi":"/api-reference/bma.openapi.yaml post /v1/user_profiles","href":"/api-reference/endpoints/user-profiles/create-a-user-profile"},{"title":"Retrieve a user profile","openapi":"/api-reference/bma.openapi.yaml get /v1/user_profiles/{user_profile_id}","href":"/api-reference/endpoints/user-profiles/retrieve-a-user-profile"},{"title":"Update a user profile","openapi":"/api-reference/bma.openapi.yaml post /v1/user_profiles/{user_profile_id}","href":"/api-reference/endpoints/user-profiles/update-a-user-profile"},{"title":"Delete a user profile","openapi":"/api-reference/bma.openapi.yaml delete /v1/user_profiles/{user_profile_id}","href":"/api-reference/endpoints/user-profiles/delete-a-user-profile"}]},{"group":"Vaults","pages":[{"title":"List vaults","openapi":"/api-reference/bma.openapi.yaml get /v1/vaults","href":"/api-reference/endpoints/vaults/list-vaults"},{"title":"Create a vault","openapi":"/api-reference/bma.openapi.yaml post /v1/vaults","href":"/api-reference/endpoints/vaults/create-a-vault"},{"title":"Retrieve a vault","openapi":"/api-reference/bma.openapi.yaml get /v1/vaults/{vault_id}","href":"/api-reference/endpoints/vaults/retrieve-a-vault"},{"title":"Update a vault","openapi":"/api-reference/bma.openapi.yaml post /v1/vaults/{vault_id}","href":"/api-reference/endpoints/vaults/update-a-vault"},{"title":"Delete a vault","openapi":"/api-reference/bma.openapi.yaml delete /v1/vaults/{vault_id}","href":"/api-reference/endpoints/vaults/delete-a-vault"},{"title":"Archive a vault","openapi":"/api-reference/bma.openapi.yaml post /v1/vaults/{vault_id}/archive","href":"/api-reference/endpoints/vaults/archive-a-vault"},{"title":"List credentials","openapi":"/api-reference/bma.openapi.yaml get /v1/vaults/{vault_id}/credentials","href":"/api-reference/endpoints/vaults/list-credentials"},{"title":"Create a credential","openapi":"/api-reference/bma.openapi.yaml post /v1/vaults/{vault_id}/credentials","href":"/api-reference/endpoints/vaults/create-a-credential"},{"title":"Retrieve a credential","openapi":"/api-reference/bma.openapi.yaml get /v1/vaults/{vault_id}/credentials/{credential_id}","href":"/api-reference/endpoints/vaults/retrieve-a-credential"},{"title":"Update or rotate a credential","openapi":"/api-reference/bma.openapi.yaml post /v1/vaults/{vault_id}/credentials/{credential_id}","href":"/api-reference/endpoints/vaults/update-or-rotate-a-credential"},{"title":"Delete a credential","openapi":"/api-reference/bma.openapi.yaml delete /v1/vaults/{vault_id}/credentials/{credential_id}","href":"/api-reference/endpoints/vaults/delete-a-credential"},{"title":"Archive a credential","openapi":"/api-reference/bma.openapi.yaml post /v1/vaults/{vault_id}/credentials/{credential_id}/archive","href":"/api-reference/endpoints/vaults/archive-a-credential"},{"title":"Validate an MCP OAuth credential","openapi":"/api-reference/bma.openapi.yaml post /v1/vaults/{vault_id}/credentials/{credential_id}/mcp_oauth_validate","href":"/api-reference/endpoints/vaults/validate-an-mcp-oauth-credential"}]},{"group":"Web search \u0026 fetch","pages":[{"title":"Fetch a web page","openapi":"/api-reference/bma.openapi.yaml post /v1/web_fetches","href":"/api-reference/endpoints/web-search-\u0026-fetch/fetch-a-web-page"},{"title":"Search the web","openapi":"/api-reference/bma.openapi.yaml post /v1/web_searches","href":"/api-reference/endpoints/web-search-\u0026-fetch/search-the-web"}]}]}]},{"group":"bma-executor-sdk","pages":[{"title":"bma-executor-sdk Protocol Reference","sidebarTitle":"Protocol overview","icon":"microchip","href":"/api-reference/bma-executor-sdk/overview"},{"group":"Endpoints","expanded":true,"pages":[{"title":"Connection \u0026 lifecycle","icon":"plug","href":"/api-reference/bma-executor-sdk/connection"},{"title":"Sessions \u0026 turns","icon":"messages","href":"/api-reference/bma-executor-sdk/sessions-and-turns"},{"title":"Tools \u0026 interactions","icon":"wrench","href":"/api-reference/bma-executor-sdk/tools-and-interactions"},{"title":"Processes \u0026 terminals","icon":"terminal","href":"/api-reference/bma-executor-sdk/processes-and-terminals"},{"title":"Desktop, screen \u0026 workspace","icon":"desktop","href":"/api-reference/bma-executor-sdk/desktop-and-workspace"}]}]}]},{"tab":"Self-hosting","pages":[{"title":"Self-hosting","href":"/self-hosting/overview"}]},{"tab":"Changelog \u0026 roadmap","pages":[{"title":"Changelog \u0026 roadmap","href":"/changelog"}]}]},{"language":"zh","pages":[{"title":"zh","href":"/zh/api-reference/endpoints/sessions/send-events"}]},{"language":"zh-Hant","pages":[{"title":"zh-Hant","href":"/zh-hant/api-reference/endpoints/sessions/send-events"}]},{"language":"ja","pages":[{"title":"ja","href":"/ja/api-reference/endpoints/sessions/send-events"}]},{"language":"ko","pages":[{"title":"ko","href":"/ko/api-reference/endpoints/sessions/send-events"}]}]},"basePath":"","title":"Send Events - BMA Developer Docs","buildId":"815f1a3055e5","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-1AKe0ef2.js","snippetPresets-CngcX0JF.js","utils-Dn_b4b8k.js","style-to-object-BY3JEAdk.js","utils-Gx5d07QN.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CRl5XKI1.js","conditional-requirements-CFM0id0Q.js","cloneDeep-DvHqN_Pm.js","_Uint8Array-B1ND6YRH.js","isObject-FP1Yky1u.js","ApiExamples-D7M37pdg.js","usePlaygroundInputsStore-DVayymCv.js","shallow-Bf79Qs-6.js","isEqual-DVW5K_pQ.js","CodeSnippets-4lATClrm.js","CodeSnippet-s__4qicF.js","use-playground-group-access-BHEk5kJ3.js","Page-DJ-Y-H3C.js","api-description-markdown-Dr4kHu1P.js","DynamicMarkdown-Bny17ned.js","SectionHeading-9Y8On-s1.js","MethodPill-BJEvxiO8.js","getPastedJson-58y35ABl.js","Check2Icon-CLmJh0P7.js","axios-CsQoIw0U.js","Markdown-CY5OpB5G.js","AssistantPageLink-Dh-tOAEH.js","dist-B74kwL_M.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}