Droid Sessions API

Create and drive Droid sessions and workstreams, and manage settings and messages.

GET/api/v0/sessions

List sessions

Returns a paginated list of sessions for the authenticated user. With `computerId`, sessions are listed from that computer, whose session list records no run state, so every row reports `status` `idle`; read a session with `GET /api/v0/sessions/{sessionId}?computerId=` for whether it is running. Rows listed from a computer omit `factoryCredits`; without `computerId`, `factoryCredits` appears on sessions that have reported usage, and is omitted from every row when the organization hides billable usage. Without `computerId`, `updatedAfter` and `updatedBefore` select sessions by their current last update time, at or after `updatedAfter` and before `updatedBefore`; they do not return a history of changes, and they are rejected with `computerId`. Send the same window with every cursor. A page can be short or empty while `hasMore` is true, so follow `nextCursor` until `hasMore` is false. A session updated while you page is listed at its new update time, so it can appear again or leave the window, and a cursor that names none of your sessions starts the list again; deduplicate rows by `sessionId`. For periodic polls, set an explicit `updatedBefore` and overlap consecutive windows to reduce missed updates. `excludeSubagents=true` omits sessions with a public `parent_session_id`; see the parameter for which sessions remain listed. This feature is enabled for selected organizations only.

cURL
curl 'https://api.factory.ai/api/v0/sessions' \
  -H "Authorization: Bearer $FACTORY_BEARER_TOKEN"

Parameters

limitintegerqueryoptional

Maximum number of items to return (1-100)

Default: 20

cursorstringqueryoptional

Cursor for pagination

computerIdstringqueryoptional

Computer ID to query directly

sessionIdsstringqueryoptional

Comma-separated set of 1–100 session UUIDs, counted before deduplication. Unknown or inaccessible IDs are omitted. Returns only normally listable matches in last-update order, not input order. Use limit=100 for up to 100 matches; repeat the same IDs with each cursor and time window. Older storage that cannot apply this filter returns 503, never an unfiltered list. Not supported with a nonempty computerId or on the workstreams list.

Minimum length: 1

Maximum length: 3699

excludeSubagentsbooleanqueryoptional

`excludeSubagents=true` omits sessions with a public `parent_session_id`. Mission and legacy child sessions without that public parent remain listed. Filtering can produce short or empty pages with `hasMore=true`; continue using `nextCursor`. A fork of a child session inherits that child's parent lineage, so it is omitted when the child is. When supplied, `excludeSubagents` cannot be combined with `sessionIds` or a non-empty `computerId`, even when it is `false`.

updatedAfterstringqueryoptional

List only sessions whose last update time (Unix ms) is at or after this time

Pattern: ^(0|[1-9]\d{0,15})$

updatedBeforestringqueryoptional

List only sessions whose last update time (Unix ms) is before this time; at least 1 and later than updatedAfter

Pattern: ^(0|[1-9]\d{0,15})$

X-Factory-Org-Idstringheaderoptional

Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.

Responses

200Response for status 200

application/json

sessionsobject[]required

Array items

sessionIdstringrequired

Session ID

parent_session_idstring

Immediate parent session ID for a Task subagent, if one exists

titlestring

Session title

statusstringrequired

Current session execution status

Allowed values

idlependingrunning
messageCountintegerrequired

Number of messages in session

createdAtintegerrequired

Creation timestamp (Unix ms). Read from a computer with computerId, a single session reports its earliest message's creation time (the request time when it has no messages), and a list reports when the session file was created (its last update time when the computer did not record that)

updatedAtintegerrequired

Last update timestamp (Unix ms). Read from a computer with computerId, a single session reports its latest message's update time (the request time when it has no messages)

completedAtinteger

Completion timestamp (Unix ms)

computerIdstring

The computer the session runs on: your computer on the session's host, otherwise the computer the session records. Absent when its host has none of your computers and it records none. Read from a computer with computerId, that computer

sessionSettingsobject
modelstring
reasoningEffortstring

Allowed values

nonedynamicoffminimallowmediumhighxhighmax
interactionModestring

Allowed values

autospecagimission
autonomyLevelstring

Allowed values

offlowmediumhigh
autonomyModestring

Deprecated: use interactionMode + autonomyLevel instead.

Allowed values

normalspecauto-lowauto-mediumauto-high
specModeModelstring
specModeReasoningEffortstring

Allowed values

nonedynamicoffminimallowmediumhighxhighmax
providerLockstring

Allowed values

anthropicopenaigeneric-chat-completion-apifactorygooglexaibedrock-converse
providerLockTimestampstring
apiProviderLockstring

Allowed values

bedrockanthropicvertex_anthropicbedrock_anthropicbedrock_conversebedrock_openaiopenaiazure_openaiazure_anthropicgooglexaimistralfireworksbasetentogethersnowflakedatabricks
archivedAtstring
tagsobject[]

Array items

namestringrequired

Minimum length: 1

metadataobject (map)

Values

string
worktreeobject
branchstring
lifecyclestring

Allowed values

ephemeralpersistent
pathstring
parentWorktreePathstring
removedAtstring
repoRootstringrequired
setupProfileIdstring
enabledToolIdsstring[]

Array items

string
disabledToolIdsstring[]

Array items

string
restrictToolIdsstring[]

Array items

string
toolExecutionModestring

Allowed values

direct_onlyscript_only
allowSubagentsInScriptsboolean
compactionModelstring
compactionThresholdCheckEnabledboolean
tagsobject[]

Session tags. A workstream carries a mission-v2 tag whose metadata has kind "orchestrator" and a missionId equal to its own sessionId; spaceId appears once its shared folder is attached

Array items

namestringrequired

Minimum length: 1

metadataobject (map)

Values

string
artifactsobject[]

Integration artifacts (pull requests, issues, pages) the session touched, oldest first

Array items

idstringrequired
urlstringrequired
titlestring
externalIdstring
providerstringrequired

Allowed values

githubgitlablinearjiranotionweblocalconnector
kindstringrequired

Allowed values

pull_requestissuedocumentrecordfilelink
connectorstring
fileRolestring

Allowed values

spec
actionstring

Default: "create"

Allowed values

createupdatedeleteviewclosemerge
sourcestringrequired

Allowed values

toolclassifieruser_message
createdAtstringrequired
toolCallIdstring
factoryCreditsnumber

Total Factory credits consumed by the session and its subagents

paginationobjectrequired
hasMorebooleanrequired

Whether there are more items after this page

nextCursorstring | nullrequired

Cursor to use for the next page, null if no more pages

400Response for status 400

application/json

variantOption 1 · object
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

variantOption 2 · object
messagestringrequired

Request validation error

errorsobject[]

Framework validation issues, when available

Array items

object
401Response for status 401

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

402Response for status 402

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

403Response for status 403

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

404Response for status 404

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

424Response for status 424

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

429Response for status 429

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

451Response for status 451

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

500Response for status 500

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

503Response for status 503

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

POST/api/v0/sessions

Create a session

Creates a new session with the specified configuration. This feature is enabled for selected organizations only.

cURL
curl -X POST 'https://api.factory.ai/api/v0/sessions' \
  -H "Authorization: Bearer $FACTORY_BEARER_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{ ... }'

Parameters

X-Factory-Org-Idstringheaderoptional

Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.

Request body

Required

application/json

No additional properties

computerIdstringrequired

Computer ID to connect

cwdstring

Working directory for the session on the computer.

Minimum length: 1

Maximum length: 4096

sessionSettingsobject

No additional properties

modelstring
reasoningEffortstring

Allowed values

nonedynamicoffminimallowmediumhighxhighmax
interactionModestring

Allowed values

autospecagimission
autonomyLevelstring

Allowed values

offlowmediumhigh
autonomyModestring

Deprecated: use interactionMode + autonomyLevel instead.

Allowed values

normalspecauto-lowauto-mediumauto-high
specModeModelstring
specModeReasoningEffortstring

Allowed values

nonedynamicoffminimallowmediumhighxhighmax
providerLockstring

Allowed values

anthropicopenaigeneric-chat-completion-apifactorygooglexaibedrock-converse
providerLockTimestampstring
apiProviderLockstring

Allowed values

bedrockanthropicvertex_anthropicbedrock_anthropicbedrock_conversebedrock_openaiopenaiazure_openaiazure_anthropicgooglexaimistralfireworksbasetentogethersnowflakedatabricks
archivedAtstring
tagsobject[]

Array items

No additional properties

namestringrequired

Minimum length: 1

metadataobject (map)

Values

string
worktreeobject

No additional properties

branchstring
lifecyclestring

Allowed values

ephemeralpersistent
pathstring
parentWorktreePathstring
removedAtstring
repoRootstringrequired
setupProfileIdstring
enabledToolIdsstring[]

Array items

string
disabledToolIdsstring[]

Array items

string
restrictToolIdsstring[]

Array items

string
toolExecutionModestring

Allowed values

direct_onlyscript_only
allowSubagentsInScriptsboolean
systemPromptstring | object
variantOption 1 · string

Pattern: \S

variantpreset

No additional properties

typestringrequired

Allowed values

preset
presetstringrequired

Allowed values

droid
appendstringrequired

Pattern: \S

compactionModelstring
compactionThresholdCheckEnabledboolean
blockOnStartupLoadboolean

Wait up to 5 more seconds before responding so the session can be read back from the API, and make each turn wait for MCP servers and connectors to load before it starts. The session is created either way: if its record is not stored within that time, or cannot be stored, reading it returns 404 until it is.

Responses

201Response for status 201

application/json

sessionIdstringrequired

Session ID

parent_session_idstring

Immediate parent session ID for a Task subagent, if one exists

