Start typing to search the documentation.

OpenAPI 3.1.0

HTTP API

Experimental HttpApi surface for selected instance routes.

139 operations236 schemasOpenAPI JSON

Resource

health

get/api/healthCheck server health

Report the owning server process and its application status.

Operation IDv2.health.get

Responses

200ServiceHealth
application/jsonServiceHealth
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded

Resource

server

get/api/serverGet server information

Return the URLs that can be used to connect to this server.

Operation IDv2.server.get

Responses

200Success
application/json
object
urls
string[]required
Items
string
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded

Resource

location

get/api/locationGet location

Resolve the requested location or the server default location.

Operation IDv2.location.get

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Location.Info
application/jsonLocation.InfoEncoded
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded

Resource

agent

get/api/agentList agents

Retrieve currently registered agents.

Operation IDv2.agent.list

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
object
data
Agent.Info[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
get/api/agent/{agentID}Get agent

Retrieve a single currently registered agent.

Operation IDv2.agent.get

Parameters

NameLocationTypeDescription
agentIDrequiredpath
string
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404AgentNotFoundError

Resource

plugin

Experimental plugin routes.

get/api/pluginList plugins

Retrieve enabled server plugins and their current status.

Operation IDv2.plugin.list

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
object
data
Plugin.Info[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
post/api/plugin/await-activationWait for plugin activation

Wait for configured plugin activation at a Location to settle, including missing-package installs. Completion does not imply every plugin succeeded or background resource discovery finished. Cancelling this wait does not cancel activation.

Operation IDv2.plugin.awaitActivation

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
post/api/plugin/checkCheck plugin updates

Check one or all package plugins for available updates.

Operation IDv2.plugin.check

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Request body required

application/json
object
target
string | null
string
or
null

Responses

200Success
application/json
object
data
Plugin.Info[]required
400InvalidRequestError
application/json
InvalidRequestErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
post/api/plugin/updateUpdate plugins

Update package plugins concurrently and notify active locations to reload them. Responds once every update has finished; fails when any update fails.

Operation IDv2.plugin.update

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Request body required

application/json
object
targets
string[]required
Items
string

Responses

204<No Content>
400InvalidRequestError
application/json
InvalidRequestErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
503ServiceUnavailableError

Resource

session

Experimental session routes.

get/api/sessionList sessions

Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.

Operation IDv2.session.list

Parameters

NameLocationTypeDescription
workspacequery
string | null
string
pattern ^wrk
or
null
No description
limitquery
string | null

Maximum number of sessions to return. Defaults to the newest 50 sessions.

string
or
null
No description
orderquery
"asc" | "desc" | null

Session order for the first page. Use desc for newest first or asc for oldest first.

"asc" | "desc"
Values"asc" | "desc"
or
null
No description
searchquery
string | null
string
or
null
No description
parentIDquery
string | "null" | null
string | "null"

Filter by parent session. Use null to return only root sessions.

string
pattern ^ses
or
"null"
Values"null"
or
null
No description
directoryquery
string | null
string
or
null
No description
projectquery
string | null
string
or
null
No description
subpathquery
string | null
string
or
null
No description
cursorquery
string | null
string

Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response.

or
null
No description

Responses

200SessionsResponse
application/jsonSessionsResponse
400InvalidCursorError | InvalidRequestError
application/json
InvalidCursorErrorEncoded | InvalidRequestErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
post/api/sessionCreate session

Create a session at the requested location.

Operation IDv2.session.create

Request body required

application/json
object
id
string | null
string
pattern ^ses
or
null
title
string | null
string
or
null
agent
string | null
string
or
null
model
Model.Ref | null
or
null
location
Location.Ref | null
metadata
Session.Metadata | null

Responses

200Success
application/json
object
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
get/api/session/statsGet session statistics

Aggregate local session activity, usage, and tool reliability for a time range.

Operation IDv2.session.stats

Parameters

NameLocationTypeDescription
fromquery
string | null
string
or
null
No description
toquery
string | null
string
or
null
No description
projectquery
string | null
string
or
null
No description
timezonequery
string | null
string
or
null
No description
toolsquery
"none" | "summary" | "detail" | null
"none" | "summary" | "detail"
Values"none" | "summary" | "detail"
or
null
No description

Responses

200Success
application/json
400InvalidRequestError
application/json
InvalidRequestErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
post/api/session/importImport session

Import a projected session transcript at the requested location. If parentID is supplied, the parent session must already exist; import parents before children.

Operation IDv2.session.import

Request body required

application/json
object
messages
Session.Message.Info[]required
location
Location.Ref | null

Responses

200Success
application/json
object
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
409ConflictError
application/jsonConflictErrorEncoded
get/api/session/{sessionID}/exportExport session

Export a complete projected session transcript.

Operation IDv2.session.export

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description
sanitizequery
"true" | "false" | null
"true" | "false"
Values"true" | "false"
or
null
No description

Responses

200Success
application/json
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
500UnknownError
application/jsonUnknownErrorEncoded
get/api/session/activeList active sessions

Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive.

Operation IDv2.session.active

Responses

200Success
application/json
object
data
objectrequired
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
get/api/session/{sessionID}Get session

Retrieve a session by ID.

Operation IDv2.session.get

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Responses

200Success
application/json
object
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
delete/api/session/{sessionID}Delete session

Delete a session and its child sessions.

Operation IDv2.session.remove

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
post/api/session/{sessionID}/forkFork session

Create a child session by copying projected history through or before a message boundary.

Operation IDv2.session.fork

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Request body required

application/json

Responses

200Success
application/json
object
400InvalidRequestError
application/json
InvalidRequestErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError | MessageNotFoundError
application/json
MessageNotFoundErrorEncoded | SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
post/api/session/{sessionID}/agentSwitch session agent

Switch the agent used by subsequent provider turns.

Operation IDv2.session.switchAgent

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Request body required

application/json
object
agent
stringrequired

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
application/json
SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
post/api/session/{sessionID}/modelSwitch session model

Switch the model used by subsequent provider turns.

Operation IDv2.session.switchModel

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Request body required

application/json
object

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
application/json
SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
post/api/session/{sessionID}/renameRename session

Update the session title.

Operation IDv2.session.rename

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Request body required

application/json
object
title
stringrequired

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
application/json
SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
post/api/session/{sessionID}/moveMove session

Move a session to another project directory, optionally transferring local changes.

Operation IDv2.session.move

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Request body required

application/json
object
directory
stringrequired
workspaceID
string
pattern ^wrk
delivery
Session.Inbox.Delivery | null

Responses

204<No Content>
400InvalidRequestError
application/json
InvalidRequestErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
post/api/session/{sessionID}/promptSend message

Durably admit one session input and schedule agent-loop execution unless resume is false.

Operation IDv2.session.prompt

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Request body required

application/json
object
id
string | null
string
pattern ^msg_
or
null
text
stringrequired
files
PromptInput.FileAttachment[]
agents
Prompt.AgentAttachment[]
skills
PromptInput.SkillAttachment[]
metadata
object
delivery
Session.Inbox.Delivery | null
resume
boolean | null
boolean
or
null

Responses

200Success
application/json
400InvalidRequestError
application/json
InvalidRequestErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
application/json
SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
409ConflictError
application/jsonConflictErrorEncoded
post/api/session/{sessionID}/commandRun command

Execute a slash command callback immediately.

Operation IDv2.session.command

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Request body required

application/json
object
command
stringrequired
text
stringrequired
files
PromptInput.FileAttachment[]
agents
Prompt.AgentAttachment[]
skills
PromptInput.SkillAttachment[]
delivery
Session.Inbox.Delivery | null

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError | CommandNotFoundError
application/json
CommandNotFoundErrorEncoded | SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
500CommandExecutionError
post/api/session/{sessionID}/skillActivate skill

Activate a skill for a session by appending a skill message and resuming execution.

Operation IDv2.session.skill

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Request body required

application/json
object
id
string | null
string
pattern ^msg_
or
null
skill
stringrequired
resume
boolean | null
boolean
or
null

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError | SkillNotFoundError
application/json
SkillNotFoundErrorEncoded | SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
post/api/session/{sessionID}/syntheticAdd synthetic message

Durably admit synthetic session input and schedule execution unless resume is false.

Operation IDv2.session.synthetic

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Request body required

application/json
object
id
string | null
string
pattern ^msg_
or
null
text
stringrequired
description
string | null
string
or
null
metadata
object
delivery
Session.Inbox.Delivery | null
resume
boolean | null
boolean
or
null

Responses

200Success
application/json
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
application/json
SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
409ConflictError
application/jsonConflictErrorEncoded
post/api/session/{sessionID}/shellRun shell command

Execute one shell command in the session's working directory. Emits a shell.started event before execution and a shell.ended event with the merged output after.

Operation IDv2.session.shell

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Request body required

application/json
object
id
string | null
string
pattern ^evt_
or
null
command
stringrequired

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
application/json
SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
post/api/session/{sessionID}/compactCompact session

Durably admit a session compaction request. Steers by default: it runs at the next step boundary instead of waiting behind queued prompts.

Operation IDv2.session.compact

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Request body required

application/json
object
id
string | null
string
pattern ^msg_
or
null
delivery
Session.Inbox.Delivery | null

Responses

200Success
application/json
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
application/json
SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
409ConflictError
application/jsonConflictErrorEncoded
post/api/session/{sessionID}/waitWait for session

Wait for a session agent loop to become idle.

Operation IDv2.session.wait

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
application/json
SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
503ServiceUnavailableError
post/api/session/{sessionID}/revert/stageStage session revert

Stage or move a reversible session boundary and optionally apply its file changes.

Operation IDv2.session.revert.stage

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Request body required

application/json
object
messageID
stringrequired
pattern ^msg_
files
boolean | null
boolean
or
null

Responses

200Success
application/json
object
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404MessageNotFoundError | SessionNotFoundError
application/json
MessageNotFoundErrorEncoded | SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
409SessionBusyError
application/jsonSessionBusyErrorEncoded
500UnknownError
application/jsonUnknownErrorEncoded
post/api/session/{sessionID}/revert/clearClear staged revert

Operation IDv2.session.revert.clear

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
application/json
SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
409SessionBusyError
application/jsonSessionBusyErrorEncoded
500UnknownError
application/jsonUnknownErrorEncoded
post/api/session/{sessionID}/revert/commitCommit staged revert

Operation IDv2.session.revert.commit

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
application/json
SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
409SessionBusyError
application/jsonSessionBusyErrorEncoded
get/api/session/{sessionID}/contextGet session context

Retrieve the active context messages for a session (all messages after the last compaction).

Operation IDv2.session.context

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Responses

200Success
application/json
object
data
Session.Message.Info[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
500UnknownError
application/jsonUnknownErrorEncoded
get/api/session/{sessionID}/inboxList session inbox

List durable enqueued session work not yet delivered, ordered by enqueue sequence. Includes user, synthetic, compaction, and move items.

Operation IDv2.session.inbox.list

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Responses

200Success
application/json
object
data
Session.Inbox.Info[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
delete/api/session/{sessionID}/inbox/{inboxID}Cancel inbox input

Cancel an inbox item that has not yet been delivered.

Operation IDv2.session.inbox.cancel

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description
inboxIDrequiredpath
string
pattern ^msg_
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
409ConflictError
application/jsonConflictErrorEncoded
post/api/session/{sessionID}/inbox/{inboxID}/steerSteer queued item

Change a queued inbox item to steer delivery and wake session execution.

Operation IDv2.session.inbox.steer

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description
inboxIDrequiredpath
string
pattern ^msg_
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
409ConflictError
application/jsonConflictErrorEncoded
post/api/session/{sessionID}/inbox/{inboxID}/queueQueue steered item

Change a steered inbox item to queued delivery.

Operation IDv2.session.inbox.queue

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description
inboxIDrequiredpath
string
pattern ^msg_
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
409ConflictError
application/jsonConflictErrorEncoded
get/api/session/{sessionID}/instructions/entriesList instruction entries

List API-managed instruction entries attached to the session.

Operation IDv2.session.instructions.entry.list

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Responses

200Success
application/json
object
data
InstructionEntry.Info[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
application/json
SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
put/api/session/{sessionID}/instructions/entries/{key}Put instruction entry

Attach or replace one durable instruction entry. Changes announce as updates at the next step boundary.

Operation IDv2.session.instructions.entry.put

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description
keyrequiredpathInstructionEntry.KeyNo description

Request body required

application/json
object
value
objectrequired

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
application/json
SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
413InstructionEntryValueTooLargeError
delete/api/session/{sessionID}/instructions/entries/{key}Remove instruction entry

Remove one instruction entry; the removal is announced to the model at the next step boundary.

Operation IDv2.session.instructions.entry.remove

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description
keyrequiredpathInstructionEntry.KeyNo description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
application/json
SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
post/api/session/{sessionID}/generateGenerate text from session context

Generate transient text from the current session context without mutating session history.

Operation IDv2.session.generate

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Request body required

application/json
object
prompt
stringrequired

Responses

200SessionGenerateResponse
application/jsonSessionGenerateResponse
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
application/json
SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
503ServiceUnavailableError
get/api/experimental/session/{sessionID}/logRead the session log

Experimental durable session event log. Reads events after an exclusive aggregate sequence and continues with live events when follow=true.

Operation IDv2.session.log

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description
afterquery
string | null
string
or
null
No description
followquery
"true" | "false" | null
"true" | "false"
Values"true" | "false"
or
null
No description

Responses

200Success
text/event-stream
object
id
string | nullrequired
string
or
null
event
stringrequired
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
post/api/session/{sessionID}/interruptInterrupt session execution

Interrupt active execution owned by this OpenCode process. Returns interrupted=true when an active execution was interrupted and false for the idle no-op. When continue=true, execution resumes pending steering input and next-in-line control items (manual compaction, moves) while queued prompts remain parked.

Operation IDv2.session.interrupt

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description
continuequery
"true" | "false" | null
"true" | "false"
Values"true" | "false"
or
null
No description

Responses

200SessionInterruptResponse
application/jsonSessionInterruptResponse
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
application/json
SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
post/api/session/{sessionID}/backgroundBackground blocking session tools

Move active foreground backgroundable tools for this session into background observation. Idle requests are a no-op.

Operation IDv2.session.background

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
application/json
SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
get/api/session/{sessionID}/message/{messageID}Get session message

Retrieve one projected message owned by the Session.

Operation IDv2.session.message

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description
messageIDrequiredpath
string
pattern ^msg_
No description

Responses

200Success
application/json
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError | MessageNotFoundError
application/json
SessionNotFoundErrorEncoded | MessageNotFoundErrorEncoded
put/api/session/{sessionID}/environmentSet session environment

Replace the process environment used by local shell commands for this session.

Operation IDv2.session.environment

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Request body required

application/json
object
variables
objectrequired
Additional properties
string

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
post/api/session/{sessionID}/viewView session

Mark the idle transition observed by the viewer as viewed.

Operation IDv2.session.view

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Request body required

application/json
object
idle
integerrequired
min 0

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
get/api/session/{sessionID}/messageGet session messages

Retrieve projected messages for a session, optionally filtered by type. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline, passing the same type filter on each page.

Operation IDv2.message.list

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description
limitquery
string | null

Maximum number of messages to return. When omitted, the endpoint returns its default page size.

string
or
null
No description
orderquery
"asc" | "desc" | null

Message order for the first page. Use desc for newest first or asc for oldest first.

"asc" | "desc"
Values"asc" | "desc"
or
null
No description
cursorquery
string | null
string

Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order.

or
null
No description
typequery
"agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | null

Filter by message type before pagination. When omitted, all message types are returned. Pass the same type when following cursors.

"agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction"
Values"agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction"
or
null
No description

Responses

200SessionMessagesResponse
application/jsonSessionMessagesResponse
400InvalidCursorError | InvalidRequestError
application/json
InvalidCursorErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
500UnknownError
application/jsonUnknownErrorEncoded

Resource

model

Experimental model routes.

get/api/modelList models

Retrieve the current snapshot of available models ordered by release date. The snapshot may precede initial plugin settlement.

Operation IDv2.model.list

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
object
data
Model.Info[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
503ServiceUnavailableError
get/api/model/defaultGet default model

Retrieve the model used when a session has no explicit model selection.

Operation IDv2.model.default

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
object
data
Model.Info | nullrequired
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
503ServiceUnavailableError

Resource

generate

Experimental one-shot generation routes.

post/api/generateGenerate text

Run one stateless model generation using the server's base configuration and return the assistant text. Uses the base configuration's default model when none is specified.

Operation IDv2.generate.text

Request body required

application/json
object
prompt
stringrequired
model
Model.Ref | null
or
null

Responses

200GenerateTextResponse
application/jsonGenerateTextResponse
400InvalidRequestError
application/json
InvalidRequestErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
503ServiceUnavailableError

Resource

provider

Experimental provider routes.

get/api/providerList providers

Retrieve active AI providers so clients can show provider availability and configuration.

Operation IDv2.provider.list

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
object
data
Provider.Info[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
503ServiceUnavailableError
get/api/provider/{providerID}Get provider

Retrieve a single AI provider so clients can inspect its availability and endpoint settings.

Operation IDv2.provider.get

Parameters

NameLocationTypeDescription
providerIDrequiredpath
string
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404ProviderNotFoundError
503ServiceUnavailableError

Resource

integration

Integration discovery and authentication routes.

get/api/integrationList integrations

Retrieve available integrations and their authentication methods.

Operation IDv2.integration.list

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
object
data
Integration.Info[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
get/api/integration/{integrationID}Get integration

Retrieve one integration and its authentication methods.

Operation IDv2.integration.get

Parameters

NameLocationTypeDescription
integrationIDrequiredpath
string
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
object
data
Integration.Info | nullrequired
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
post/api/experimental/integration/wellknownAdd wellknown integration

Discover and persist an experimental wellknown integration source.

Operation IDv2.experimental.integration.wellknown.add

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Request body required

application/json
object
url
stringrequired

Responses

204<No Content>
400InvalidRequestError
application/json
InvalidRequestErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
post/api/integration/{integrationID}/connect/keyConnect with key

Run a key authentication method and store the resulting credential.

Operation IDv2.integration.connect.key

Parameters

NameLocationTypeDescription
integrationIDrequiredpath
string
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Request body required

application/json
object
key
stringrequired
answer
Form.Answer | null
label
string | null
string
or
null

Responses

204<No Content>
400InvalidRequestError
application/json
InvalidRequestErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
post/api/integration/{integrationID}/connect/oauthBegin OAuth connection

Start an OAuth attempt and return the authorization details.

Operation IDv2.integration.oauth.connect

Parameters

NameLocationTypeDescription
integrationIDrequiredpath
string
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Request body required

application/json
object
methodID
stringrequired
answer
Form.Answer | null
label
string | null
string
or
null

Responses

200Success
application/json
400InvalidRequestError
application/json
InvalidRequestErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
get/api/integration/{integrationID}/connect/oauth/{attemptID}Get OAuth attempt status

Poll the current status of an OAuth attempt.

Operation IDv2.integration.oauth.status

Parameters

NameLocationTypeDescription
integrationIDrequiredpath
string
No description
attemptIDrequiredpath
string
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
delete/api/integration/{integrationID}/connect/oauth/{attemptID}Cancel OAuth connection

Cancel an OAuth attempt and release its resources.

Operation IDv2.integration.oauth.cancel

Parameters

NameLocationTypeDescription
integrationIDrequiredpath
string
No description
attemptIDrequiredpath
string
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
post/api/integration/{integrationID}/connect/oauth/{attemptID}/completeComplete OAuth connection

Complete a code-based OAuth attempt and store the resulting credential.

Operation IDv2.integration.oauth.complete

Parameters

NameLocationTypeDescription
integrationIDrequiredpath
string
No description
attemptIDrequiredpath
string
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Request body required

application/json
object
code
string | null
string
or
null

Responses

204<No Content>
400InvalidRequestError
application/json
InvalidRequestErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
post/api/integration/{integrationID}/connect/commandBegin command connection

Start a command authentication attempt.

Operation IDv2.integration.command.connect

Parameters

NameLocationTypeDescription
integrationIDrequiredpath
string
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Request body required

application/json
object
methodID
stringrequired
label
string | null
string
or
null

Responses

200Success
application/json
400InvalidRequestError
application/json
InvalidRequestErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
get/api/integration/{integrationID}/connect/command/{attemptID}Get command attempt status

Poll the current status and output of a command authentication attempt.

Operation IDv2.integration.command.status

Parameters

NameLocationTypeDescription
integrationIDrequiredpath
string
No description
attemptIDrequiredpath
string
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
delete/api/integration/{integrationID}/connect/command/{attemptID}Cancel command connection

Cancel a command authentication attempt and terminate its process.

Operation IDv2.integration.command.cancel

Parameters

NameLocationTypeDescription
integrationIDrequiredpath
string
No description
attemptIDrequiredpath
string
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded

Resource

mcp

MCP server and resource routes.

get/api/mcpList MCP servers

Retrieve configured MCP servers and their connection status.

Operation IDv2.mcp.list

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
object
data
Mcp.Server[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
put/api/mcp/{server}Add MCP server

Add an MCP server at runtime or replace an existing one, connecting it immediately.

Operation IDv2.mcp.add

Parameters

NameLocationTypeDescription
serverrequiredpath
string
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Request body required

application/json
object
config
Mcp.LocalConfigEncoded | Mcp.RemoteConfigEncodedrequired

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
delete/api/mcp/{server}Remove MCP server

Stop an MCP server and remove it from the runtime set until restart.

Operation IDv2.mcp.remove

Parameters

NameLocationTypeDescription
serverrequiredpath
string
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404McpServerNotFoundError
post/api/mcp/{server}/connectConnect MCP server

Connect an MCP server at runtime, overriding a disabled configuration until restart.

Operation IDv2.mcp.connect

Parameters

NameLocationTypeDescription
serverrequiredpath
string
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404McpServerNotFoundError
post/api/mcp/{server}/disconnectDisconnect MCP server

Disconnect an MCP server at runtime, removing its tools until reconnected.

Operation IDv2.mcp.disconnect

Parameters

NameLocationTypeDescription
serverrequiredpath
string
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404McpServerNotFoundError
get/api/mcp/resourceList MCP resources

Retrieve resources and resource templates from connected MCP servers.

Operation IDv2.mcp.resource.catalog

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded

Resource

credential

patch/api/credential/{credentialID}Update credential

Update a stored credential label.

Operation IDv2.credential.update

Parameters

NameLocationTypeDescription
credentialIDrequiredpath
string
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Request body required

application/json
object
label
stringrequired

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
delete/api/credential/{credentialID}Remove credential

Remove a stored integration credential.

Operation IDv2.credential.remove

Parameters

NameLocationTypeDescription
credentialIDrequiredpath
string
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
post/api/credential/{credentialID}/activateActivate credential

Activate a stored integration credential.

Operation IDv2.credential.activate

Parameters

NameLocationTypeDescription
credentialIDrequiredpath
string
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded

Resource

project

Project routes.

get/api/projectList projects

List known projects.

Operation IDv2.project.list

Responses

200Success
application/json
Project[]
ItemsProject
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
patch/api/project/{projectID}Update project

Update the project canonical directory, display metadata, and workspace commands.

Operation IDv2.project.update

Parameters

NameLocationTypeDescription
projectIDrequiredpath
string
No description

Request body required

application/json
object
canonical
string
name
string

Responses

200Project
application/jsonProject
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404ProjectNotFoundError
get/api/project/currentGet current project

Resolve the project for the requested location.

Operation IDv2.project.current

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Project.Current
application/jsonProject.Current
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded

Resource

form

Session form routes.

get/api/form/requestList pending form requests

Retrieve pending forms for a location.

Operation IDv2.form.request.list

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
object
data
Form.Info[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
get/api/session/{sessionID}/formList session forms

Retrieve pending forms for a session.

Operation IDv2.session.form.list

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
No description

Responses

200Success
application/json
object
data
Form.Info[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
post/api/session/{sessionID}/formCreate session form

Create a form for a session.

Operation IDv2.session.form.create

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
No description

Request body required

application/jsonForm.CreatePayload

Responses

200Success
application/json
object
400InvalidRequestError
application/json
InvalidRequestErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
application/json
SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
409ConflictError
application/jsonConflictErrorEncoded
get/api/session/{sessionID}/form/{formID}Get session form

Retrieve a form for a session.

Operation IDv2.session.form.get

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
No description
formIDrequiredpath
string
pattern ^frm_
No description

Responses

200Success
application/json
object
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError | FormNotFoundError
application/json
FormNotFoundErrorEncoded | SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
get/api/session/{sessionID}/form/{formID}/stateGet form state

Retrieve the current state for a form.

Operation IDv2.session.form.state

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
No description
formIDrequiredpath
string
pattern ^frm_
No description

Responses

200Success
application/json
object
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError | FormNotFoundError
application/json
FormNotFoundErrorEncoded | SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
post/api/session/{sessionID}/form/{formID}/replyReply to form

Submit an answer to a pending form.

Operation IDv2.session.form.reply

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
No description
formIDrequiredpath
string
pattern ^frm_
No description

Request body required

application/jsonForm.Reply

Responses

204<No Content>
400FormInvalidAnswerError | InvalidRequestError
application/json
FormInvalidAnswerErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError | FormNotFoundError
application/json
FormNotFoundErrorEncoded | SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
409FormAlreadySettledError
post/api/session/{sessionID}/form/{formID}/cancelCancel form

Cancel a pending form.

Operation IDv2.session.form.cancel

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
No description
formIDrequiredpath
string
pattern ^frm_
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError | FormNotFoundError
application/json
FormNotFoundErrorEncoded | SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
409FormAlreadySettledError

Resource

permission

Experimental permission routes.

get/api/permission/requestList pending permission requests

Retrieve pending permission requests for a location.

Operation IDv2.permission.request.list

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
object
data
Permission.Request[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
get/api/permission/savedList saved permissions

Retrieve saved permissions, optionally filtered by project.

Operation IDv2.permission.saved.list

Parameters

NameLocationTypeDescription
projectIDquery
string | null
string
or
null
No description

Responses

200Success
application/json
object
data
PermissionSaved.Info[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
delete/api/permission/saved/{id}Remove saved permission

Remove a saved permission by ID.

Operation IDv2.permission.saved.remove

Parameters

NameLocationTypeDescription
idrequiredpath
string
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
get/api/session/{sessionID}/permissionList session permission requests

Retrieve pending permission requests owned by a session.

Operation IDv2.session.permission.list

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Responses

200Success
application/json
object
data
Permission.Request[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
post/api/session/{sessionID}/permissionCreate permission request

Evaluate and, when approval is required, create a permission request for a session.

Operation IDv2.session.permission.create

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Request body required

application/json
object
id
string | null
string
pattern ^per
or
null
action
stringrequired
resources
string[]required
Items
string
save
string[]
Items
string
metadata
object
agent
string | null
string
or
null

Responses

200Success
application/json
object
data
objectrequired
id
stringrequired
pattern ^per
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError
application/json
SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
get/api/session/{sessionID}/permission/{requestID}Get permission request

Retrieve a pending permission request owned by a session.

Operation IDv2.session.permission.get

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description
requestIDrequiredpath
string
pattern ^per
No description

Responses

200Success
application/json
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError | PermissionNotFoundError
application/json
PermissionNotFoundErrorEncoded | SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded
post/api/session/{sessionID}/permission/{requestID}/replyReply to pending permission request

Respond to a pending permission request owned by a session.

Operation IDv2.session.permission.reply

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description
requestIDrequiredpath
string
pattern ^per
No description

Request body required

application/json
object
message
string | null
string
or
null

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404SessionNotFoundError | PermissionNotFoundError
application/json
PermissionNotFoundErrorEncoded | SessionNotFoundErrorEncoded | SessionNotFoundErrorEncoded

Resource

filesystem

Experimental location-scoped filesystem routes.

get/api/fs/read/*Read file

Serve one file relative to the requested location.

Operation IDv2.fs.read

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/octet-stream
string<binary>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
get/api/fs/listList directory

List direct children using an absolute path or a path relative to the requested location, including parents and siblings outside its directory. Entry paths remain relative to the requested location; listing does not switch locations.

Operation IDv2.fs.list

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description
pathquery
string | null

An absolute path or a path relative to the requested location. Defaults to the location directory.

string
or
null
No description

Responses

200Success
application/json
object
data
FileSystem.Entry[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
get/api/fs/findFind files

Find recursively ranked filesystem entries relative to the requested location.

Operation IDv2.fs.find

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description
queryrequiredquery
string
No description
typequery
"file" | "directory"
Values"file" | "directory"
No description
limitquery
string | null
string
or
null
No description

Responses

200Success
application/json
object
data
FileSystem.Entry[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded

Resource

command

Experimental command routes.

get/api/commandList commands

Retrieve currently registered commands.

Operation IDv2.command.list

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
object
data
Command.Info[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded

Resource

skill

Experimental skill routes.

get/api/skillList skills

Retrieve currently registered skills.

Operation IDv2.skill.list

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
object
data
Skill.Info[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded

Resource

rpc

Plugin RPC routes.

post/api/rpc/{rpcID}/{method}Call a plugin RPC

Dispatch a method to the currently registered RPC at the requested location.

Operation IDv2.rpc.call

Parameters

NameLocationTypeDescription
rpcIDrequiredpath
string
No description
methodrequiredpath
string
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Request body required

application/jsonRpc.Input

Responses

200Rpc.Output
application/jsonRpc.Output
400RpcError | InvalidRequestError
application/json
RpcErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
500RpcInternalError
application/jsonRpcInternalErrorEncoded

Resource

event

Experimental event stream routes.

get/api/eventSubscribe to events

Subscribe to native events and plugin RPC events across all server locations. Volatile by contract: a slow consumer overflows and fails the stream, and events during disconnection are missed.

Operation IDv2.event.subscribe

Responses

200Success
text/event-stream
object
id
string | nullrequired
string
or
null
event
stringrequired
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded

Resource

pty

Experimental location-scoped PTY routes.

get/api/ptyList PTY sessions

List PTY sessions for a location, including exited sessions retained until removal.

Operation IDv2.pty.list

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
object
data
Pty[]required
ItemsPty
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
post/api/ptyCreate PTY session

Create a pseudo-terminal session for a location.

Operation IDv2.pty.create

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Request body required

application/json
object
command
string
args
string[]
Items
string
cwd
string
title
string
env
object
Additional properties
string

Responses

200Success
application/json
object
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
get/api/pty/{ptyID}Get PTY session

Get one PTY session, including its exit code once exited.

Operation IDv2.pty.get

Parameters

NameLocationTypeDescription
ptyIDrequiredpath
string
pattern ^pty
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
object
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404PtyNotFoundError
application/jsonPtyNotFoundErrorEncoded
put/api/pty/{ptyID}Update PTY session

Update the title or viewport size of one PTY session.

Operation IDv2.pty.update

Parameters

NameLocationTypeDescription
ptyIDrequiredpath
string
pattern ^pty
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Request body required

application/json
object
title
string
size
object
rows
integerrequired
> 0
cols
integerrequired
> 0

Responses

200Success
application/json
object
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404PtyNotFoundError
application/jsonPtyNotFoundErrorEncoded
delete/api/pty/{ptyID}Remove PTY session

Terminate and remove one PTY session.

Operation IDv2.pty.remove

Parameters

NameLocationTypeDescription
ptyIDrequiredpath
string
pattern ^pty
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404PtyNotFoundError
application/jsonPtyNotFoundErrorEncoded
post/api/pty/{ptyID}/connect-tokenCreate PTY WebSocket token

Create a short-lived single-use ticket for opening a PTY WebSocket connection.

Operation IDv2.pty.connect.token

Parameters

NameLocationTypeDescription
ptyIDrequiredpath
string
pattern ^pty
No description
x-opencode-ticketheader
string | null
string
or
null
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
403ForbiddenError
application/jsonForbiddenErrorEncoded
404PtyNotFoundError
application/jsonPtyNotFoundErrorEncoded
get/api/pty/{ptyID}/connectConnect to PTY session

Establish a WebSocket connection streaming PTY output and accepting terminal input.

Operation IDv2.pty.connect

Parameters

NameLocationTypeDescription
ptyIDrequiredpath
string
pattern ^pty
No description
location[directory]query
string
No description
location[workspace]query
string
No description
cursorquery
string
No description
ticketquery
string
No description

Responses

200Success
application/json
boolean
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
403ForbiddenError
application/jsonForbiddenErrorEncoded
404PtyNotFoundError
application/jsonPtyNotFoundErrorEncoded

Resource

persistentPty

Prototype persistent PTY routes.

get/api/experimental/session/{sessionID}/terminal/readRead the session's most recently controlled terminal

Read the last physical rows without changing selection or taking control. Omitted lines uses the live terminal height; larger counts include retained history. Blank rows are preserved. Screen dimensions and cursor remain relative to the live screen. Returns null when no current terminal exists. Selection is server-local and resets on restart. Experimental: may change without compatibility guarantees.

Operation IDserver.experimental.persistentPty.read

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description
linesquery
PersistentPty.ReadLinesEncoded | null
No description

Responses

200Success
application/json
object
data
PersistentPty.ReadResult | nullrequired
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
503ServiceUnavailableError
get/api/experimental/session/{sessionID}/terminal

Operation IDserver.experimental.persistentPty.list

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Responses

200Success
application/json
object
data
PersistentPty.Info[]required
400InvalidRequestError
application/json
InvalidRequestErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
503ServiceUnavailableError
post/api/experimental/session/{sessionID}/terminal

Operation IDserver.experimental.persistentPty.create

Parameters

NameLocationTypeDescription
sessionIDrequiredpath
string
pattern ^ses
No description

Request body required

Responses

200Success
application/json
400InvalidRequestError
application/json
InvalidRequestErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
503ServiceUnavailableError
post/api/experimental/persistent-pty/shutdown

Operation IDserver.experimental.persistentPty.shutdown

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
503ServiceUnavailableError
post/api/experimental/persistent-pty/handoff

Operation IDserver.experimental.persistentPty.handoff

Responses

200Success
application/json
object
handoff
PersistentPty.Handoff | nullrequired
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
503ServiceUnavailableError
get/api/experimental/persistent-pty/{ptyID}

Operation IDserver.experimental.persistentPty.get

Parameters

NameLocationTypeDescription
ptyIDrequiredpath
string
pattern ^pty
No description

Responses

200Success
application/json
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404PtyNotFoundError
application/jsonPtyNotFoundErrorEncoded
503ServiceUnavailableError
put/api/experimental/persistent-pty/{ptyID}

Operation IDserver.experimental.persistentPty.update

Parameters

NameLocationTypeDescription
ptyIDrequiredpath
string
pattern ^pty
No description

Request body required

Responses

200Success
application/json
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404PtyNotFoundError
application/jsonPtyNotFoundErrorEncoded
503ServiceUnavailableError
delete/api/experimental/persistent-pty/{ptyID}

Operation IDserver.experimental.persistentPty.remove

Parameters

NameLocationTypeDescription
ptyIDrequiredpath
string
pattern ^pty
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404PtyNotFoundError
application/jsonPtyNotFoundErrorEncoded
503ServiceUnavailableError
get/api/experimental/persistent-pty/{ptyID}/snapshot

Operation IDserver.experimental.persistentPty.snapshot

Parameters

NameLocationTypeDescription
ptyIDrequiredpath
string
pattern ^pty
No description

Responses

200Success
application/json
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404PtyNotFoundError
application/jsonPtyNotFoundErrorEncoded
503ServiceUnavailableError
post/api/experimental/persistent-pty/{ptyID}/connect-token

Operation IDserver.experimental.persistentPty.connectToken

Parameters

NameLocationTypeDescription
ptyIDrequiredpath
string
pattern ^pty
No description
x-opencode-ticketheader
string | null
string
or
null
No description

Responses

200Success
application/json
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
403ForbiddenError
application/jsonForbiddenErrorEncoded
404PtyNotFoundError
application/jsonPtyNotFoundErrorEncoded
503ServiceUnavailableError
get/api/experimental/persistent-pty/{ptyID}/connectConnect to a persistent PTY

Stream persistent PTY output through the OpenCode server.

Operation IDv2.persistentPty.connect

Parameters

NameLocationTypeDescription
ptyIDrequiredpath
string
pattern ^pty
No description
cursorquery
string
No description
rolequery
string
No description
attachment_idquery
string
No description
takeoverquery
string
No description
input_protocolquery
string
No description
ticketquery
string
No description

Responses

200Success
application/json
boolean
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
403ForbiddenError
application/jsonForbiddenErrorEncoded
404PtyNotFoundError
application/jsonPtyNotFoundErrorEncoded
503ServiceUnavailableError

Resource

shell

Experimental location-scoped shell command routes.

get/api/shellList running shell commands

List currently running shell commands for a location. Exited commands are not included.

Operation IDv2.shell.list

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
object
data
Shell.Info[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
post/api/shellRun shell command

Spawn one non-interactive shell command for a location. Combined stdout/stderr is captured to a file pageable via output.

Operation IDv2.shell.create

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Request body required

application/json
object
command
stringrequired
cwd
string
timeout
integerrequired
min 0
metadata
object

Responses

200Success
application/json
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
get/api/shell/{id}Get shell command

Get one shell command, including its status and exit code once exited.

Operation IDv2.shell.get

Parameters

NameLocationTypeDescription
idrequiredpath
string
pattern ^sh_
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404ShellNotFoundError
delete/api/shell/{id}Remove shell command

Terminate and remove one shell command and its retained output.

Operation IDv2.shell.remove

Parameters

NameLocationTypeDescription
idrequiredpath
string
pattern ^sh_
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404ShellNotFoundError
patch/api/shell/{id}/timeoutUpdate shell timeout

Replace a running shell command's timeout from now, or clear it with zero.

Operation IDv2.shell.timeout

Parameters

NameLocationTypeDescription
idrequiredpath
string
pattern ^sh_
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Request body required

application/json
object
timeout
integerrequired
min 0

Responses

200Success
application/json
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404ShellNotFoundError
get/api/shell/{id}/outputRead shell output

Page through captured combined output by absolute byte cursor.

Operation IDv2.shell.output

Parameters

NameLocationTypeDescription
idrequiredpath
string
pattern ^sh_
No description
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description
cursorquery
string
pattern ^[+-]?\d*\.?\d+(?:[Ee][+-]?\d+)?$
No description
limitquery
string
pattern ^[+-]?\d*\.?\d+(?:[Ee][+-]?\d+)?$
No description

Responses

200Success
application/json
object
data
objectrequired
output
stringrequired
cursor
integerrequired
min 0
size
integerrequired
min 0
truncated
booleanrequired
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404ShellNotFoundError

Resource

reference

Location-scoped project references.

get/api/referenceList references

List references available in the requested location.

Operation IDv2.reference.list

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
object
data
Reference.Info[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded

Resource

worktree

Location-scoped worktree management routes.

get/api/worktreeList worktrees

Discover worktrees through the requested location's strategies and return its project's inventory.

Operation IDv2.worktree.list

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Worktree.List
application/jsonWorktree.List
400WorktreeError | InvalidRequestError
application/json
WorktreeErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
post/api/worktreeCreate worktree

Create a local worktree using the location's registered strategy and directory defaults, then run the project's setup script.

Operation IDv2.worktree.create

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Request body required

application/jsonWorktree.CreateInput

Responses

200Worktree.Info
application/jsonWorktree.Info
400WorktreeError | InvalidRequestError
application/json
WorktreeErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
delete/api/worktreeRemove worktree

Remove a managed worktree from the requested location's project using its recorded strategy.

Operation IDv2.worktree.remove

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Request body required

application/jsonWorktree.RemoveInput

Responses

204<No Content>
400WorktreeError | InvalidRequestError
application/json
WorktreeErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
post/api/worktree/refreshRefresh worktrees

Discover worktrees from the requested location and reconcile the shared project inventory.

Operation IDv2.worktree.refresh

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

204<No Content>
400WorktreeError | InvalidRequestError
application/json
WorktreeErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded

Resource

workspace

Workspace lifecycle routes.

post/api/workspaceCreate workspace

Create a logical workspace. A caller-supplied ID is idempotent when retried with the same provider; reusing it with another provider returns a conflict.

Operation IDv2.workspace.create

Request body required

application/json
object
id
string | null
string
pattern ^wrk
or
null
provider
stringrequired

Responses

200Success
application/json
object
data
stringrequired
pattern ^wrk
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
404ProviderNotFoundError
409ConflictError
application/jsonConflictErrorEncoded
delete/api/workspace/{workspaceID}Destroy workspace

Make a workspace not exist. This operation is idempotent: an already-missing workspace succeeds with `destroyed: false`, while a workspace removed by this request returns `destroyed: true`.

Operation IDv2.workspace.destroy

Parameters

NameLocationTypeDescription
workspaceIDrequiredpath
string
pattern ^wrk
No description

Responses

200Reports whether this request destroyed an existing workspace.
application/jsonWorkspaceDestroyResult
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
500UnknownError
application/jsonUnknownErrorEncoded

Resource

vcs

Location-scoped version control routes.

get/api/vcsVCS info

Get current and default branch information for the requested location.

Operation IDv2.vcs.get

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
get/api/vcs/baseVCS review base

Infer a local review base from named branch creation history, or the repository default only when currently on that branch. Returns null before the first commit or when the provider lacks base metadata; ambiguous Git history requires an explicit base on diff requests.

Operation IDv2.vcs.base

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
object
data
Vcs.Base | nullrequired
or
null
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
503ServiceUnavailableError
get/api/vcs/statusVCS status

List uncommitted working-copy changes relative to the requested location.

Operation IDv2.vcs.status

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
object
data
Vcs.FileStatus[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
get/api/vcs/branchesVCS branches

List local and remote branches available at the requested location.

Operation IDv2.vcs.branches

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description
searchquery
string | null
string
or
null
No description
limitquery
string | null
string
or
null
No description

Responses

200Success
application/json
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
get/api/vcs/diffVCS diff

Diff HEAD to the working copy (working), the base merge-base to the working copy (branch), or the base merge-base to HEAD (committed). Omitting base preserves repository-default comparison; supplying it overrides the comparison without saving it.

Operation IDv2.vcs.diff

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description
moderequiredqueryVcs.ModeNo description
basequery
string
No description
contextquery
string | null
string
or
null
No description

Responses

200Success
application/json
object
data
FileDiff.Info[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
503ServiceUnavailableError

Resource

debug

get/api/debug/locationList loaded locations

List locations currently loaded by the server.

Operation IDv2.debug.location.list

Responses

200Success
application/json
Location.Ref[]
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
delete/api/debug/locationEvict a loaded location

Dispose the requested location's cached services so its next use boots them fresh.

Operation IDv2.debug.location.evict

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

204<No Content>
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded

Resource

migration

get/api/experimental/migration/v1Get V1 migration status

Return the progress of the V1 to V2 session history migration.

Operation IDv2.experimental.migration.v1.status

Responses

200Success
application/json
object | object | object
object
status
"required" | "completed"required
Values"required" | "completed"
or
object
status
"running"required
Values"running"
progress
objectrequired
label
stringrequired
numerator
integer | null
integer
min 0
or
null
denominator
integer | null
integer
min 0
or
null
or
object
status
"error"required
Values"error"
error
stringrequired
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded

Resource

websearch

Location-scoped web search routes.

get/api/websearch/providerList web search providers

Return the registered web search providers.

Operation IDv2.websearch.providers

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
object
data
WebSearch.Provider[]required
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
503ServiceUnavailableError
post/api/websearchSearch the web

Run one web search through the selected provider. Specify a provider to override the configured default.

Operation IDv2.websearch.query

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Request body required

application/json
object
query
stringrequired
providerID
string

Responses

200Success
application/json
400InvalidRequestError
application/json
InvalidRequestErrorEncoded | InvalidRequestErrorEncoded
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded
503ServiceUnavailableError

Resource

config

Location-scoped configuration routes.

get/api/configGet configuration

Return configuration documents and discovery sources for the requested location, from lowest to highest priority.

Operation IDv2.config.get

Parameters

NameLocationTypeDescription
locationquery
object | null
object
directory
string | null
string
or
null
workspace
string | null
string
or
null
or
null
No description

Responses

200Success
application/json
Config.Entry[]
400InvalidRequestError
401UnauthorizedError
application/jsonUnauthorizedErrorEncoded

Components

Schemas

Reusable data types referenced by API operations.

Agent.Colorstring
string
Agent.Infoobject
object
id
stringrequired
name
stringrequired
system
string
description
string
mode
"subagent" | "primary" | "all"required
Values"subagent" | "primary" | "all"
hidden
booleanrequired
steps
integer
> 0
AgentNotFoundErrorEncodedobject
object
_tag
"AgentNotFoundError"required
Values"AgentNotFoundError"
agentID
stringrequired
message
stringrequired
Command.Infoobject
object
name
stringrequired
description
string
CommandExecutionErrorEncodedobject
object
_tag
"CommandExecutionError"required
Values"CommandExecutionError"
command
stringrequired
message
stringrequired
CommandNotFoundErrorEncodedobject
object
_tag
"CommandNotFoundError"required
Values"CommandNotFoundError"
command
stringrequired
message
stringrequired
Config.AgentEncodedobject
object
model
string | object
string
pattern ^[^/#]+\/[^#]+(?:#[^#]+)?$
or
object
providerID
stringrequired
pattern ^[^/#]+$
model
stringrequired
pattern ^[^#]+$
variant
string
pattern ^[^#]+$
request
object
headers
object
Additional properties
string
body
object
system
string
description
string
mode
"subagent" | "primary" | "all"
Values"subagent" | "primary" | "all"
hidden
boolean
color
string
pattern ^#[0-9a-fA-F]{6}$
steps
integer
> 0
disabled
boolean
Config.AgentsDirectoryEncodedobject
object
type
"agents"required
Values"agents"
path
stringrequired
Config.ClaudeDirectoryEncodedobject
object
type
"claude"required
Values"claude"
path
stringrequired
Config.CommandEncodedobject
object
template
stringrequired
description
string
agent
string
model
string | object
string
pattern ^[^/#]+\/[^#]+(?:#[^#]+)?$
or
object
providerID
stringrequired
pattern ^[^/#]+$
model
stringrequired
pattern ^[^#]+$
variant
string
pattern ^[^#]+$
subagent
boolean
subtask
boolean

Deprecated alias for subagent.

Config.DirectoryEncodedobject
object
type
"directory"required
Values"directory"
path
stringrequired
Config.DocumentEncodedobject
object
type
"document"required
Values"document"
path
string
Config.EntryConfig.DocumentEncoded | Config.DirectoryEncoded | Config.AgentsDirectoryEncoded | Config.ClaudeDirectoryEncoded
Config.DocumentEncoded | Config.DirectoryEncoded | Config.AgentsDirectoryEncoded | Config.ClaudeDirectoryEncoded
Config.Formatter.EntryEncodedobject
object
disabled
boolean
command
string[]
Items
string
environment
object
Additional properties
string
extensions
string[]
Items
string
Config.InfoEncodedobject
object
$schema
string
shell
string
model
string | object
string
pattern ^[^/#]+\/[^#]+(?:#[^#]+)?$
or
object
providerID
stringrequired
pattern ^[^/#]+$
model
stringrequired
pattern ^[^#]+$
variant
string
pattern ^[^#]+$
default_agent
string
update
"disable" | "notify" | "auto"
Values"disable" | "notify" | "auto"
share
"manual" | "auto" | "disabled"
Values"manual" | "auto" | "disabled"
enterprise
object
url
string
username
string
agents
object
Additional propertiesConfig.AgentEncoded
snapshots
boolean
watcher
object
ignore
string[]
Items
string
formatter
boolean | object
boolean
or
object
Additional propertiesConfig.Formatter.EntryEncoded
lsp
boolean | object
boolean
or
object
Additional properties
object | Config.LSP.ServerEncoded
object
disabled
truerequired
Valuestrue
media
object
image
object
auto_resize
boolean
max_width
integer
> 0
max_height
integer
> 0
max_base64_bytes
integer
> 0
tool_output
object
max_lines
integer
> 0
max_bytes
integer
> 0
mcp
object
timeout
object
startup
integer
> 0
catalog
integer
> 0
execution
integer
> 0
servers
object
Additional properties
Mcp.LocalConfigEncoded | Mcp.RemoteConfigEncoded
compaction
object
auto
boolean
keep
object
tokens
integer
min 0
buffer
integer
min 0
skills
string[]
Items
string
commands
object
Additional propertiesConfig.CommandEncoded
instructions
string[]
Items
string
references
object
Additional properties
string | Config.Reference.GitEncoded | Config.Reference.LocalEncoded
websearch
false | ConfigWebSearch.InfoEncoded
false
Valuesfalse
plugins
string | Config.Plugin.EntryEncoded[]
Items
string | Config.Plugin.EntryEncoded
warming
boolean | Config.WarmingEncoded
providers
object
Additional propertiesConfig.ProviderEncoded
experimental
object
portable_shell_scanner
boolean
subagent_depth
integer
min 0
policies
object[]
Items
object
action
"provider.use"required
Values"provider.use"
resource
stringrequired
effect
"allow" | "deny"required
Values"allow" | "deny"
Config.LSP.ServerEncodedobject
object
command
string[]required
Items
string
extensions
string[]
Items
string
disabled
boolean
env
object
Additional properties
string
initialization
object
Config.Model.CostEncodedobject
object
tier
object
type
"context"required
Values"context"
size
integerrequired
Config.ModelEncodedobject
object
websocket
boolean
modelID
string
family
string
name
string
compatibilityModel.Compatibility
package
string
settings
object
headers
object
Additional properties
string
body
object
capabilitiesModel.Capabilities
variants
object[]
Items
object
id
stringrequired
settings
object
headers
object
Additional properties
string
body
object
cost
Config.Model.CostEncoded | Config.Model.CostEncoded[]
or
Config.Model.CostEncoded[]
disabled
boolean
limit
object
context
integer
input
integer
output
integer
Config.Plugin.EntryEncodedobject
object
package
stringrequired
options
object
Config.ProviderEncodedobject
object
websocket
boolean
canonical
string
name
string
env
string[]
Items
string
package
string
settings
object
headers
object
Additional properties
string
body
object
models
object
Additional propertiesConfig.ModelEncoded
Config.Reference.GitEncodedobject
object
repository
stringrequired
branch
string
description
string
hidden
boolean
Config.Reference.LocalEncodedobject
object
path
stringrequired
description
string
hidden
boolean
Config.WarmingEncodedobject
object
prompt
string
interval
string
duration
string
Config.Worktreeobject
object
directory
stringrequired
ConfigWebSearch.InfoEncodedobject
object
provider
"random" | stringrequired
"random"

Reuse a randomly selected provider until it is rate limited, then switch to another available provider.

Values"random"
or
string
ConflictErrorEncodedobject
object
_tag
"ConflictError"required
Values"ConflictError"
message
stringrequired
resource
string | null
string
or
null
Connection.CredentialInfoobject
object
type
"credential"required
Values"credential"
id
stringrequired
label
stringrequired
Connection.EnvInfoobject
object
type
"env"required
Values"env"
name
stringrequired
Connection.InfoConnection.CredentialInfo | Connection.EnvInfo
Connection.CredentialInfo | Connection.EnvInfo
FileDiff.Infoobject
object
file
stringrequired
patch
stringrequired
additions
integerrequired
min 0
deletions
integerrequired
min 0
status
"added" | "deleted" | "modified"required
Values"added" | "deleted" | "modified"
FileSystem.Entryobject
object
path
stringrequired
type
"file" | "directory"required
Values"file" | "directory"
ForbiddenErrorEncodedobject
object
_tag
"ForbiddenError"required
Values"ForbiddenError"
message
stringrequired
Form.Answerobject
object
Additional propertiesForm.Value
Form.BooleanFieldobject
object
key
stringrequired
title
string
description
string
required
boolean
when
Form.When[]
type
"boolean"required
Values"boolean"
default
boolean
Form.CreatePayloadobject
object
id
string | null
string
pattern ^frm_
or
null
title
stringrequired
Form.ExternalFieldobject
object
key
stringrequired
type
"external"required
Values"external"
url
stringrequired
title
string
description
string
Form.FieldForm.StringField | Form.NumberField | Form.IntegerField | Form.BooleanField | Form.MultiselectField | Form.ExternalField
Form.StringField | Form.NumberField | Form.IntegerField | Form.BooleanField | Form.MultiselectField | Form.ExternalField
Form.FieldsForm.Field[]
Form.Field[]
min items 1
Form.Fields_1Form.Field[]
Form.Field[]
min items 1
Form.Fields_2Form.Field[]
Form.Field[]
min items 1
Form.Infoobject
object
id
stringrequired
pattern ^frm_
sessionID
stringrequired
title
stringrequired
Form.IntegerFieldobject
object
key
stringrequired
title
string
description
string
required
boolean
when
Form.When[]
type
"integer"required
Values"integer"
minimum
number | "Infinity" | "-Infinity" | "NaN"
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
maximum
number | "Infinity" | "-Infinity" | "NaN"
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
default
number | "Infinity" | "-Infinity" | "NaN"
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
Form.Metadataobject
object
Form.MultiselectFieldobject
object
key
stringrequired
title
string
description
string
required
boolean
when
Form.When[]
type
"multiselect"required
Values"multiselect"
options
Form.Option[]required
minItems
integer
min 0
maxItems
integer
min 0
custom
boolean
default
string[]
Items
string
Form.NumberFieldobject
object
key
stringrequired
title
string
description
string
required
boolean
when
Form.When[]
type
"number"required
Values"number"
minimum
number | "Infinity" | "-Infinity" | "NaN"
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
maximum
number | "Infinity" | "-Infinity" | "NaN"
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
default
number | "Infinity" | "-Infinity" | "NaN"
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
Form.Optionobject
object
value
stringrequired
label
stringrequired
description
string
Form.Replyobject
object
Form.Stateobject | object | object
object | object | object
object
status
"pending"required
Values"pending"
or
object
status
"answered"required
Values"answered"
or
object
status
"cancelled"required
Values"cancelled"
Form.StringFieldobject
object
key
stringrequired
title
string
description
string
required
boolean
when
Form.When[]
type
"string"required
Values"string"
format
"email" | "uri" | "date" | "date-time"
Values"email" | "uri" | "date" | "date-time"
minLength
integer
min 0
maxLength
integer
min 0
pattern
string
placeholder
string
default
string
options
Form.Option[]
custom
boolean
Form.Valuestring | number | "Infinity" | "-Infinity" | "NaN" | boolean | string[]
string | number | "Infinity" | "-Infinity" | "NaN" | boolean | string[]
string
or
number | "Infinity" | "-Infinity" | "NaN"
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
or
boolean
or
string[]
Items
string
Form.Whenobject
object
key
stringrequired
op
"eq" | "neq"required
Values"eq" | "neq"
value
string | number | "Infinity" | "-Infinity" | "NaN" | booleanrequired
string
or
number | "Infinity" | "-Infinity" | "NaN"
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
or
boolean
FormAlreadySettledErrorEncodedobject
object
_tag
"FormAlreadySettledError"required
Values"FormAlreadySettledError"
id
stringrequired
message
stringrequired
FormInvalidAnswerErrorEncodedobject
object
_tag
"FormInvalidAnswerError"required
Values"FormInvalidAnswerError"
id
stringrequired
message
stringrequired
FormNotFoundErrorEncodedobject
object
_tag
"FormNotFoundError"required
Values"FormNotFoundError"
id
stringrequired
message
stringrequired
GenerateTextResponseobject
object
data
objectrequired
text
stringrequired
InstructionEntry.Infoobject
object
value
objectrequired

JSON value attached to the session's instructions

InstructionEntry.Keystring
string

Instruction entry key (lowercase alphanumerics plus . _ -)

pattern ^[a-z0-9][a-z0-9._-]*$
InstructionEntryValueTooLargeErrorEncodedobject
object
_tag
"InstructionEntryValueTooLargeError"required
Values"InstructionEntryValueTooLargeError"
actualBytes
integerrequired
maxBytes
integerrequired
message
stringrequired
Integration.AttemptEncodedobject
object
attemptID
stringrequired
url
stringrequired
instructions
stringrequired
mode
"auto" | "code"required
Values"auto" | "code"
time
objectrequired
created
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
expires
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
Integration.AttemptStatusobject | object | object | object
object | object | object | object
object
status
"pending"required
Values"pending"
time
objectrequired
created
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
expires
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
or
object
status
"complete"required
Values"complete"
time
objectrequired
created
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
expires
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
or
object
status
"failed"required
Values"failed"
message
stringrequired
time
objectrequired
created
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
expires
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
or
object
status
"expired"required
Values"expired"
time
objectrequired
created
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
expires
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
Integration.CommandAttemptobject
object
attemptID
stringrequired
time
objectrequired
created
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
expires
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
Integration.CommandAttemptStatusobject | object | object | object
object | object | object | object
object
status
"pending"required
Values"pending"
message
string
time
objectrequired
created
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
expires
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
or
object
status
"complete"required
Values"complete"
time
objectrequired
created
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
expires
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
or
object
status
"failed"required
Values"failed"
message
stringrequired
time
objectrequired
created
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
expires
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
or
object
status
"expired"required
Values"expired"
time
objectrequired
created
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
expires
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
Integration.CommandMethodobject
object
id
stringrequired
type
"command"required
Values"command"
label
stringrequired
command
string[]required
Items
string
Integration.EnvMethodobject
object
type
"env"required
Values"env"
names
string[]required
Items
string
Integration.Infoobject
object
id
stringrequired
name
stringrequired
metadata
object
methods
Integration.Method[]required
connections
Connection.Info[]required
Integration.KeyMethodobject
object
type
"key"required
Values"key"
label
string
Integration.MethodIntegration.OAuthMethod | Integration.CommandMethod | Integration.KeyMethod | Integration.EnvMethod
Integration.OAuthMethod | Integration.CommandMethod | Integration.KeyMethod | Integration.EnvMethod
Integration.OAuthMethodobject
object
id
stringrequired
type
"oauth"required
Values"oauth"
label
stringrequired
InvalidCursorErrorEncodedobject
object
_tag
"InvalidCursorError"required
Values"InvalidCursorError"
message
stringrequired
InvalidRequestErrorEncodedobject
object
_tag
"InvalidRequestError"required
Values"InvalidRequestError"
message
stringrequired
kind
string | null
string
or
null
field
string | null
string
or
null
Location.InfoEncodedobject
object
directory
stringrequired
workspaceID
string
pattern ^wrk
project
objectrequired
id
stringrequired
directory
stringrequired
canonical
stringrequired
Location.Refobject
object
directory
stringrequired
workspaceID
string
pattern ^wrk
Mcp.LocalConfigEncodedobject
object
type
"local"required
Values"local"
command
string[]required
Items
string
cwd
string
environment
object
Additional properties
string
disabled
boolean
codemode
boolean
timeout
object
startup
integer
> 0
catalog
integer
> 0
execution
integer
> 0
Mcp.OAuthConfigEncodedobject
object
client_id
string
client_secret
string
scope
string
callback_port
integer
min 1, max 65535
redirect_uri
string
Mcp.RemoteConfigEncodedobject
object
type
"remote"required
Values"remote"
url
stringrequired
headers
object
Additional properties
string
oauth
Mcp.OAuthConfigEncoded | false
or
false
Valuesfalse
disabled
boolean
codemode
boolean
timeout
object
startup
integer
> 0
catalog
integer
> 0
execution
integer
> 0
Mcp.Resourceobject
object
server
stringrequired
name
stringrequired
uri
stringrequired
description
string
mimeType
string
Mcp.ResourceCatalogobject
object
resources
Mcp.Resource[]required
templates
Mcp.ResourceTemplate[]required
Mcp.ResourceTemplateobject
object
server
stringrequired
name
stringrequired
uriTemplate
stringrequired
description
string
mimeType
string
Mcp.Serverobject
object
name
stringrequired
status
Mcp.Status.Connected | Mcp.Status.Pending | Mcp.Status.Disabled | Mcp.Status.Failed | Mcp.Status.NeedsAuthrequired
integrationID
string
Mcp.Status.Connectedobject
object
status
"connected"required
Values"connected"
Mcp.Status.Disabledobject
object
status
"disabled"required
Values"disabled"
Mcp.Status.Failedobject
object
status
"failed"required
Values"failed"
error
stringrequired
Mcp.Status.NeedsAuthobject
object
status
"needs_auth"required
Values"needs_auth"
Mcp.Status.Pendingobject
object
status
"pending"required
Values"pending"
McpServerNotFoundErrorEncodedobject
object
_tag
"McpServerNotFoundError"required
Values"McpServerNotFoundError"
server
stringrequired
message
stringrequired
MessageNotFoundErrorEncodedobject
object
_tag
"MessageNotFoundError"required
Values"MessageNotFoundError"
sessionID
stringrequired
messageID
stringrequired
message
stringrequired
Model.Capabilitiesobject
object
tools
booleanrequired
input
string[]required
Items
string
output
string[]required
Items
string
responsesWebsockets
boolean
Model.Compatibilityobject
object
reasoningFieldModel.ReasoningField
requireReasoning
boolean
maxTokensFieldModel.MaxTokensField
requireFinishReason
boolean
requireAssistantAfterTool
boolean
Model.Costobject
object
tier
object
type
"context"required
Values"context"
size
integerrequired
Model.Infoobject
object
id
stringrequired
modelID
stringrequired
providerID
stringrequired
canonical
string
family
string
name
stringrequired
compatibilityModel.Compatibility
package
string
websocket
boolean
settings
object
headers
object
Additional properties
string
body
object
capabilitiesModel.Capabilities
variants
Model.Variant[]required
time
objectrequired
released
numberrequired
cost
Model.Cost[]required
status
"alpha" | "beta" | "deprecated" | "active"required
Values"alpha" | "beta" | "deprecated" | "active"
enabled
booleanrequired
limit
objectrequired
context
integerrequired
input
integer
output
integerrequired
Model.MaxTokensField"max_completion_tokens" | "max_tokens"
"max_completion_tokens" | "max_tokens"
Values"max_completion_tokens" | "max_tokens"
Model.ReasoningField"reasoning" | "reasoning_content" | "reasoning_text" | string
"reasoning" | "reasoning_content" | "reasoning_text" | string
"reasoning" | "reasoning_content" | "reasoning_text"
Values"reasoning" | "reasoning_content" | "reasoning_text"
or
string
Model.Refobject
object
id
stringrequired
providerID
stringrequired
variant
string
Model.Variantobject
object
id
stringrequired
settings
object
headers
object
Additional properties
string
body
object
Money.USDnumber
number
Money.USDPerMillionTokensnumber
number
Permission.Effect"allow" | "deny" | "ask"
"allow" | "deny" | "ask"
Values"allow" | "deny" | "ask"
Permission.Reply"once" | "always" | "reject"
"once" | "always" | "reject"
Values"once" | "always" | "reject"
Permission.Requestobject
object
id
stringrequired
pattern ^per
sessionID
stringrequired
pattern ^ses
action
stringrequired
resources
string[]required
Items
string
save
string[]
Items
string
metadata
object
message
string
Permission.Ruleobject
object
action
stringrequired
resource
stringrequired
Permission.RulesetPermission.Rule[]
Permission.Rule[]
Permission.Sourceobject
object
object
type
"tool"required
Values"tool"
messageID
stringrequired
id
stringrequired
PermissionNotFoundErrorEncodedobject
object
_tag
"PermissionNotFoundError"required
Values"PermissionNotFoundError"
requestID
stringrequired
message
stringrequired
PermissionSaved.Infoobject
object
id
stringrequired
projectID
stringrequired
action
stringrequired
resource
stringrequired
PersistentPty.CreateInputobject
object
command
string
args
string[]required
Items
string
cwd
string
title
stringrequired
env
objectrequired
Additional properties
string
size
object
cols
integerrequired
> 0
rows
integerrequired
> 0
PersistentPty.Handoffobject
object
directory
stringrequired
instanceID
stringrequired
ticket
stringrequired
expiresAt
number | "Infinity" | "-Infinity" | "NaN"required
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
PersistentPty.Infoobject
object
id
stringrequired
pattern ^pty
title
stringrequired
command
stringrequired
args
string[]required
Items
string
cwd
stringrequired
status
"running" | "exited"required
Values"running" | "exited"
pid
integerrequired
min 0
exitCode
integer
min 0
sessionID
stringrequired
pattern ^ses
foregroundProcess
string | nullrequired
string
or
null
size
objectrequired
cols
integerrequired
> 0
rows
integerrequired
> 0
output
objectrequired
head
integerrequired
min 0
tail
integerrequired
min 0
PersistentPty.ReadLinesEncodedstring
string
PersistentPty.ReadResultobject
object
ptyID
stringrequired
pattern ^pty
title
stringrequired
cwd
stringrequired
foregroundProcess
string | nullrequired
string
or
null
screen
objectrequired
text
stringrequired
cols
integerrequired
> 0
rows
integerrequired
> 0
cursor
objectrequired
x
integerrequired
min 0
y
integerrequired
min 0
PersistentPty.Snapshotobject
object
text
stringrequired
checkpoint
string<byte>required
cursor
objectrequired
x
integerrequired
min 0
y
integerrequired
min 0
PersistentPty.UpdateInputobject
object
attachmentID
string
size
objectrequired
cols
integerrequired
> 0
rows
integerrequired
> 0
Plugin.Featuresobject
object
server
true
Valuestrue
tui
true
Valuestrue
rpc
true
Valuestrue
Plugin.Infoobject
object
id
string
Plugin.Sourceobject | object | object | object
object | object | object | object
object
type
"builtin"required
Values"builtin"
or
object
type
"package"required
Values"package"
target
stringrequired
version
string
outdated
true
Valuestrue
updating
true
Valuestrue
or
object
type
"local"required
Values"local"
path
stringrequired
or
object
type
"sdk"required
Values"sdk"
Plugin.Stateobject | object
object | object
object
status
"active"required
Values"active"
or
object
status
"failed"required
Values"failed"
error
stringrequired
ref
string
Projectobject
object
id
stringrequired
canonical
stringrequired
name
string
sandboxes
string[]required
Items
string
Project.Commandsobject
object
start
string

Startup script to run when creating a new workspace (worktree)

Project.Currentobject
object
id
stringrequired
directory
stringrequired
canonical
stringrequired
Project.Iconobject
object
url
string
override
string
color
string
Project.Timeobject
object
created
integerrequired
min 0
updated
integerrequired
min 0
initialized
integer
min 0
Project.Vcsstring
string
pattern ^[a-z][a-z0-9._-]*$
ProjectNotFoundErrorEncodedobject
object
_tag
"ProjectNotFoundError"required
Values"ProjectNotFoundError"
projectID
stringrequired
message
stringrequired
Prompt.AgentAttachmentobject
object
name
stringrequired
Prompt.Base64string
string
pattern ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
Prompt.FileAttachmentobject
object
mime
stringrequired
name
string
description
string
Prompt.FileSourceobject | object
object | object
object
type
"inline"required
Values"inline"
or
object
type
"uri"required
Values"uri"
uri
stringrequired
Prompt.Mentionobject
object
start
numberrequired
end
numberrequired
text
stringrequired
Prompt.SkillAttachmentobject
object
id
stringrequired
name
stringrequired
text
string
PromptInput.FileAttachmentobject
object
uri
stringrequired
name
string
description
string
PromptInput.SkillAttachmentobject
object
id
stringrequired
Provider.Compactionobject | object
object | object
object
mode
"local"required
Values"local"
or
object
mode
"provider"required
Values"provider"
threshold
integer
> 0
Provider.Infoobject
object
id
stringrequired
canonical
string
integrationID
string
name
stringrequired
activation
"auto" | "enabled" | "disabled"required
Values"auto" | "enabled" | "disabled"
package
stringrequired
websocket
boolean
settings
object
headers
object
Additional properties
string
body
object
Provider.Requestobject
object
headers
objectrequired
Additional properties
string
body
objectrequired
Provider.Settingsobject
object
ProviderNotFoundErrorEncodedobject
object
_tag
"ProviderNotFoundError"required
Values"ProviderNotFoundError"
providerID
stringrequired
message
stringrequired
Ptyobject
object
id
stringrequired
pattern ^pty
title
stringrequired
command
stringrequired
args
string[]required
Items
string
cwd
stringrequired
status
"running" | "exited"required
Values"running" | "exited"
pid
integerrequired
min 0
exitCode
integer
min 0
PtyNotFoundErrorEncodedobject
object
_tag
"PtyNotFoundError"required
Values"PtyNotFoundError"
ptyID
stringrequired
message
stringrequired
PtyTicket.ConnectTokenobject
object
ticket
stringrequired
expires_in
integerrequired
> 0
Reference.GitSourceobject
object
type
"git"required
Values"git"
repository
stringrequired
branch
string
description
string
hidden
boolean
Reference.Infoobject
object
name
stringrequired
path
stringrequired
description
string
hidden
boolean
Reference.LocalSourceobject
object
type
"local"required
Values"local"
path
stringrequired
description
string
hidden
boolean
Reference.SourceReference.LocalSource | Reference.GitSource
Reference.LocalSource | Reference.GitSource
Rpc.Inputobject
object
input
object
Rpc.Outputobject
object
output
object
RpcErrorEncodedobject
object
_tag
"RpcError"required
Values"RpcError"
type
stringrequired
message
stringrequired
data
object | null
object
or
null
RpcInternalErrorEncodedobject
object
_tag
"RpcInternalError"required
Values"RpcInternalError"
type
"rpc.internal" | "rpc.invalid_output"required
Values"rpc.internal" | "rpc.invalid_output"
message
stringrequired
data
object | null
object
or
null
ServiceHealthobject
object
healthy
truerequired
Valuestrue
version
stringrequired
pid
integerrequired
min 0
ServiceUnavailableErrorEncodedobject
object
_tag
"ServiceUnavailableError"required
Values"ServiceUnavailableError"
message
stringrequired
service
string | null
string
or
null
Session.ForkBoundaryobject | object
object | object
object
type
"before"required
Values"before"
messageID
stringrequired
pattern ^msg_
or
object
type
"through"required
Values"through"
messageID
stringrequired
pattern ^msg_
Session.ForkRequestBoundaryobject | object
object | object
object
type
"before"required
Values"before"
messageID
stringrequired
pattern ^msg_
or
object
type
"through"required
Values"through"
Session.Inbox.Compactionobject
object
id
stringrequired
pattern ^msg_
sessionID
stringrequired
pattern ^ses
timeCreated
numberrequired
type
"compaction"required
Values"compaction"
Session.Inbox.CompactionPayloadobject | empty[]
object | empty[]
object
or
empty[]
Session.Inbox.Delivery"steer" | "queue"
"steer" | "queue"
Values"steer" | "queue"
Session.Inbox.InfoSession.Inbox.User | Session.Inbox.Synthetic | Session.Inbox.Compaction | Session.Inbox.Move
Session.Inbox.User | Session.Inbox.Synthetic | Session.Inbox.Compaction | Session.Inbox.Move
Session.Inbox.Moveobject
object
id
stringrequired
pattern ^msg_
sessionID
stringrequired
pattern ^ses
timeCreated
numberrequired
type
"move"required
Values"move"
Session.Inbox.MovePayloadobject
object
locationLocation.Ref
projectID
stringrequired
subpath
string
Session.Inbox.Syntheticobject
object
id
stringrequired
pattern ^msg_
sessionID
stringrequired
pattern ^ses
timeCreated
numberrequired
type
"synthetic"required
Values"synthetic"
Session.Inbox.SyntheticPayloadobject
object
text
stringrequired
description
string
metadata
object
Session.Inbox.Userobject
object
id
stringrequired
pattern ^msg_
sessionID
stringrequired
pattern ^ses
timeCreated
numberrequired
type
"user"required
Values"user"
Session.Inbox.UserPayloadobject
object
text
stringrequired
files
Prompt.FileAttachment[]
agents
Prompt.AgentAttachment[]
skills
Prompt.SkillAttachment[]
metadata
object
Session.Infoobject
object
id
stringrequired
pattern ^ses
parentID
string
pattern ^ses
fork
object
sessionID
stringrequired
pattern ^ses
projectID
stringrequired
agent
string
outcome
"succeeded" | "failed" | "interrupted"
Values"succeeded" | "failed" | "interrupted"
time
objectrequired
created
numberrequired
updated
numberrequired
idle
number
viewed
number
archived
number
title
string
locationLocation.Ref
subpath
string
Session.Message.AgentSelectedobject
object
id
stringrequired
pattern ^msg_
metadata
object
time
objectrequired
created
numberrequired
type
"agent-switched"required
Values"agent-switched"
agent
stringrequired
previous
string
Session.Message.Assistantobject
object
id
stringrequired
pattern ^msg_
metadata
object
time
objectrequired
created
numberrequired
streamed
number
completed
number
type
"assistant"required
Values"assistant"
agent
stringrequired
content
Session.Message.Assistant.Text | Session.Message.Assistant.Reasoning | Session.Message.Assistant.Tool[]required
Items
Session.Message.Assistant.Text | Session.Message.Assistant.Reasoning | Session.Message.Assistant.Tool
snapshot
object
start
string
end
string
files
string[]
Items
string
finish
"stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown"
Values"stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown"
rawFinish
string
Session.Message.Assistant.Reasoningobject
object
type
"reasoning"required
Values"reasoning"
text
stringrequired
time
object
created
numberrequired
completed
number
Session.Message.Assistant.Retryobject
object
attempt
integerrequired
> 0
at
numberrequired
Session.Message.Assistant.Textobject
object
type
"text"required
Values"text"
text
stringrequired
Session.Message.Assistant.Toolobject
object
type
"tool"required
Values"tool"
id
stringrequired
name
stringrequired
executed
boolean
state
Session.Message.ToolState.Streaming | Session.Message.ToolState.Running | Session.Message.ToolState.Completed | Session.Message.ToolState.Errorrequired
time
objectrequired
created
numberrequired
ran
number
completed
number
Session.Message.CompactionSession.Message.Compaction.Running | Session.Message.Compaction.Completed | Session.Message.Compaction.Failed
Session.Message.Compaction.Running | Session.Message.Compaction.Completed | Session.Message.Compaction.Failed
Session.Message.Compaction.Completedobject
object
type
"compaction"required
Values"compaction"
id
stringrequired
pattern ^msg_
metadata
object
time
objectrequired
created
numberrequired
status
"completed"required
Values"completed"
reason
"auto" | "manual"required
Values"auto" | "manual"
summary
stringrequired
recent
stringrequired
Session.Message.Compaction.Failedobject
object
type
"compaction"required
Values"compaction"
id
stringrequired
pattern ^msg_
metadata
object
time
objectrequired
created
numberrequired
status
"failed"required
Values"failed"
reason
"auto" | "manual"required
Values"auto" | "manual"
Session.Message.Compaction.Runningobject
object
type
"compaction"required
Values"compaction"
id
stringrequired
pattern ^msg_
metadata
object
time
objectrequired
created
numberrequired
status
"running"required
Values"running"
reason
"auto" | "manual"required
Values"auto" | "manual"
summary
stringrequired
recent
stringrequired
Session.Message.InfoSession.Message.AgentSelected | Session.Message.ModelSelected | Session.Message.LocationSwitched | Session.Message.User | Session.Message.Synthetic | Session.Message.System | Session.Message.Skill | Session.Message.Shell | Session.Message.Assistant | Session.Message.Compaction
Session.Message.AgentSelected | Session.Message.ModelSelected | Session.Message.LocationSwitched | Session.Message.User | Session.Message.Synthetic | Session.Message.System | Session.Message.Skill | Session.Message.Shell | Session.Message.Assistant | Session.Message.Compaction
Session.Message.LocationSwitchedobject
object
id
stringrequired
pattern ^msg_
metadata
object
time
objectrequired
created
numberrequired
type
"location-switched"required
Values"location-switched"
locationLocation.Ref
projectID
string
subpath
string
previous
object
locationLocation.Ref
projectID
string
subpath
string
Session.Message.ModelSelectedobject
object
id
stringrequired
pattern ^msg_
metadata
object
time
objectrequired
created
numberrequired
type
"model-switched"required
Values"model-switched"
previousModel.Ref
Session.Message.ProviderStateobject
object
Session.Message.ProviderState_1object
object
Session.Message.ProviderState_2object
object
Session.Message.ProviderState_3object
object
Session.Message.ProviderState_4object
object
Session.Message.ProviderState_5object
object
Session.Message.Shellobject
object
id
stringrequired
pattern ^msg_
metadata
object
time
objectrequired
created
numberrequired
completed
number
type
"shell"required
Values"shell"
shellID
stringrequired
pattern ^sh_
command
stringrequired
status
"running" | "exited" | "timeout" | "killed"required
Values"running" | "exited" | "timeout" | "killed"
exit
number | "Infinity" | "-Infinity" | "NaN"
number
or
"Infinity" | "-Infinity" | "NaN"
Values"Infinity" | "-Infinity" | "NaN"
output
object
output
stringrequired
cursor
integerrequired
min 0
size
integerrequired
min 0
truncated
booleanrequired
Session.Message.Skillobject
object
id
stringrequired
pattern ^msg_
metadata
object
time
objectrequired
created
numberrequired
type
"skill"required
Values"skill"
skill
stringrequired
name
stringrequired
text
stringrequired
Session.Message.Syntheticobject
object
id
stringrequired
pattern ^msg_
metadata
object
time
objectrequired
created
numberrequired
text
stringrequired
description
string
type
"synthetic"required
Values"synthetic"
Session.Message.Systemobject
object
id
stringrequired
pattern ^msg_
metadata
object
time
objectrequired
created
numberrequired
type
"system"required
Values"system"
text
stringrequired
description
string
Session.Message.ToolState.Completedobject
object
status
"completed"required
Values"completed"
input
objectrequired
content
Tool.Content[]required
min items 1
metadata
object
Session.Message.ToolState.Errorobject
object
status
"error"required
Values"error"
input
objectrequired
content
Tool.Content[]
min items 1
metadata
object
Session.Message.ToolState.Runningobject
object
status
"running"required
Values"running"
input
objectrequired
metadata
objectrequired
Session.Message.ToolState.Streamingobject
object
status
"streaming"required
Values"streaming"
input
stringrequired
Session.Message.Userobject
object
id
stringrequired
pattern ^msg_
metadata
object
time
objectrequired
created
numberrequired
text
stringrequired
files
Prompt.FileAttachment[]
agents
Prompt.AgentAttachment[]
skills
Prompt.SkillAttachment[]
type
"user"required
Values"user"
Session.Metadataobject
object
Session.ProviderContextobject
object
version
1required
Values1
messages
objectrequired
Session.ProviderContext.Provenanceobject
object
providerID
stringrequired
provider
stringrequired
modelID
stringrequired
route
stringrequired
protocol
stringrequired
endpoint
stringrequired
Session.Revertobject
object
messageID
stringrequired
pattern ^msg_
partID
string
snapshot
string
files
FileDiff.Info[]
Session.StructuredErrorobject
object
type
stringrequired
message
stringrequired
status
integer
min 100, max 599
SessionActiveobject
object
type
"running"required
Values"running"
SessionBusyErrorEncodedobject
object
_tag
"SessionBusyError"required
Values"SessionBusyError"
sessionID
stringrequired
message
stringrequired
SessionGenerateResponseobject
object
data
objectrequired
text
stringrequired
SessionInterruptResponseobject
object
interrupted
booleanrequired

Whether an active execution owned by this OpenCode process was interrupted.

SessionLogItemEncodedstring
string
SessionMessagesResponseobject
object
data
Session.Message.Info[]required
cursor
objectrequired
previous
string | null
string
or
null
next
string | null
string
or
null
SessionNotFoundErrorEncodedobject
object
_tag
"SessionNotFoundError"required
Values"SessionNotFoundError"
sessionID
stringrequired
message
stringrequired
SessionStats.Activityobject
object
date
stringrequired
steps
integerrequired
min 0
SessionStats.Infoobject
object
range
objectrequired
from
numberrequired
to
numberrequired
sessions
integerrequired
min 0
subagents
integerrequired
min 0
prompts
integerrequired
min 0
steps
integerrequired
min 0
activeDays
integerrequired
min 0
streak
integerrequired
min 0
activity
SessionStats.Activity[]required
models
SessionStats.ModelUsage[]required
SessionStats.ModelUsageobject
object
steps
integerrequired
min 0
SessionStats.ToolTotalsobject
object
calls
integerrequired
min 0
succeeded
integerrequired
min 0
failed
integerrequired
min 0
unfinished
integerrequired
min 0
SessionStats.ToolUsageobject
object
name
stringrequired
calls
integerrequired
min 0
succeeded
integerrequired
min 0
failed
integerrequired
min 0
unfinished
integerrequired
min 0
durationP50
number
SessionStats.Toolsobject | object | object
object | object | object
object
mode
"none"required
Values"none"
or
object
mode
"summary"required
Values"summary"
or
object
mode
"detail"required
Values"detail"
usage
SessionStats.ToolUsage[]required
SessionTransfer.Dataobject
object
messages
Session.Message.Info[]required
SessionsResponseobject
object
data
Session.Info[]required
cursor
objectrequired
previous
string | null
string
or
null
next
string | null
string
or
null
Shell.Infoobject
object
id
stringrequired
pattern ^sh_
status
"running" | "exited" | "timeout" | "killed"required
Values"running" | "exited" | "timeout" | "killed"
command
stringrequired
cwd
stringrequired
shell
stringrequired
file
stringrequired
pid
integer
min 0
exit
number
metadata
objectrequired
time
objectrequired
started
numberrequired
completed
number
ShellNotFoundErrorEncodedobject
object
_tag
"ShellNotFoundError"required
Values"ShellNotFoundError"
id
stringrequired
message
stringrequired
Skill.Infoobject
object
id
stringrequired
name
stringrequired
description
string
slash
boolean
autoinvoke
boolean
location
stringrequired
content
stringrequired
SkillNotFoundErrorEncodedobject
object
_tag
"SkillNotFoundError"required
Values"SkillNotFoundError"
skill
stringrequired
message
stringrequired
TokenUsage.Infoobject
object
input
numberrequired
output
numberrequired
reasoning
numberrequired
cache
objectrequired
read
numberrequired
write
numberrequired
Tool.ContentTool.TextContent | Tool.FileContent
Tool.TextContent | Tool.FileContent
Tool.FileContentobject
object
type
"file"required
Values"file"
uri
stringrequired
mime
stringrequired
name
string | null
string
or
null
Tool.TextContentobject
object
type
"text"required
Values"text"
text
stringrequired
UnauthorizedErrorEncodedobject
object
_tag
"UnauthorizedError"required
Values"UnauthorizedError"
message
stringrequired
UnknownErrorEncodedobject
object
_tag
"UnknownError"required
Values"UnknownError"
message
stringrequired
ref
string | null
string
or
null
V2EventEncodedstring
string
Vcs.Baseobject
object
name
stringrequired
ref
stringrequired
source
"reflog" | "default"required
Values"reflog" | "default"
Vcs.Branchobject
object
current
string
default
string
Vcs.BranchListstring[]
string[]
Items
string
Vcs.FileStatusobject
object
file
stringrequired
additions
integerrequired
min 0
deletions
integerrequired
min 0
status
"added" | "deleted" | "modified"required
Values"added" | "deleted" | "modified"
Vcs.Infoobject
object
Vcs.Mode"working" | "branch" | "committed"
"working" | "branch" | "committed"
Values"working" | "branch" | "committed"
WebSearch.Providerobject
object
id
stringrequired
name
stringrequired
WebSearch.ResponseEncodedobject
object
providerID
stringrequired
results
WebSearch.Result[]required
WebSearch.Resultobject
object
url
stringrequired
title
string
content
string
time
objectrequired
published
number
WorkspaceDestroyResultobject
object

Reports whether this request destroyed an existing workspace.

destroyed
booleanrequired

True when this request transitioned the workspace from existing to destroyed.

Worktree.CreateInputobject
object
strategy
string
from
string
branch
string
directory
string
name
string
Worktree.Directoryobject
object
directory
stringrequired
strategy
string
Worktree.Infoobject
object
directory
stringrequired
Worktree.ListWorktree.Directory[]
Worktree.Directory[]
Worktree.RemoveInputobject
object
directory
stringrequired
force
booleanrequired
WorktreeErrorEncodedobject
object
name
"WorktreeError"required
Values"WorktreeError"
data
objectrequired
message
stringrequired
forceRequired
boolean | null
boolean
or
null