titlestring

Session title

statusstringrequired

Current session execution status

Allowed values

idlependingrunning
messageCountintegerrequired

Number of messages in session

createdAtintegerrequired

Creation timestamp (Unix ms). Read from a computer with computerId, a single session reports its earliest message's creation time (the request time when it has no messages), and a list reports when the session file was created (its last update time when the computer did not record that)

updatedAtintegerrequired

Last update timestamp (Unix ms). Read from a computer with computerId, a single session reports its latest message's update time (the request time when it has no messages)

completedAtinteger

Completion timestamp (Unix ms)

computerIdstring

The computer the session runs on: your computer on the session's host, otherwise the computer the session records. Absent when its host has none of your computers and it records none. Read from a computer with computerId, that computer

sessionSettingsobject
modelstring
reasoningEffortstring

Allowed values

nonedynamicoffminimallowmediumhighxhighmax
interactionModestring

Allowed values

autospecagimission
autonomyLevelstring

Allowed values

offlowmediumhigh
autonomyModestring

Deprecated: use interactionMode + autonomyLevel instead.

Allowed values

normalspecauto-lowauto-mediumauto-high
specModeModelstring
specModeReasoningEffortstring

Allowed values

nonedynamicoffminimallowmediumhighxhighmax
providerLockstring

Allowed values

anthropicopenaigeneric-chat-completion-apifactorygooglexaibedrock-converse
providerLockTimestampstring
apiProviderLockstring

Allowed values

bedrockanthropicvertex_anthropicbedrock_anthropicbedrock_conversebedrock_openaiopenaiazure_openaiazure_anthropicgooglexaimistralfireworksbasetentogethersnowflakedatabricks
archivedAtstring
tagsobject[]

Array items

namestringrequired

Minimum length: 1

metadataobject (map)

Values

string
worktreeobject
branchstring
lifecyclestring

Allowed values

ephemeralpersistent
pathstring
parentWorktreePathstring
removedAtstring
repoRootstringrequired
setupProfileIdstring
enabledToolIdsstring[]

Array items

string
disabledToolIdsstring[]

Array items

string
restrictToolIdsstring[]

Array items

string
toolExecutionModestring

Allowed values

direct_onlyscript_only
allowSubagentsInScriptsboolean
compactionModelstring
compactionThresholdCheckEnabledboolean
tagsobject[]

Session tags. A workstream carries a mission-v2 tag whose metadata has kind "orchestrator" and a missionId equal to its own sessionId; spaceId appears once its shared folder is attached

Array items

namestringrequired

Minimum length: 1

metadataobject (map)

Values

string
artifactsobject[]

Integration artifacts (pull requests, issues, pages) the session touched, oldest first

Array items

idstringrequired
urlstringrequired
titlestring
externalIdstring
providerstringrequired

Allowed values

githubgitlablinearjiranotionweblocalconnector
kindstringrequired

Allowed values

pull_requestissuedocumentrecordfilelink
connectorstring
fileRolestring

Allowed values

spec
actionstring

Default: "create"

Allowed values

createupdatedeleteviewclosemerge
sourcestringrequired

Allowed values

toolclassifieruser_message
createdAtstringrequired
toolCallIdstring
factoryCreditsnumber

Total Factory credits consumed by the session and its subagents

400Response for status 400

application/json

variantOption 1 · object
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

variantOption 2 · object
messagestringrequired

Request validation error

errorsobject[]

Framework validation issues, when available

Array items

object
401Response for status 401

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

402Response for status 402

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

403Response for status 403

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

404Response for status 404

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

413Response for status 413

application/json

variantOption 1 · object
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

variantOption 2 · object

The platform edge refused a body over its own size limit before the route ran, and answered in JSON because the request accepts JSON, for example `{"error":{"code":"413","message":"Request Entity Too Large"}}`.

Must not include detail

errorobjectrequired
codestringrequired
messagestringrequired

text/plain

The platform edge refused a body over its own size limit before the route ran, for example `Request Entity Too Large` followed by an error code such as `FUNCTION_PAYLOAD_TOO_LARGE`.

string
415Response for status 415

application/json

messagestringrequired

Request validation error

errorsobject[]

Framework validation issues, when available

Array items

object
429Response for status 429

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

451Response for status 451

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

500Response for status 500

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

503Response for status 503

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

504Response for status 504

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

GET/api/v0/sessions/workstreams

List workstreams

Returns a paginated list of the workstreams you started, most recently updated first, with the same session fields as `GET /api/v0/sessions`. The `sessionIds` filter is not supported on this endpoint. Agents a workstream starts are not listed; each workstream carries its mission-v2 tag. Workstreams must be available to your organization; otherwise the request fails with 403.

cURL
curl 'https://api.factory.ai/api/v0/sessions/workstreams' \
  -H "Authorization: Bearer $FACTORY_BEARER_TOKEN"

Parameters

limitintegerqueryoptional

Maximum number of items to return (1-100)

Default: 20

cursorstringqueryoptional

The nextCursor of the previous page. Workstreams are ordered by last update, so one updated while you page can move to an earlier page. A cursor that names none of your sessions starts the list again from the most recently updated workstream.

X-Factory-Org-Idstringheaderoptional

Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.

Responses

200Response for status 200

application/json

sessionsobject[]required

Array items

sessionIdstringrequired

Session ID

parent_session_idstring

Immediate parent session ID for a Task subagent, if one exists

titlestring

Session title

statusstringrequired

Current session execution status

Allowed values

idlependingrunning
messageCountintegerrequired

Number of messages in session

createdAtintegerrequired

Creation timestamp (Unix ms). Read from a computer with computerId, a single session reports its earliest message's creation time (the request time when it has no messages), and a list reports when the session file was created (its last update time when the computer did not record that)

updatedAtintegerrequired

Last update timestamp (Unix ms). Read from a computer with computerId, a single session reports its latest message's update time (the request time when it has no messages)

completedAtinteger

Completion timestamp (Unix ms)

computerIdstring

The computer the session runs on: your computer on the session's host, otherwise the computer the session records. Absent when its host has none of your computers and it records none. Read from a computer with computerId, that computer

sessionSettingsobject
modelstring
reasoningEffortstring

Allowed values

nonedynamicoffminimallowmediumhighxhighmax
interactionModestring

Allowed values

autospecagimission
autonomyLevelstring

Allowed values

offlowmediumhigh
autonomyModestring

Deprecated: use interactionMode + autonomyLevel instead.

Allowed values

normalspecauto-lowauto-mediumauto-high
specModeModelstring
specModeReasoningEffortstring

Allowed values

nonedynamicoffminimallowmediumhighxhighmax
providerLockstring

Allowed values

anthropicopenaigeneric-chat-completion-apifactorygooglexaibedrock-converse
providerLockTimestampstring
apiProviderLockstring

Allowed values

bedrockanthropicvertex_anthropicbedrock_anthropicbedrock_conversebedrock_openaiopenaiazure_openaiazure_anthropicgooglexaimistralfireworksbasetentogethersnowflakedatabricks
archivedAtstring
tagsobject[]

Array items

namestringrequired

Minimum length: 1

metadataobject (map)

Values

string
worktreeobject
branchstring
lifecyclestring

Allowed values

ephemeralpersistent
pathstring
parentWorktreePathstring
removedAtstring
repoRootstringrequired
setupProfileIdstring
enabledToolIdsstring[]

Array items

string
disabledToolIdsstring[]

Array items

string
restrictToolIdsstring[]

Array items

string
toolExecutionModestring

Allowed values

direct_onlyscript_only
allowSubagentsInScriptsboolean
compactionModelstring
compactionThresholdCheckEnabledboolean
tagsobject[]

Session tags. A workstream carries a mission-v2 tag whose metadata has kind "orchestrator" and a missionId equal to its own sessionId; spaceId appears once its shared folder is attached

Array items

namestringrequired

Minimum length: 1

metadataobject (map)

Values

string
artifactsobject[]

Integration artifacts (pull requests, issues, pages) the session touched, oldest first

Array items

idstringrequired
urlstringrequired
titlestring
externalIdstring
providerstringrequired

Allowed values

githubgitlablinearjiranotionweblocalconnector
kindstringrequired

Allowed values

pull_requestissuedocumentrecordfilelink
connectorstring
fileRolestring

Allowed values

spec
actionstring

Default: "create"

Allowed values

createupdatedeleteviewclosemerge
sourcestringrequired

Allowed values

toolclassifieruser_message
createdAtstringrequired
toolCallIdstring
factoryCreditsnumber

Total Factory credits consumed by the session and its subagents

paginationobjectrequired
hasMorebooleanrequired

Whether there are more items after this page

nextCursorstring | nullrequired

Cursor to use for the next page, null if no more pages

400Response for status 400

application/json

variantOption 1 · object
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

variantOption 2 · object
messagestringrequired

Request validation error

errorsobject[]

Framework validation issues, when available

Array items

object
401Response for status 401

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

402Response for status 402

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

403Response for status 403

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

404Response for status 404

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

429Response for status 429

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

451Response for status 451

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

500Response for status 500

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

503Response for status 503

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

POST/api/v0/sessions/workstreams

Start a workstream

Starts a workstream: an orchestrator session that works through the brief, can start agents, and shares a folder with them. The orchestrator runs at High autonomy, so it runs commands without asking for approval, and the agents it starts run at its level. If an admin has set a lower maximum autonomy level for your organization, the orchestrator and its agents run at that maximum, and a command that needs more autonomy does not run until someone approves it. Target an `environment` to provision a fresh computer from its active build, or a `computer` you own. Returns once the brief is delivered, after waiting up to 5 more seconds so the session can be read back from the API; if its record is not stored within that time, or cannot be stored, reading it returns 404 until it is. The orchestrator keeps working afterwards, so read `GET /api/v0/sessions/{sessionId}` and `GET /api/v0/sessions/{sessionId}/messages` to follow it. A request whose connection drops before the response arrives can still have started the workstream, so list workstreams with `GET /api/v0/sessions/workstreams` before you retry. Workstreams must be available to your organization, and when an administrator limits them to selected members you must be one of them; otherwise the request fails with 403. A computer whose Droid is too old to run workstreams fails with 424 before anything starts. A computer provisioned from an environment is deleted when the workstream cannot start; otherwise it stays with the workstream until you delete it or it is removed after a long period of inactivity.

cURL
curl -X POST 'https://api.factory.ai/api/v0/sessions/workstreams' \
  -H "Authorization: Bearer $FACTORY_BEARER_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{ ... }'

Parameters

X-Factory-Org-Idstringheaderoptional

Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.

Request body

Required

application/json

No additional properties

targetobjectrequired

Where the workstream runs: a fresh computer from an environment, or an existing computer you own

variantenvironment

No additional properties

kindstringrequired

Allowed values

environment
environmentIdstringrequired

Minimum length: 1

templateIdnot allowed
executionTemplateIdnot allowed
computerIdnot allowed
sourceComputerIdnot allowed
sessionIdnot allowed
variantcomputer

No additional properties

kindstringrequired

Allowed values

computer
computerIdstringrequired

Minimum length: 1

environmentIdnot allowed
templateIdnot allowed
executionTemplateIdnot allowed
sourceComputerIdnot allowed
sessionIdnot allowed
titlestringrequired

Workstream title. It cannot contain a NUL character or an unpaired surrogate

Minimum length: 1

Maximum length: 120

briefstringrequired

First message to the workstream orchestrator

Minimum length: 1

Responses

201Response for status 201

application/json

sessionIdstringrequired

Minimum length: 1

computerIdstringrequired

Minimum length: 1

messageIdstringrequired

Minimum length: 1

400Response for status 400

application/json

variantOption 1 · object
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

variantOption 2 · object
messagestringrequired

Request validation error

errorsobject[]

Framework validation issues, when available

Array items

object
401Response for status 401

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

402Response for status 402

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

403Response for status 403

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

404Response for status 404

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

409Response for status 409

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

413The platform edge refused a body over its own size limit before the route ran, for example `Request Entity Too Large` followed by an error code such as `FUNCTION_PAYLOAD_TOO_LARGE`.

text/plain

The platform edge refused a body over its own size limit before the route ran, for example `Request Entity Too Large` followed by an error code such as `FUNCTION_PAYLOAD_TOO_LARGE`.

string

application/json

The platform edge refused a body over its own size limit before the route ran, and answered in JSON because the request accepts JSON, for example `{"error":{"code":"413","message":"Request Entity Too Large"}}`.

Must not include detail

errorobjectrequired
codestringrequired
messagestringrequired
415Response for status 415

application/json

messagestringrequired

Request validation error

errorsobject[]

Framework validation issues, when available

Array items

object
424Response for status 424

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

429Response for status 429

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

451Response for status 451

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

500Response for status 500

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

503Response for status 503

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

504Response for status 504

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

GET/api/v0/sessions/{sessionId}

Get a session

Returns the session with its status, tags, and credit usage. With `computerId`, the session is read from that computer, and `status` is `running` while its agent loop runs. This feature is enabled for selected organizations only.

cURL
curl 'https://api.factory.ai/api/v0/sessions/{sessionId}' \
  -H "Authorization: Bearer $FACTORY_BEARER_TOKEN"

Parameters

sessionIdstringpathrequired

Session ID

computerIdstringqueryoptional

Computer ID to query directly

includePinnedbooleanqueryoptional

Set to true to add pinned to the answer: true when your pinned list holds this session, false when it does not.

X-Factory-Org-Idstringheaderoptional

Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.

Responses

200Response for status 200

application/json

sessionIdstringrequired

Session ID

parent_session_idstring

Immediate parent session ID for a Task subagent, if one exists

titlestring

Session title

statusstringrequired

Current session execution status

Allowed values

idlependingrunning
messageCountintegerrequired

Number of messages in session

createdAtintegerrequired

Creation timestamp (Unix ms). Read from a computer with computerId, a single session reports its earliest message's creation time (the request time when it has no messages), and a list reports when the session file was created (its last update time when the computer did not record that)

updatedAtintegerrequired

Last update timestamp (Unix ms). Read from a computer with computerId, a single session reports its latest message's update time (the request time when it has no messages)

completedAtinteger

Completion timestamp (Unix ms)

computerIdstring

The computer the session runs on: your computer on the session's host, otherwise the computer the session records. Absent when its host has none of your computers and it records none. Read from a computer with computerId, that computer

sessionSettingsobject
modelstring
reasoningEffortstring

Allowed values

nonedynamicoffminimallowmediumhighxhighmax
interactionModestring

Allowed values

autospecagimission
autonomyLevelstring

Allowed values

offlowmediumhigh
autonomyModestring

Deprecated: use interactionMode + autonomyLevel instead.

Allowed values

normalspecauto-lowauto-mediumauto-high
specModeModelstring
specModeReasoningEffortstring

Allowed values

nonedynamicoffminimallowmediumhighxhighmax
providerLockstring

Allowed values

anthropicopenaigeneric-chat-completion-apifactorygooglexaibedrock-converse
providerLockTimestampstring
apiProviderLockstring

Allowed values

bedrockanthropicvertex_anthropicbedrock_anthropicbedrock_conversebedrock_openaiopenaiazure_openaiazure_anthropicgooglexaimistralfireworksbasetentogethersnowflakedatabricks
archivedAtstring
tagsobject[]

Array items

namestringrequired

Minimum length: 1

metadataobject (map)

Values

string
worktreeobject
branchstring
lifecyclestring

Allowed values

ephemeralpersistent
pathstring
parentWorktreePathstring
removedAtstring
repoRootstringrequired
setupProfileIdstring
enabledToolIdsstring[]

Array items

string
disabledToolIdsstring[]

Array items

string
restrictToolIdsstring[]

Array items

string
toolExecutionModestring

Allowed values

direct_onlyscript_only
allowSubagentsInScriptsboolean
compactionModelstring
compactionThresholdCheckEnabledboolean
tagsobject[]

Session tags. A workstream carries a mission-v2 tag whose metadata has kind "orchestrator" and a missionId equal to its own sessionId; spaceId appears once its shared folder is attached

Array items

namestringrequired

Minimum length: 1

metadataobject (map)

Values

string
artifactsobject[]

Integration artifacts (pull requests, issues, pages) the session touched, oldest first

Array items

idstringrequired
urlstringrequired
titlestring
externalIdstring
providerstringrequired

Allowed values

githubgitlablinearjiranotionweblocalconnector
kindstringrequired

Allowed values

pull_requestissuedocumentrecordfilelink
connectorstring
fileRolestring

Allowed values

spec
actionstring

Default: "create"

Allowed values

createupdatedeleteviewclosemerge
sourcestringrequired

Allowed values

toolclassifieruser_message
createdAtstringrequired
toolCallIdstring
factoryCreditsnumber

Total Factory credits consumed by the session and its subagents

pinnedboolean

Pin preference reported by this operation. Present on a successful getSession response when includePinned=true, or on a successful updateSession response when its body supplied pinned. Absence means not reported, not unpinned.

400Response for status 400

application/json

variantOption 1 · object
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

variantOption 2 · object
messagestringrequired

Request validation error

errorsobject[]

Framework validation issues, when available

Array items

object
401Response for status 401

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

402Response for status 402

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

403Response for status 403

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

404Response for status 404

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

424Response for status 424

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

429Response for status 429

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

451Response for status 451

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

500Response for status 500

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

503Response for status 503

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

DELETE/api/v0/sessions/{sessionId}

Delete a session

Deletes a session. With `computerId`, archives the session on that computer instead of deleting it. This feature is enabled for selected organizations only.

cURL
curl -X DELETE 'https://api.factory.ai/api/v0/sessions/{sessionId}' \
  -H "Authorization: Bearer $FACTORY_BEARER_TOKEN"

Parameters

sessionIdstringpathrequired

Session ID

computerIdstringqueryoptional

Computer ID to query directly

X-Factory-Org-Idstringheaderoptional

Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.

Responses

204Response for status 204

No response body.

400Response for status 400

application/json

variantOption 1 · object
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

variantOption 2 · object
messagestringrequired

Request validation error

errorsobject[]

Framework validation issues, when available

Array items

object
401Response for status 401

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

402Response for status 402

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

403Response for status 403

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

404Response for status 404

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

451Response for status 451

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

500Response for status 500

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

503Response for status 503

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

PATCH/api/v0/sessions/{sessionId}

Update a session

Pins or unpins the session for you, and updates session configuration such as model and reasoning effort. With `pinned` in the body, a 200 answers that value once the pin store acknowledges the write; without it, the request reads and writes nothing about pins and the 200 has no `pinned`. The pin write goes to the pin store before `sessionSettings` goes to the computer, and the two writes are not atomic: when the pin write is not acknowledged (a refusal, or an answer the server cannot read), `sessionSettings` is not sent, and when applying `sessionSettings` then fails with a 503, nothing undoes the pin write. This feature is enabled for selected organizations only.

cURL
curl -X PATCH 'https://api.factory.ai/api/v0/sessions/{sessionId}' \
  -H "Authorization: Bearer $FACTORY_BEARER_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{ ... }'

Parameters

sessionIdstringpathrequired

Session ID

X-Factory-Org-Idstringheaderoptional

Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.

Request body

Required

application/json

No additional properties

sessionSettingsobject

No additional properties

modelstring
reasoningEffortstring

Allowed values

nonedynamicoffminimallowmediumhighxhighmax
interactionModestring

Allowed values

autospecagimission
autonomyLevelstring

Allowed values

offlowmediumhigh
autonomyModestring

Deprecated: use interactionMode + autonomyLevel instead.

Allowed values

normalspecauto-lowauto-mediumauto-high
specModeModelstring
specModeReasoningEffortstring

Allowed values

nonedynamicoffminimallowmediumhighxhighmax
providerLockstring

Allowed values

anthropicopenaigeneric-chat-completion-apifactorygooglexaibedrock-converse
providerLockTimestampstring
apiProviderLockstring

Allowed values

bedrockanthropicvertex_anthropicbedrock_anthropicbedrock_conversebedrock_openaiopenaiazure_openaiazure_anthropicgooglexaimistralfireworksbasetentogethersnowflakedatabricks
archivedAtstring
tagsobject[]

Array items

No additional properties

namestringrequired

Minimum length: 1

metadataobject (map)

Values

string
worktreeobject

No additional properties

branchstring
lifecyclestring

Allowed values

ephemeralpersistent
pathstring
parentWorktreePathstring
removedAtstring
repoRootstringrequired
setupProfileIdstring
enabledToolIdsstring[]

Array items

string
disabledToolIdsstring[]

Array items

string
restrictToolIdsstring[]

Array items

string
compactionModelstring
compactionThresholdCheckEnabledboolean
pinnedboolean

true pins the session for you and false unpins it; omit it to leave the pin unchanged. Only a person can change their own session's pin preference.

Responses

200Response for status 200

application/json

sessionIdstringrequired

Session ID

parent_session_idstring

Immediate parent session ID for a Task subagent, if one exists

titlestring

Session title

statusstringrequired

Current session execution status

Allowed values

idlependingrunning
messageCountintegerrequired

Number of messages in session

createdAtintegerrequired

Creation timestamp (Unix ms). Read from a computer with computerId, a single session reports its earliest message's creation time (the request time when it has no messages), and a list reports when the session file was created (its last update time when the computer did not record that)

updatedAtintegerrequired

Last update timestamp (Unix ms). Read from a computer with computerId, a single session reports its latest message's update time (the request time when it has no messages)

completedAtinteger

Completion timestamp (Unix ms)

computerIdstring

The computer the session runs on: your computer on the session's host, otherwise the computer the session records. Absent when its host has none of your computers and it records none. Read from a computer with computerId, that computer

sessionSettingsobject
modelstring
reasoningEffortstring

Allowed values

nonedynamicoffminimallowmediumhighxhighmax
interactionModestring

Allowed values

autospecagimission
autonomyLevelstring

Allowed values

offlowmediumhigh
autonomyModestring

Deprecated: use interactionMode + autonomyLevel instead.

Allowed values

normalspecauto-lowauto-mediumauto-high
specModeModelstring
specModeReasoningEffortstring

Allowed values

nonedynamicoffminimallowmediumhighxhighmax
providerLockstring

Allowed values

anthropicopenaigeneric-chat-completion-apifactorygooglexaibedrock-converse
providerLockTimestampstring
apiProviderLockstring

Allowed values

bedrockanthropicvertex_anthropicbedrock_anthropicbedrock_conversebedrock_openaiopenaiazure_openaiazure_anthropicgooglexaimistralfireworksbasetentogethersnowflakedatabricks
archivedAtstring
tagsobject[]

Array items

namestringrequired

Minimum length: 1

metadataobject (map)

Values

string
worktreeobject
branchstring
lifecyclestring

Allowed values

ephemeralpersistent
pathstring
parentWorktreePathstring
removedAtstring
repoRootstringrequired
setupProfileIdstring
enabledToolIdsstring[]

Array items

string
disabledToolIdsstring[]

Array items

string
restrictToolIdsstring[]

Array items

string
toolExecutionModestring

Allowed values

direct_onlyscript_only
allowSubagentsInScriptsboolean
compactionModelstring
compactionThresholdCheckEnabledboolean
tagsobject[]

Session tags. A workstream carries a mission-v2 tag whose metadata has kind "orchestrator" and a missionId equal to its own sessionId; spaceId appears once its shared folder is attached

Array items

namestringrequired

Minimum length: 1

metadataobject (map)

Values

string
artifactsobject[]

Integration artifacts (pull requests, issues, pages) the session touched, oldest first

Array items

idstringrequired
urlstringrequired
titlestring
externalIdstring
providerstringrequired

Allowed values

githubgitlablinearjiranotionweblocalconnector
kindstringrequired

Allowed values

pull_requestissuedocumentrecordfilelink
connectorstring
fileRolestring

Allowed values

spec
actionstring

Default: "create"

Allowed values

createupdatedeleteviewclosemerge
sourcestringrequired

Allowed values

toolclassifieruser_message
createdAtstringrequired
toolCallIdstring
factoryCreditsnumber

Total Factory credits consumed by the session and its subagents

pinnedboolean

Pin preference reported by this operation. Present on a successful getSession response when includePinned=true, or on a successful updateSession response when its body supplied pinned. Absence means not reported, not unpinned.

400Response for status 400

application/json

variantOption 1 · object
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

variantOption 2 · object
messagestringrequired

Request validation error

errorsobject[]

Framework validation issues, when available

Array items

object
401Response for status 401

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

402Response for status 402

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

403Response for status 403

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

404Response for status 404

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

413Response for status 413

application/json

variantOption 1 · object
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

variantOption 2 · object

The platform edge refused a body over its own size limit before the route ran, and answered in JSON because the request accepts JSON, for example `{"error":{"code":"413","message":"Request Entity Too Large"}}`.

Must not include detail

errorobjectrequired
codestringrequired
messagestringrequired

text/plain

The platform edge refused a body over its own size limit before the route ran, for example `Request Entity Too Large` followed by an error code such as `FUNCTION_PAYLOAD_TOO_LARGE`.

string
415Response for status 415

application/json

messagestringrequired

Request validation error

errorsobject[]

Framework validation issues, when available

Array items

object
429Response for status 429

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

451Response for status 451

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

500Response for status 500

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

503Response for status 503

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

GET/api/v0/sessions/{sessionId}/children

List a session's child sessions

Returns the caller's sessions spawned under one parent session (Task subagents, mission agents) with their last reported status and the state of the computer each runs on, oldest first. A member of a shared workstream lists the agents under it they are a member of instead. Computer details are only included for computers the caller owns. Artifacts are included only when `includeArtifacts=true`; what each session is waiting on only when `includeAttention=true`; token usage and Factory Standard Credits, rolled up with each session's Task subagents, only when `includeUsage=true`. Archived sessions are left out unless `includeArchived=true`, which lists them with `archivedAt` and sets `archivedIncluded` on the response. For enterprise organizations, `usage.tokenCountsScope` is `byok_only` and token counts cover only calls the client reported as made with the organization's own provider keys (BYOK); managed-inference calls, and usage reported before clients tagged BYOK calls, count as zero. Credits always cover every call.

cURL
curl 'https://api.factory.ai/api/v0/sessions/{sessionId}/children' \
  -H "Authorization: Bearer $FACTORY_BEARER_TOKEN"

Parameters

sessionIdstringpathrequired

The parent session id

Minimum length: 1

includeArtifactsbooleanqueryoptional

Whether to include each child session’s integration artifacts (pull requests, issues, pages).

includeAttentionbooleanqueryoptional

Whether to include what each child session is waiting on (a permission prompt or a question).

includeUsagebooleanqueryoptional

Whether to include each child session’s token usage and Factory Standard Credits, rolled up with its Task subagents.

includeArchivedbooleanqueryoptional

Whether to include archived child sessions, such as a mission agent whose computer was reclaimed, each with its archivedAt. The response sets archivedIncluded when it does.

X-Factory-Org-Idstringheaderoptional

Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.

Responses

200Response for status 200

application/json

sessionsobject[]required

Array items

sessionIdstringrequired

Session ID

Minimum length: 1

titlestringrequired

Session title; empty until the session has one

statusstringrequired

Current session execution status

Allowed values

idlependingrunning
createdAtintegerrequired

Creation timestamp (Unix ms)

updatedAtintegerrequired

Last update timestamp (Unix ms); the status has held at least since then

tagsobject[]

Session tags, including any mission identity

Array items

namestringrequired

Minimum length: 1

metadataobject (map)

Values

string
artifactsobject[]

Integration artifacts the session created; only returned when includeArtifacts=true

Array items

idstringrequired

Minimum length: 1

urlstring <uri>required
titlestring
externalIdstring
providerstringrequired

Allowed values

githubgitlablinearjiranotionweblocalconnector
kindstringrequired

Allowed values

pull_requestissuedocumentrecordfilelink
connectorstring
fileRolestring

Allowed values

spec
actionstring

Default: "create"

Allowed values

createupdatedeleteviewclosemerge
sourcestringrequired

Allowed values

toolclassifieruser_message
createdAtstring <date-time>required
toolCallIdstring
attentionobject | null

What the session is waiting on, or null when it is not blocked; only returned when includeAttention=true

kindstringrequired

Allowed values

permissionask-user
sinceintegerrequired
usageobject | null

Token usage and Factory Standard Credits for the session and its Task subagents, or null when it has not reported any; factoryCredits is omitted when the organization hides billable usage. For enterprise organizations tokenCountsScope is byok_only and the token counts cover only calls the client reported as BYOK; managed-inference calls, and usage reported before clients tagged BYOK calls, count as zero. Only returned when includeUsage=true

inputTokensnumberrequired
outputTokensnumberrequired
cacheCreationTokensnumberrequired
cacheReadTokensnumberrequired
factoryCreditsnumber
tokenCountsScopestring

Allowed values

byok_only
archivedAtinteger | null

When the session was archived (Unix ms), or null when it is archived but its stored marker has no readable time; absent for a live session. Only returned when includeArchived=true

computerIdstring | nullrequired

The computer id the session records, or null when it records none, as for an agent an orchestrator starts on its own machine. Act on an agent by its session id: session operations find the machine it runs on, and GET /api/v0/sessions/{sessionId} reports it

Minimum length: 1

computerobject | nullrequired

The computer that computerId names, when the caller owns it; null when computerId is null, that computer is gone, or it is someone else's. Compare with computerId to tell these apart

idstringrequired
namestringrequired
statusstring

Allowed values

provisioningactiveerror
providerStatusstring | null

Last known sandbox lifecycle state; null for BYOM computers. More states may be added, so treat a value you do not know as unknown.

Allowed values

requestedprovisioningbootingrunningpausedsnapshottingterminatingterminatedfailednull
templateIdstring | nullrequired

Minimum length: 1

archivedIncludedboolean

Present when the list includes archived child sessions, as includeArchived=true asks for

Allowed values

true
400Response for status 400

application/json

variantOption 1 · object
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

variantOption 2 · object
messagestringrequired

Request validation error

errorsobject[]

Framework validation issues, when available

Array items

object
401Response for status 401

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

402Response for status 402

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

403Response for status 403

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

404Response for status 404

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

429Response for status 429

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

451Response for status 451

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

500Response for status 500

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

503Response for status 503

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

GET/api/v0/sessions/{sessionId}/elicitations

List pending session elicitations

Returns the permission prompts (including spec approvals) and AskUser questions the session is waiting on. Each item carries the same fields the SDK permissionHandler and askUserHandler receive, plus the requestId to answer it with, and a permission prompt lists only the options the answer endpoint accepts. Items use these SDK shapes, not the MCP elicitation JSON Schema form. Option pickers (pick_options requests) are not covered, and neither are queued AskUser questions (`blocking: false`, which the agent does not wait on); answer those in the Factory desktop app, web app or CLI. This feature is enabled for selected organizations only.

cURL
curl 'https://api.factory.ai/api/v0/sessions/{sessionId}/elicitations' \
  -H "Authorization: Bearer $FACTORY_BEARER_TOKEN"

Parameters

sessionIdstringpathrequired

Session ID

X-Factory-Org-Idstringheaderoptional

Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.

Responses

200Response for status 200

application/json

elicitationsobject[]required

Permission prompts and AskUser questions the session is waiting on. Queued AskUser questions, which the agent does not wait on, are not listed.

Array items

variantpermission
toolUsesobject[]required

Array items

toolUseobjectrequired
typestringrequired

Allowed values

tool_use
idstringrequired
inputobject (map)required

Values

object
namestringrequired
thoughtSignaturestring
namespacestring
scriptExecutionobject
runIdstringrequired
outerToolUseIdstringrequired
seennumber
scriptOracleobject
callCountnumberrequired
rowsobject[]required

Array items

idstringrequired
sitenumber
toolNamestringrequired
pathstring[]required

Array items

string
inputobject (map)required

Values

object
countnumberrequired
confirmationTypestringrequired

Allowed values

editexeccreateask_userexit_spec_moderecommend_missionpropose_missionstart_mission_runapply_patchmcp_toolsandbox_violationdroid_shield_violationscript
detailsobjectrequired
variantedit
typestringrequired

Allowed values

edit
filePathstringrequired
fileNamestringrequired
oldContentstring
newContentstring
variantexec
typestringrequired

Allowed values

exec
fullCommandstringrequired
commandstringrequired
extractedCommandsstring[]

Array items

string
impactLevelstring
riskLevelReasonstring
variantcreate
typestringrequired

Allowed values

create
filePathstringrequired
fileNamestringrequired
contentstringrequired
variantask_user
typestringrequired

Allowed values

ask_user
questionnairestringrequired
parsedobject
questionsobject[]required

Array items

indexnumberrequired
topicstringrequired
questionstringrequired
optionsstring[]required

Array items

string
multiSelectboolean
parseErrorobject
messagestringrequired
linenumber
variantexit_spec_mode
typestringrequired

Allowed values

exit_spec_mode
planstringrequired
titlestring
contextSavingsPercentnumber
supportsClientStartedHandoffboolean
variantpropose_mission
typestringrequired

Allowed values

propose_mission
proposalstringrequired
titlestring
variantstart_mission_run
typestringrequired

Allowed values

start_mission_run
runningMissionCountnumberrequired
runningMissionSessionIdsstring[]required

Array items

string
variantapply_patch
typestringrequired

Allowed values

apply_patch
filePathstringrequired
fileNamestringrequired
patchContentstringrequired
oldContentstring
newContentstring
filesobject[]

Array items

filePathstringrequired
fileNamestringrequired
operationstringrequired

Allowed values

createupdatedelete
moveTostring
oldContentstring
newContentstring
variantmcp_tool
typestringrequired

Allowed values

mcp_tool
toolNamestringrequired
impactLevelstringrequired
serverNamestring
actualToolNamestring
variantsandbox_violation
typestringrequired

Allowed values

sandbox_violation
violatingToolNamestringrequired
targetstringrequired
operationTypestringrequired

Allowed values

readwritenetworktool
violationTypestringrequired

Allowed values

filesystem-readfilesystem-writenetworktool
reasonstringrequired
violationReasonstring

Allowed values

deny-listnot-allowed
isOrgDenybooleanrequired
variantdroid_shield_violation
typestringrequired

Allowed values

droid_shield_violation
commandstringrequired
reasonstringrequired
variantrecommend_mission
typestringrequired

Allowed values

recommend_mission
reasonstringrequired
variantscript
typestringrequired

Allowed values

script
impactLevelstringrequired
callsobject[]required

Array items

toolNamestringrequired
linenumberrequired
columnnumberrequired
toolInputobject (map)required

Values

object
confirmationobjectrequired
variantedit
typestringrequired

Allowed values

edit
filePathstringrequired
fileNamestringrequired
oldContentstring
newContentstring
variantexec
typestringrequired

Allowed values

exec
fullCommandstringrequired
commandstringrequired
extractedCommandsstring[]

Array items

string
impactLevelstring
riskLevelReasonstring
variantcreate
typestringrequired

Allowed values

create
filePathstringrequired
fileNamestringrequired
contentstringrequired
variantask_user
typestringrequired

Allowed values

ask_user
questionnairestringrequired
parsedobject
questionsobject[]required

Array items

indexnumberrequired
topicstringrequired
questionstringrequired
optionsstring[]required

Array items

multiSelectboolean
parseErrorobject
messagestringrequired
linenumber
variantexit_spec_mode
typestringrequired

Allowed values

exit_spec_mode
planstringrequired
titlestring
contextSavingsPercentnumber
supportsClientStartedHandoffboolean
variantpropose_mission
typestringrequired

Allowed values

propose_mission
proposalstringrequired
titlestring
variantstart_mission_run
typestringrequired

Allowed values

start_mission_run
runningMissionCountnumberrequired
runningMissionSessionIdsstring[]required

Array items

string
variantapply_patch
typestringrequired

Allowed values

apply_patch
filePathstringrequired
fileNamestringrequired
patchContentstringrequired
oldContentstring
newContentstring
filesobject[]

Array items

filePathstringrequired
fileNamestringrequired
operationstringrequired

Allowed values

createupdatedelete
moveTostring
oldContentstring
newContentstring
variantmcp_tool
typestringrequired

Allowed values

mcp_tool
toolNamestringrequired
impactLevelstringrequired
serverNamestring
actualToolNamestring
variantsandbox_violation
typestringrequired

Allowed values

sandbox_violation
violatingToolNamestringrequired
targetstringrequired
operationTypestringrequired

Allowed values

readwritenetworktool
violationTypestringrequired

Allowed values

filesystem-readfilesystem-writenetworktool
reasonstringrequired
violationReasonstring

Allowed values

deny-listnot-allowed
isOrgDenybooleanrequired
variantdroid_shield_violation
typestringrequired

Allowed values

droid_shield_violation
commandstringrequired
reasonstringrequired
variantrecommend_mission
typestringrequired

Allowed values

recommend_mission
reasonstringrequired
alwaysAskboolean
optionsobject[]required

Array items

labelstringrequired
valuestringrequired

Allowed values

proceed_onceproceed_alwaysproceed_always_fileproceed_auto_runproceed_auto_run_lowproceed_auto_run_mediumproceed_auto_run_highproceed_new_sessionproceed_new_session_lowproceed_new_session_mediumproceed_new_session_highproceed_editproceed_always_toolsproceed_always_serverproceed_report_false_positivecancel
associatedSessionIdsstring[]

Array items

string
typestringrequired

Allowed values

permission
requestIdstringrequired

ID to answer the prompt with

Minimum length: 1

variantask-user
toolCallIdstringrequired
questionsobject[]required

Array items

indexnumberrequired
topicstringrequired
questionstringrequired
optionsstring[]required

Array items

string
optionDescriptionsstring[]

Array items

string
multiSelectboolean
contextstring
blockingboolean
typestringrequired

Allowed values

ask-user
requestIdstringrequired

ID to answer the questions with

Minimum length: 1

400Response for status 400

application/json

variantOption 1 · object
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

variantOption 2 · object
messagestringrequired

Request validation error

errorsobject[]

Framework validation issues, when available

Array items

object
401Response for status 401

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

402Response for status 402

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

403Response for status 403

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

404Response for status 404

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

429Response for status 429

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

451Response for status 451

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

500Response for status 500

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

503Response for status 503

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

504Response for status 504

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

POST/api/v0/sessions/{sessionId}/elicitations/{requestId}

Answer a pending session elicitation

Answers one pending elicitation with the same result the SDK handlers return: `selectedOption` (one of the prompt's listed `options[].value`) for a permission prompt, or `answers` (exactly one per question, matched by index) or `cancelled: true` for AskUser questions. Persistent "always" options, `proceed_edit`, and `proceed_new_session*` are not listed or accepted. `comment` reaches the agent only when approving a spec; a `cancel` drops it, so send feedback with `POST /api/v0/sessions/{sessionId}/messages` after rejecting. 200 means the session applied this answer; for a permission prompt the response names the option it applied. Returns 409 when the elicitation is not pending: it was never a pending prompt of this session (a queued AskUser question counts as not pending), another client answered it first, or its turn ended. Returns 503 when the session's computer runs a Droid version that cannot answer elicitations through this API. This feature is enabled for selected organizations only.

cURL
curl -X POST 'https://api.factory.ai/api/v0/sessions/{sessionId}/elicitations/{requestId}' \
  -H "Authorization: Bearer $FACTORY_BEARER_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{ ... }'

Parameters

sessionIdstringpathrequired

Session ID

requestIdstringpathrequired

Pending elicitation ID

Minimum length: 1

X-Factory-Org-Idstringheaderoptional

Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.

Request body

Required

application/json

variantOption 1 · object

No additional properties

cancelledbooleanrequired

Dismiss an AskUser elicitation without answering

Allowed values

true
answersobject[]

Maximum items: 0

Array items

No additional properties

indexnumberrequired
questionstringrequired
answerstringrequired
selectedOptionnot allowed
variantOption 2 · object

No additional properties

answersobject[]required

Answers to an AskUser elicitation: exactly one per question, matched by index

Minimum items: 1

Array items

No additional properties

indexnumberrequired
questionstringrequired
answerstringrequired
cancelledboolean

Allowed values

false
selectedOptionnot allowed
variantOption 3 · object

No additional properties

selectedOptionstringrequired

One of the permission elicitation's options[].value

Allowed values

proceed_onceproceed_alwaysproceed_always_fileproceed_auto_runproceed_auto_run_lowproceed_auto_run_mediumproceed_auto_run_highproceed_new_sessionproceed_new_session_lowproceed_new_session_mediumproceed_new_session_highproceed_editproceed_always_toolsproceed_always_serverproceed_report_false_positivecancel
commentstring

Note passed to the agent when approving a spec. Rejections and other prompts drop it; after cancel, send feedback as a message

answersnot allowed
cancellednot allowed

Responses

200Response for status 200

application/json

requestIdstringrequired

The answered elicitation ID

Minimum length: 1

selectedOptionstring

For a permission prompt, the option the session settled it with: the one this answer sent

Allowed values

proceed_onceproceed_alwaysproceed_always_fileproceed_auto_runproceed_auto_run_lowproceed_auto_run_mediumproceed_auto_run_highproceed_new_sessionproceed_new_session_lowproceed_new_session_mediumproceed_new_session_highproceed_editproceed_always_toolsproceed_always_serverproceed_report_false_positivecancel
400Response for status 400

application/json

variantOption 1 · object
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

variantOption 2 · object
messagestringrequired

Request validation error

errorsobject[]

Framework validation issues, when available

Array items

object
401Response for status 401

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

402Response for status 402

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

403Response for status 403

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

404Response for status 404

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

409Response for status 409

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

413Response for status 413

application/json

variantOption 1 · object
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

variantOption 2 · object

The platform edge refused a body over its own size limit before the route ran, and answered in JSON because the request accepts JSON, for example `{"error":{"code":"413","message":"Request Entity Too Large"}}`.

Must not include detail

errorobjectrequired
codestringrequired
messagestringrequired

text/plain

The platform edge refused a body over its own size limit before the route ran, for example `Request Entity Too Large` followed by an error code such as `FUNCTION_PAYLOAD_TOO_LARGE`.

string
415Response for status 415

application/json

messagestringrequired

Request validation error

errorsobject[]

Framework validation issues, when available

Array items

object
429Response for status 429

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

451Response for status 451

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

500Response for status 500

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

503Response for status 503

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

504Response for status 504

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

POST/api/v0/sessions/{sessionId}/interrupt

Interrupt a session

Interrupts a running agent loop. Idempotent if already idle. This feature is enabled for selected organizations only.

cURL
curl -X POST 'https://api.factory.ai/api/v0/sessions/{sessionId}/interrupt' \
  -H "Authorization: Bearer $FACTORY_BEARER_TOKEN"

Parameters

sessionIdstringpathrequired
X-Factory-Org-Idstringheaderoptional

Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.

Responses

200Response for status 200

application/json

statusstringrequired

Current session execution status

Allowed values

idlependingrunning
400Response for status 400

application/json

variantOption 1 · object
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

variantOption 2 · object
messagestringrequired

Request validation error

errorsobject[]

Framework validation issues, when available

Array items

object
401Response for status 401

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

402Response for status 402

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

403Response for status 403

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

404Response for status 404

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

429Response for status 429

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

451Response for status 451

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

500Response for status 500

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

503Response for status 503

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

GET/api/v0/sessions/{sessionId}/messages

Get session messages

Returns paginated message history with optional role filtering. This feature is enabled for selected organizations only.

cURL
curl 'https://api.factory.ai/api/v0/sessions/{sessionId}/messages' \
  -H "Authorization: Bearer $FACTORY_BEARER_TOKEN"

Parameters

sessionIdstringpathrequired
limitintegerqueryoptional

Maximum number of items to return (1-100)

Default: 20

cursorstringqueryoptional

Cursor for pagination

computerIdstringqueryoptional

Computer ID to query directly

rolestringqueryoptional

Filter messages by role

Allowed values

userassistanttool
X-Factory-Org-Idstringheaderoptional

Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.

Responses

200Response for status 200

application/json

messagesobject[]required

Array items

idstringrequired
rolestringrequired

Allowed values

userassistanttoolsystem
contentobject[]required

Array items

varianttext
idstring
typestringrequired

Allowed values

text
textstringrequired
variantimage
idstring
typestringrequired

Allowed values

image
sourceobjectrequired
typestringrequired

Allowed values

base64
datastringrequired
mediaTypestringrequired

Allowed values

image/jpegimage/pngimage/gifimage/webp
elidedobject
bytesintegerrequired

Minimum: 0

linesinteger

Minimum: 0

widthinteger

Greater than: 0

heightinteger

Greater than: 0

previewstring
generatedboolean
variantthinking
idstring
typestringrequired

Allowed values

thinking
signaturestringrequired
signatureProviderstring
variantOption 1
string

Allowed values

anthropicopenaigeneric-chat-completion-apifactorygooglexaibedrock-converse
variantOption 2
string

Allowed values

unknown
thinkingstringrequired
durationMsnumber

Minimum: 0

progressUpdateboolean
variantredacted_thinking
idstring
typestringrequired

Allowed values

redacted_thinking
datastringrequired
varianttool_use
typestringrequired

Allowed values

tool_use
idstringrequired
inputobject (map)required

Values

object
namestringrequired
thoughtSignaturestring
namespacestring
scriptExecutionobject
runIdstringrequired
outerToolUseIdstringrequired
seennumber
scriptOracleobject
callCountnumberrequired
rowsobject[]required

Array items

idstringrequired
sitenumber
toolNamestringrequired
pathstring[]required

Array items

string
inputobject (map)required

Values

object
countnumberrequired
varianttool_result
idstring
typestringrequired

Allowed values

tool_result
toolUseIdstringrequired
contentstring | object[]
variantOption 1 · string
variantOption 2 · object[]

Array items

varianttext
idstring
typestringrequired

Allowed values

text
textstringrequired
variantimage
idstring
typestringrequired

Allowed values

image
sourceobjectrequired
typestringrequired

Allowed values

base64
datastringrequired
mediaTypestringrequired

Allowed values

image/jpegimage/pngimage/gifimage/webp
elidedobject
bytesintegerrequired

Minimum: 0

linesinteger

Minimum: 0

widthinteger

Greater than: 0

heightinteger

Greater than: 0

previewstring
generatedboolean
variantdocument
idstring
typestringrequired

Allowed values

document
sourceobjectrequired
variantbase64
typestringrequired

Allowed values

base64
mediaTypestringrequired

Allowed values

application/pdf
datastringrequired
parsedDatastring
namestring
pathstring
varianttext
typestringrequired

Allowed values

text
mediaTypestringrequired

Allowed values

text/plain
datastringrequired
namestring
mimestring
elidedobject
bytesintegerrequired

Minimum: 0

linesinteger

Minimum: 0

widthinteger

Greater than: 0

heightinteger

Greater than: 0

previewstring
elidedobject
bytesintegerrequired

Minimum: 0

linesinteger

Minimum: 0

widthinteger

Greater than: 0

heightinteger

Greater than: 0

previewstring
isErrorboolean
modelContentstring
respondedByobject
userIdstringrequired
namestring
sourcestring

Allowed values

webdesktopcli_tuicli_execcli_acpslackjiralinearmicrosoft-teamsgoogle-chatsessions_apiapisdkautomationreadiness-remediationreadiness-evaluationwiki-generationwiki-ci-setup
receiptstring
modelOnlyboolean
variantdocument
idstring
typestringrequired

Allowed values

document
sourceobjectrequired
variantbase64
typestringrequired

Allowed values

base64
mediaTypestringrequired

Allowed values

application/pdf
datastringrequired
parsedDatastring
namestring
pathstring
varianttext
typestringrequired

Allowed values

text
mediaTypestringrequired

Allowed values

text/plain
datastringrequired
namestring
mimestring
elidedobject
bytesintegerrequired

Minimum: 0

linesinteger

Minimum: 0

widthinteger

Greater than: 0

heightinteger

Greater than: 0

previewstring
createdAtnumberrequired

Unix timestamp, in milliseconds, when the message was created.

updatedAtnumberrequired

Unix timestamp, in milliseconds, when the message last changed.

parentIdstring
seqinteger

Minimum: 0

userMessageSourcestring

Allowed values

webdesktopcli_tuicli_execcli_acpslackjiralinearmicrosoft-teamsgoogle-chatsessions_apiapisdkautomationreadiness-remediationreadiness-evaluationwiki-generationwiki-ci-setup
senderobject
variantorchestrator
kindstringrequired

Allowed values

orchestrator
sessionIdstringrequired

Minimum length: 1

variantagent
kindstringrequired

Allowed values

agent
titlestringrequired

Minimum length: 1

sessionIdstringrequired

Minimum length: 1

authorobject
userIdstringrequired
namestring
sourcestring

Allowed values

webdesktopcli_tuicli_execcli_acpslackjiralinearmicrosoft-teamsgoogle-chatsessions_apiapisdkautomationreadiness-remediationreadiness-evaluationwiki-generationwiki-ci-setup
receiptstring
docCommentThreadobject
threadIdstring <uuid>required
docobject
variantOption 1 · object
variantspace
kindstringrequired

Allowed values

space
spaceIdstring <uuid>required
documentIdstring <uuid>required
variantlocal
kindstringrequired

Allowed values

local
machineIdstringrequired

Minimum length: 1

pathstringrequired

Minimum length: 1

variantunknown
kindstringrequired

Allowed values

unknown
reportedKindstring
documentPathstringrequired

Minimum length: 1

mentionsobject[]

Array items

userIdstringrequired
namestringrequired
interactionModestring

Allowed values

autospecagimission
visibilitystring

Allowed values

bothllm_onlyuser_only
systemNoticeboolean

Marks a notice the harness wrote into the conversation, such as a provider error or a skill activation. The role is unchanged by it, so readers that predate the marker still show its text.

Allowed values

true
hookRowIdstring

On a notice that repeats a hook's error: the id of the hook row that already shows the error. A client that draws that hook row can leave the notice out.

endedEarlyboolean

Marks an assistant message that ended early. When the session is loaded, a model-owned call of it that has no result is not run or resumed, unless a pending marker reserves that call or a message without the mark also makes it.

Allowed values

true
openaiMessageIdstring
openaiPhasestring | null

Allowed values

commentaryfinal_answernull
openaiEncryptedContentstring
openaiReasoningIdstring
openaiReasoningSummarystring
geminiThoughtSignaturestring

@deprecated Use thinking block `signature` fields with `signatureProvider: "google"` instead. Do not use in new code.

chatCompletionReasoningFieldstring

Allowed values

reasoningreasoning_content
chatCompletionReasoningContentstring
geminiNativeContentstring
isUserVisibleboolean
isErrorboolean
modelIdstring
apiProviderstring

Allowed values

bedrockanthropicvertex_anthropicbedrock_anthropicbedrock_conversebedrock_openaiopenaiazure_openaiazure_anthropicgooglexaimistralfireworksbasetentogethersnowflakedatabricks
routerIdstring
reasoningEffortstring

Allowed values

nonedynamicoffminimallowmediumhighxhighmax
hookEventNamestring
hookMatcherstring
hookCommandsobject[]

Array items

commandstringrequired
timeoutnumber
hookStatusstring

Allowed values

executingcompletederror
hookResultsobject[]

Array items

exitCodenumberrequired
stdoutstringrequired
stderrstringrequired
suppressOutputboolean
cancelledboolean

The run's abort ended this hook before it exited; exitCode, stdout and stderr are the cancellation's, not the hook's.

Allowed values

true
errorstring

Diagnostic for this hook alone, never its decision: why it failed (it could not run, timed out, printed JSON that does not parse or fails validation, or exited non-zero with plain-text stdout, or with any stdout where onFailure: "block" applies), or, for an exit 2, its stderr, else its plain-text stdout, else its exit code. A JSON block or deny alone does not create a diagnostic. Absent when the hook succeeded or was cancelled, and on rows recorded before this field existed even if the hook failed. A non-zero exitCode alone is not a failure: exit 1 with valid JSON output succeeds, except on a PreToolUse, PostToolUse, UserPromptSubmit or PreCompact hook with onFailure: "block", which fails on any exit other than 0 or 2.

hookToolCallIdstring
hookParentIdstring
hookOrdernumber
hookPreventedActionboolean
hiddenFromUserViewsboolean
hookStartTimenumber

Unix timestamp, in milliseconds, when the hook started.

hookEndTimenumber

Unix timestamp, in milliseconds, when the hook finished.

isParallelExecutionboolean
parallelGroupIdstring
paginationobjectrequired
hasMorebooleanrequired

Whether there are more items after this page

nextCursorstring | nullrequired

Cursor to use for the next page, null if no more pages

400Response for status 400

application/json

variantOption 1 · object
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

variantOption 2 · object
messagestringrequired

Request validation error

errorsobject[]

Framework validation issues, when available

Array items

object
401Response for status 401

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

402Response for status 402

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

403Response for status 403

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

404Response for status 404

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

429Response for status 429

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

451Response for status 451

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

500Response for status 500

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

503Response for status 503

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

504Response for status 504

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

POST/api/v0/sessions/{sessionId}/messages

Add a message to a session

Adds a user message and returns once the computer accepts it. The agent turn runs asynchronously, so read `GET /api/v0/sessions/{sessionId}` and its messages to follow it. Supports text, images, and file attachments. This feature is enabled for selected organizations only.

cURL
curl -X POST 'https://api.factory.ai/api/v0/sessions/{sessionId}/messages' \
  -H "Authorization: Bearer $FACTORY_BEARER_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{ ... }'

Parameters

sessionIdstringpathrequired
X-Factory-Org-Idstringheaderoptional

Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.

Request body

Required

application/json

No additional properties

textstringrequired

Message text content

imagesobject[]

Optional base64-encoded images

Array items

No additional properties

typestringrequired

Allowed values

base64
datastringrequired
mediaTypestringrequired

Allowed values

image/jpegimage/pngimage/gifimage/webp
filesobject[]

Optional file attachments (PDFs, text files)

Array items

variantbase64

No additional properties

typestringrequired

Allowed values

base64
mediaTypestringrequired

Allowed values

application/pdf
datastringrequired
parsedDatastring
namestring
pathstring
varianttext

No additional properties

typestringrequired

Allowed values

text
mediaTypestringrequired

Allowed values

text/plain
datastringrequired
namestring
mimestring
computerIdstring

Computer ID to route the message to; falls back to the session.computerId if omitted

senderobject

The mission session sending this message (the orchestrator, or an agent by name), stored on the message so clients can attribute it and the model sees a [From …] header. Omit for human messages.

variantorchestrator

No additional properties

kindstringrequired

Allowed values

orchestrator
sessionIdstringrequired

Minimum length: 1

variantagent

No additional properties

kindstringrequired

Allowed values

agent
titlestringrequired

Minimum length: 1

Maximum length: 120

Pattern: ^\P{Cc}+$

sessionIdstringrequired

Minimum length: 1

Responses

200Response for status 200

application/json

messageIdstringrequired

ID of the created user message

statusstringrequired

Agent status after message submission

Allowed values

idlependingrunning
recipientDroidStatusstring

The recipient's agent status before this message was submitted: idle means the message starts a turn now, running means it is queued behind the current turn. Omitted when the session was addressed by computerId.

Allowed values

idlependingrunning
400Response for status 400

application/json

variantOption 1 · object
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

variantOption 2 · object
messagestringrequired

Request validation error

errorsobject[]

Framework validation issues, when available

Array items

object
401Response for status 401

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

402Response for status 402

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

403Response for status 403

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

404Response for status 404

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

413Response for status 413

application/json

variantOption 1 · object
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

variantOption 2 · object

The platform edge refused a body over its own size limit before the route ran, and answered in JSON because the request accepts JSON, for example `{"error":{"code":"413","message":"Request Entity Too Large"}}`.

Must not include detail

errorobjectrequired
codestringrequired
messagestringrequired

text/plain

The platform edge refused a body over its own size limit before the route ran, for example `Request Entity Too Large` followed by an error code such as `FUNCTION_PAYLOAD_TOO_LARGE`.

string
415Response for status 415

application/json

messagestringrequired

Request validation error

errorsobject[]

Framework validation issues, when available

Array items

object
429Response for status 429

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

451Response for status 451

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

500Response for status 500

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

503Response for status 503

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

504Response for status 504

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

GET/api/v0/sessions/{sessionId}/messages/{messageId}

Get a message by ID

Returns a single message from the session by its ID. This feature is enabled for selected organizations only.

cURL
curl 'https://api.factory.ai/api/v0/sessions/{sessionId}/messages/{messageId}' \
  -H "Authorization: Bearer $FACTORY_BEARER_TOKEN"

Parameters

sessionIdstringpathrequired

Session ID

messageIdstringpathrequired

Message ID

computerIdstringqueryoptional

Computer ID to query directly

X-Factory-Org-Idstringheaderoptional

Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.

Responses

200Response for status 200

application/json

idstringrequired
rolestringrequired

Allowed values

userassistanttoolsystem
contentobject[]required

Array items

varianttext
idstring
typestringrequired

Allowed values

text
textstringrequired
variantimage
idstring
typestringrequired

Allowed values

image
sourceobjectrequired
typestringrequired

Allowed values

base64
datastringrequired
mediaTypestringrequired

Allowed values

image/jpegimage/pngimage/gifimage/webp
elidedobject
bytesintegerrequired

Minimum: 0

linesinteger

Minimum: 0

widthinteger

Greater than: 0

heightinteger

Greater than: 0

previewstring
generatedboolean
variantthinking
idstring
typestringrequired

Allowed values

thinking
signaturestringrequired
signatureProviderstring
variantOption 1
string

Allowed values

anthropicopenaigeneric-chat-completion-apifactorygooglexaibedrock-converse
variantOption 2
string

Allowed values

unknown
thinkingstringrequired
durationMsnumber

Minimum: 0

progressUpdateboolean
variantredacted_thinking
idstring
typestringrequired

Allowed values

redacted_thinking
datastringrequired
varianttool_use
typestringrequired

Allowed values

tool_use
idstringrequired
inputobject (map)required

Values

object
namestringrequired
thoughtSignaturestring
namespacestring
scriptExecutionobject
runIdstringrequired
outerToolUseIdstringrequired
seennumber
scriptOracleobject
callCountnumberrequired
rowsobject[]required

Array items

idstringrequired
sitenumber
toolNamestringrequired
pathstring[]required

Array items

string
inputobject (map)required

Values

object
countnumberrequired
varianttool_result
idstring
typestringrequired

Allowed values

tool_result
toolUseIdstringrequired
contentstring | object[]
variantOption 1 · string
variantOption 2 · object[]

Array items

varianttext
idstring
typestringrequired

Allowed values

text
textstringrequired
variantimage
idstring
typestringrequired

Allowed values

image
sourceobjectrequired
typestringrequired

Allowed values

base64
datastringrequired
mediaTypestringrequired

Allowed values

image/jpegimage/pngimage/gifimage/webp
elidedobject
bytesintegerrequired

Minimum: 0

linesinteger

Minimum: 0

widthinteger

Greater than: 0

heightinteger

Greater than: 0

previewstring
generatedboolean
variantdocument
idstring
typestringrequired

Allowed values

document
sourceobjectrequired
variantbase64
typestringrequired

Allowed values

base64
mediaTypestringrequired

Allowed values

application/pdf
datastringrequired
parsedDatastring
namestring
pathstring
varianttext
typestringrequired

Allowed values

text
mediaTypestringrequired

Allowed values

text/plain
datastringrequired
namestring
mimestring
elidedobject
bytesintegerrequired

Minimum: 0

linesinteger

Minimum: 0

widthinteger

Greater than: 0

heightinteger

Greater than: 0

previewstring
elidedobject
bytesintegerrequired

Minimum: 0

linesinteger

Minimum: 0

widthinteger

Greater than: 0

heightinteger

Greater than: 0

previewstring
isErrorboolean
modelContentstring
respondedByobject
userIdstringrequired
namestring
sourcestring

Allowed values

webdesktopcli_tuicli_execcli_acpslackjiralinearmicrosoft-teamsgoogle-chatsessions_apiapisdkautomationreadiness-remediationreadiness-evaluationwiki-generationwiki-ci-setup
receiptstring
modelOnlyboolean
variantdocument
idstring
typestringrequired

Allowed values

document
sourceobjectrequired
variantbase64
typestringrequired

Allowed values

base64
mediaTypestringrequired

Allowed values

application/pdf
datastringrequired
parsedDatastring
namestring
pathstring
varianttext
typestringrequired

Allowed values

text
mediaTypestringrequired

Allowed values

text/plain
datastringrequired
namestring
mimestring
elidedobject
bytesintegerrequired

Minimum: 0

linesinteger

Minimum: 0

widthinteger

Greater than: 0

heightinteger

Greater than: 0

previewstring
createdAtnumberrequired

Unix timestamp, in milliseconds, when the message was created.

updatedAtnumberrequired

Unix timestamp, in milliseconds, when the message last changed.

parentIdstring
seqinteger

Minimum: 0

userMessageSourcestring

Allowed values

webdesktopcli_tuicli_execcli_acpslackjiralinearmicrosoft-teamsgoogle-chatsessions_apiapisdkautomationreadiness-remediationreadiness-evaluationwiki-generationwiki-ci-setup
senderobject
variantorchestrator
kindstringrequired

Allowed values

orchestrator
sessionIdstringrequired

Minimum length: 1

variantagent
kindstringrequired

Allowed values

agent
titlestringrequired

Minimum length: 1

sessionIdstringrequired

Minimum length: 1

authorobject
userIdstringrequired
namestring
sourcestring

Allowed values

webdesktopcli_tuicli_execcli_acpslackjiralinearmicrosoft-teamsgoogle-chatsessions_apiapisdkautomationreadiness-remediationreadiness-evaluationwiki-generationwiki-ci-setup
receiptstring
docCommentThreadobject
threadIdstring <uuid>required
docobject
variantOption 1 · object
variantspace
kindstringrequired

Allowed values

space
spaceIdstring <uuid>required
documentIdstring <uuid>required
variantlocal
kindstringrequired

Allowed values

local
machineIdstringrequired

Minimum length: 1

pathstringrequired

Minimum length: 1

variantunknown
kindstringrequired

Allowed values

unknown
reportedKindstring
documentPathstringrequired

Minimum length: 1

mentionsobject[]

Array items

userIdstringrequired
namestringrequired
interactionModestring

Allowed values

autospecagimission
visibilitystring

Allowed values

bothllm_onlyuser_only
systemNoticeboolean

Marks a notice the harness wrote into the conversation, such as a provider error or a skill activation. The role is unchanged by it, so readers that predate the marker still show its text.

Allowed values

true
hookRowIdstring

On a notice that repeats a hook's error: the id of the hook row that already shows the error. A client that draws that hook row can leave the notice out.

endedEarlyboolean

Marks an assistant message that ended early. When the session is loaded, a model-owned call of it that has no result is not run or resumed, unless a pending marker reserves that call or a message without the mark also makes it.

Allowed values

true
openaiMessageIdstring
openaiPhasestring | null

Allowed values

commentaryfinal_answernull
openaiEncryptedContentstring
openaiReasoningIdstring
openaiReasoningSummarystring
geminiThoughtSignaturestring

@deprecated Use thinking block `signature` fields with `signatureProvider: "google"` instead. Do not use in new code.

chatCompletionReasoningFieldstring

Allowed values

reasoningreasoning_content
chatCompletionReasoningContentstring
geminiNativeContentstring
isUserVisibleboolean
isErrorboolean
modelIdstring
apiProviderstring

Allowed values

bedrockanthropicvertex_anthropicbedrock_anthropicbedrock_conversebedrock_openaiopenaiazure_openaiazure_anthropicgooglexaimistralfireworksbasetentogethersnowflakedatabricks
routerIdstring
reasoningEffortstring

Allowed values

nonedynamicoffminimallowmediumhighxhighmax
hookEventNamestring
hookMatcherstring
hookCommandsobject[]

Array items

commandstringrequired
timeoutnumber
hookStatusstring

Allowed values

executingcompletederror
hookResultsobject[]

Array items

exitCodenumberrequired
stdoutstringrequired
stderrstringrequired
suppressOutputboolean
cancelledboolean

The run's abort ended this hook before it exited; exitCode, stdout and stderr are the cancellation's, not the hook's.

Allowed values

true
errorstring

Diagnostic for this hook alone, never its decision: why it failed (it could not run, timed out, printed JSON that does not parse or fails validation, or exited non-zero with plain-text stdout, or with any stdout where onFailure: "block" applies), or, for an exit 2, its stderr, else its plain-text stdout, else its exit code. A JSON block or deny alone does not create a diagnostic. Absent when the hook succeeded or was cancelled, and on rows recorded before this field existed even if the hook failed. A non-zero exitCode alone is not a failure: exit 1 with valid JSON output succeeds, except on a PreToolUse, PostToolUse, UserPromptSubmit or PreCompact hook with onFailure: "block", which fails on any exit other than 0 or 2.

hookToolCallIdstring
hookParentIdstring
hookOrdernumber
hookPreventedActionboolean
hiddenFromUserViewsboolean
hookStartTimenumber

Unix timestamp, in milliseconds, when the hook started.

hookEndTimenumber

Unix timestamp, in milliseconds, when the hook finished.

isParallelExecutionboolean
parallelGroupIdstring
400Response for status 400

application/json

variantOption 1 · object
detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

variantOption 2 · object
messagestringrequired

Request validation error

errorsobject[]

Framework validation issues, when available

Array items

object
401Response for status 401

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

402Response for status 402

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

403Response for status 403

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

404Response for status 404

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

429Response for status 429

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

451Response for status 451

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

500Response for status 500

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

503Response for status 503

application/json

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users

errorobject

The same error fields, for clients that only read body.error

detailstringrequired

Human-readable error message

statusnumberrequired

HTTP status code

titlestringrequired

HTTP status title

metadataobject (map)

Additional error metadata

Values

object
requestIdstring

Request identifier to include when contacting support

codestring

Stable machine-readable error code, when one applies

displayToUserboolean

True when detail is curated copy that is safe to show users