# Fetch the OpenAPI document
Source: https://ara-90a60a07.mintlify.app/api-reference/account/fetch-the-openapi-document
/openapi.json get /v3/openapi.json
Returns the published OpenAPI 3.1 contract for this API — the same document the docs site serves. Public and cacheable; read it before minting a key to enumerate every operation, required scope, and error response.
Auth: any valid API key (no scope)
# List Early Access features
Source: https://ara-90a60a07.mintlify.app/api-reference/account/list-early-access-features
/openapi.json get /v3/organizations/{orgId}/early-access
The Early Access features that exist in this workspace, each with `enabled` saying whether the workspace has it now. A feature that is off everywhere except Reason's own workspaces is not listed. Clients use it to turn on behaviour that is still rolling out.
Scope: `org:read`
# Read backend deployment identity
Source: https://ara-90a60a07.mintlify.app/api-reference/account/read-backend-deployment-identity
/openapi.json get /v3/deployment
Returns non-secret release metadata used to verify an exact backend deployment.
Scope: `deployment:read`
# Read workspace readiness
Source: https://ara-90a60a07.mintlify.app/api-reference/account/read-workspace-readiness
/openapi.json get /v3/self/readiness
A read-only preflight for the credential's pinned workspace. Available to any valid public API key or OAuth grant; each resource check requires its existing capability and a write-capable workspace role (owner, admin or member). Missing capabilities or role return unknown without reading that resource. Uses recorded GitHub state, not a provider login or repository authorization test. Personal Devices are optional for cloud work. Does not reserve credits, charge, refresh connections, repair resources, enroll a Device or start a Session/Loop. Ready applies only to the check described, never guarantees a later write. Existing /self is unchanged.
Auth: any valid API key (no scope)
# Verify credentials
Source: https://ara-90a60a07.mintlify.app/api-reference/account/verify-credentials
/openapi.json get /v3/self
Returns the principal behind the current credential, its granted scopes, and the organization it can act on. Call this first to discover your `org_id` and available capabilities.
## REST quickstart
A Reason is the long-running agent a person keeps: its own conversation, instructions, Loops (standing work woken by a schedule or an event) and the Sessions it runs. Give it work by messaging it.
1. Create a key at [reasonmachines.com/customize?tab=api](https://reasonmachines.com/customize?tab=api) (Settings > API). Send it only in `Authorization: Bearer `, never in a URL.
2. Call this endpoint and keep the returned `org_id`.
3. List your Reasons with `GET /v3/organizations/{orgId}/reasons` (`sessions:read`). Your main Reason comes first; create a named one with `POST /reasons` (`run`).
4. Message it with `POST /v3/organizations/{orgId}/reasons/{reasonId}/messages` (`run`) and read its replies with `GET` on the same path. Configure it with `PATCH /reasons/{reasonId}` (instructions, default model, default repositories), give it standing work with `POST /reasons/{reasonId}/loops` (`automations:write`), and read or edit memory with `/memory/files`, `/memory/file` and `/memory/search` (`scope=personal` for the key owner's own, `team` for the workspace's; `memory:read`, `memory:write`).
5. For one unattended task, start a Session instead: POST a prompt to `/v3/organizations/{orgId}/sessions` with `reason_id`, `completion_mode: run_outcome` and an `idempotency_key` in the JSON body (HTTP 201 creates; 200 replays). Poll it with GET until status leaves running. Lifecycle exit does not prove success: only outcome success is a successful task; failure, action_required and null need handling. Follow `Retry-After` on HTTP 429.
### Runnable Node.js example
Download [api-session.mjs](https://reasonmachines.com/examples/api-session.mjs), review it, and run it with Node.js 20 or newer. It creates real work that may incur usage. Set `REASON_API_KEY`, `REASON_PROMPT`, and a stable `REASON_IDEMPOTENCY_KEY` in your environment, then run `node api-session.mjs`. Optional `REASON_REPO` and `REASON_PROJECT_ID` (a Reason id) select resources explicitly. The example exits nonzero for failed, suspended, unresolved, or action-required tasks and times out after ten minutes without cancelling the remote session.
## MCP is a separate client connection
For an MCP client, connect to `https://mcp.reasonmachines.com/mcp` using that client's supported OAuth setup. See [Connect over MCP](https://docs.reasonmachines.com/docs/mcp) for the commands. The REST workflow above uses the HTTP API and does not require installing an MCP client.
Auth: any valid API key (no scope)
# Get Reason inference availability
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-auth/get-reason-inference-availability
/openapi.json get /v3/organizations/{orgId}/agent-auth/status
Reports whether Reason's managed inference service is available. No provider credentials are exposed.
Scope: `agent_auth:read`
# List Reason models
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-auth/list-reason-models
/openapi.json get /v3/organizations/{orgId}/agent-auth/models
Returns Reason's reviewed models and models served by the workspace's connected provider accounts, with current availability.
Scope: `agent_auth:read`
# Ask an agent on the caller's Reason Network
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/ask-an-agent-on-the-callers-reason-network
/openapi.json post /v3/organizations/{orgId}/agent-network/messages
Sends a message to an agent on the caller's Reason Network, carried by one of the caller's own computers online running Reason, as `send_message` is, and returns its answer when it comes within `wait_seconds` (default 25; a call is held at most 45 s). Recipients see it from `/`. Pass `request_id` to keep waiting for an earlier message's answer. Answers 409 `agent_network_no_computer` when none of the caller's computers is online, and 409 `agent_network_send_failed`, with `request_id` and `message`, when the computer carrying it couldn't send it.
Scope: `run`
# Check an outgoing Network message without resending
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/check-an-outgoing-network-message-without-resending
/openapi.json get /v3/organizations/{orgId}/agent-network/send/status
Reads a send_message receipt by `request_id` and the same `as`, without resending or marking anything read: `status`, `replied`, `recipients` with each `state`, the `replies` naming it as `reply_to` (read or not, so a lost one is recoverable) and a `note`. Kept 7 days.
Scope: `sessions:read`
# Claim the next agent network call this computer carries
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/claim-the-next-agent-network-call-this-computer-carries
/openapi.json post /v3/organizations/{orgId}/agent-network/relay/claim
A member's Reason CLI on the network long-polls here for the next Reason Network call (`list_team`, `send_message`, `networkWho`, `networkAsk`) routed to it: the workspace's, when its engine is on the workspace's network, and its own user's calls from connector grants on the engine team whose `team_id` it reports, from any workspace. A claim that reports the hosted sessions the computer registered (`hosted`) is answered with those it carries now (`hosted`): its own user's hosted assistants' sessions on that network, each carried by one of their computers on it. Only the Reason CLI may: any other sign-in gets 403 `agent_network_cli_only`.
Scope: `run`
# Get a Reason Network proof for this computer
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/get-a-reason-network-proof-for-this-computer
/openapi.json post /v3/network/proof
Issues a signed identity proof, name and expiry for the engine endpoint this Reason CLI login signed in. An optional name must extend the account's own name. API keys, other clients and a different endpoint are refused. The proof carries the account's identity; do not publish it as documentation output.
Auth: any valid API key (no scope)
# Get the workspace's agent network
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/get-the-workspaces-agent-network
/openapi.json get /v3/organizations/{orgId}/agent-network
Returns the workspace network's join link and team, or null when none is stored, with the caller's online-computer metadata. Requires a write-capable workspace member using the Reason CLI's own OAuth login, not an API key or MCP client. The link is a credential. Reading does not create a network; non-admin setup can require activation.
Scope: `org:read`
# Hand over messages that reached the sessions this computer sends from or carries
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/hand-over-messages-that-reached-the-sessions-this-computer-sends-from-or-carries
/openapi.json post /v3/organizations/{orgId}/agent-network/relay/replies
Only the Reason CLI may: any other sign-in gets 403 `agent_network_cli_only`.
Scope: `run`
# Keep this computer's agents' Network messages (retired)
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/keep-this-computers-agents-network-messages-retired
/openapi.json post /v3/organizations/{orgId}/agent-network/relay/transcript
Retired. Reason no longer keeps the messages a computer's agent sessions send and receive on Reason Network. Always `{ kept: 0, enabled: false }`, which tells a Reason CLI that still uploads them to stop.
Scope: `run`
# List the agent sessions on the caller's Reason Network
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/list-the-agent-sessions-on-the-callers-reason-network
/openapi.json get /v3/organizations/{orgId}/agent-network/team
Reason Network's `list_team`: the live agent sessions on the caller's Reason Network (the workspace's network, or the one a connector grant joined) across its computers (Claude Code, Codex, Cursor, workers and others), read through a member's computer that is online with Reason running, with the caller's own address under `me` and its unread messages under `unread`. Sessions that can't receive (not on Reason Network) are left out and counted in `unreachable`, as the engine shows them to agents. Answers 409 `agent_network_offline` when no member computer is online, and 409 `agent_network_no_answer` when one is but didn't read the network in time or said why it couldn't (trying again is safe). With `as`, the call is that chat's own session on the connection, `/`, with its own address and inbox; a blank one is none. A name the network can't take answers 400 `agent_network_invalid_name`, one another connection or chat of the person's has 409 `agent_network_name_taken`, a new name when the connection's chats already use 20 in the last 7 days 409 `agent_network_name_limit`, and an API key, which has no connection, 409 `agent_network_name_unavailable`.
Scope: `sessions:read`
# List the agents on the caller's Reason Network
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/list-the-agents-on-the-callers-reason-network
/openapi.json get /v3/organizations/{orgId}/agent-network/agents
The caller's Reason Network: its live agents across members' computers (Claude Code, Codex, Cursor, workers and others), read through a member's computer that is online with Reason running. Answers 409 `agent_network_offline` when no member computer is online, and 409 `agent_network_no_answer` when one is but didn't read the network in time or said why it couldn't (trying again is safe).
Scope: `sessions:read`
# List the Reason Network networks the caller's connection can join
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/list-the-reason-network-networks-the-callers-connection-can-join
/openapi.json get /v3/organizations/{orgId}/agent-network/networks
For a hosted assistant's connection (an OAuth grant on the Reason MCP): the networks the person's consent screen offers it in this workspace, the one their computers are on first: the workspace's own network where a computer of theirs has been (`id` `workspace`), and their Reason Network teams that aren't stale. Each says whether it is the connection's `current` one, which of the person's own computers are online on it now, and who has a computer online on it, with how many. Another workspace's network is never listed: a connection belongs to one workspace, and reaching another takes connecting again there (`note` names one a computer of theirs is online on). `join_network` moves the connection. Answers 409 `agent_network_networks_unavailable` for an API key or any other sign-in.
Scope: `sessions:read`
# List your Reason Network teams
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/list-your-reason-network-teams
/openapi.json get /v3/network/teams
Returns the signed-in account's registered Reason Network teams as `teams`, newest first, without join links. Requires the Reason CLI's own OAuth login; API keys and other clients receive 403 `network_cli_only` even when authentication succeeds.
Auth: any valid API key (no scope)
# Move the caller's connection to another of its person's Reason Network networks
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/move-the-callers-connection-to-another-of-its-persons-reason-network-networks
/openapi.json put /v3/organizations/{orgId}/agent-network/network
Moves a hosted assistant's connection (its OAuth grant on the Reason MCP) to one of the networks `list_networks` shows, by its `id` (`workspace` for the workspace's own network, or a team's id) or its `name`, as picking it on the consent screen would: its network tools act on that network from the next call, through token refreshes, and a `wake_me` webhook follows it. Its session name stays, as do its chats' names (`as`), which move with it. Unread messages on the network it left stay there, and `note` counts them, its chats' included. Answers 404 `agent_network_network_not_found` for a network `list_networks` doesn't show (another person's team, a stale team, another workspace's network), 409 `agent_network_network_ambiguous` for a name two of them share (give the `id`), and 409 `agent_network_networks_unavailable` for an API key or any other sign-in.
Scope: `run`
# Read the caller's Reason Network inbox
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/read-the-callers-reason-network-inbox
/openapi.json post /v3/organizations/{orgId}/agent-network/inbox
Reason Network's `check_inbox`: messages that reached the caller's agent's sessions on the network (replies to its `send_message` and new messages to that session), which the user's own computer handed over, oldest first. Each counts as read once returned, which is why it is a POST, unless `peek` is true: then nothing is marked and the same messages come again until `ack` names them, which makes reading at-least-once for a client that stores each message (by `id`) before acknowledging it. `ack` is applied before the read, so one call can acknowledge the last batch and peek the next. Unread and read messages are kept 7 days. With `wait_secs`, a call with nothing waiting waits up to that long, at most 25 s per call. With `as`, the call is that chat's own session on the connection, `/`, with its own address and inbox; a blank one is none. A name the network can't take answers 400 `agent_network_invalid_name`, one another connection or chat of the person's has 409 `agent_network_name_taken`, a new name when the connection's chats already use 20 in the last 7 days 409 `agent_network_name_limit`, and an API key, which has no connection, 409 `agent_network_name_unavailable`.
Scope: `sessions:read`
# Register one of your Reason Network teams
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/register-one-of-your-reason-network-teams
/openapi.json post /v3/network/teams
Records a team after the Reason CLI creates or joins it, or updates its current link. Returns team metadata, never the stored link. Requires the Reason CLI's own OAuth login; a network sign-in is restricted to the team it authorized. The link is a credential and must not be logged or sent through MCP.
Auth: any valid API key (no scope)
# Remove a Reason Network team from your directory
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/remove-a-reason-network-team-from-your-directory
/openapi.json post /v3/network/teams/forget
Removes a team from the signed-in account's own Reason Network directory, without the team's link, while none of the account's computers is online on it: sign-in stops offering it. Only this account's entry goes; the team and other accounts' directories are untouched, and a computer of the account still on the team registers it again when its relay starts. Requires the Reason CLI's own OAuth login; a network sign-in's login may remove only its own sign-in's team.
Auth: any valid API key (no scope)
# Remove a Reason Network team nobody is on any more
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/remove-a-reason-network-team-nobody-is-on-any-more
/openapi.json delete /v3/network/teams
The earlier form of `POST /v3/network/teams/leave`, with `last` true unless the body says otherwise. Kept for CLIs that send it.
Auth: any valid API key (no scope)
# Rename the caller's session on Reason Network
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/rename-the-callers-session-on-reason-network
/openapi.json put /v3/organizations/{orgId}/agent-network/me
Sets the caller's connection's own session name on Reason Network, which its address `/` ends with: `list_team`'s `me`, where `send_message` goes out from and replies reach. Each connection of an app (one OAuth grant) has its own: the app's name for the first, then `-2`, `-3`, until renamed here. It holds through token refreshes, and a later connection of the same app takes over the name of one that has ended, or, with its unread messages, of one still on its default name that it signed in again in place of and that is no longer in use. Answers 400 `agent_network_invalid_name` for a name the network can't take, 409 `agent_network_name_taken` when another of the person's live connections has it, and 409 `agent_network_name_unavailable` for an API key, whose session is its app's name.
Scope: `run`
# Replace the workspace's agent network join link
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/replace-the-workspaces-agent-network-join-link
/openapi.json put /v3/organizations/{orgId}/agent-network
Replaces the stored join link and team for future joins. Requires an owner or admin using the Reason CLI's own OAuth login. Send the current link as `replaces`; a concurrent replacement returns 409 `agent_network_changed` with the current network. Creating a missing network can require activation; rotating an existing one remains available. Returned links are credentials, not shareable diagnostic output.
Scope: `org:write`
# Report aggregate network usage
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/report-aggregate-network-usage
/openapi.json post /v3/organizations/{orgId}/agent-network/relay/usage
Optional, content-free cumulative counters from a signed-in Reason CLI. Independent of message delivery and relay claims; missing reports do not prevent network use.
Scope: `run`
# Report the outcome of a claimed agent network call
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/report-the-outcome-of-a-claimed-agent-network-call
/openapi.json post /v3/organizations/{orgId}/agent-network/relay/jobs/{jobId}
Only the Reason CLI may: any other sign-in gets 403 `agent_network_cli_only`. If a job contains claim_token, echo it with the result; a missing or mismatched token returns recorded:false.
Scope: `run`
# Say this computer left one of your Reason Network teams
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/say-this-computer-left-one-of-your-reason-network-teams
/openapi.json post /v3/network/teams/leave
The Reason CLI calls this after its computer left a Reason Network team. The computer stops being registered on it; when it was the last computer on the team (`last`), nobody can let the person back in, so the team leaves the account's directory and sign-in stops offering it. Another of the account's computers registered on the team keeps it; when the link the directory offered was made by the leaving computer, the latest link one of those computers sent takes its place.
Auth: any valid API key (no scope)
# Send a message on the caller's Reason Network
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/send-a-message-on-the-callers-reason-network
/openapi.json post /v3/organizations/{orgId}/agent-network/send
Reason Network's `send_message`. It goes out from one of the caller's own computers that is online with Reason running, as `/`, and returns the engine's delivery state per recipient; replies land in `check_inbox`. 409 reports `agent_network_no_computer`, `agent_network_not_taken`, or an engine failure (`agent_network_send_failed`). `agent_network_delivery_unknown` is also 409: delivery may already have happened, so inspect replies before sending again. Safe failures can retry the same key; a claimed failure needs an upgraded relay with claim tokens. 202 means the computer took it and hasn't reported yet. With `as`, the call is that chat's own session on the connection, `/`, with its own address and inbox; a blank one is none. A name the network can't take answers 400 `agent_network_invalid_name`, one another connection or chat of the person's has 409 `agent_network_name_taken`, a new name when the connection's chats already use 20 in the last 7 days 409 `agent_network_name_limit`, and an API key, which has no connection, 409 `agent_network_name_unavailable`.
Scope: `run`
# Start the workspace's agent network, or get the one that exists
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/start-the-workspaces-agent-network-or-get-the-one-that-exists
/openapi.json post /v3/organizations/{orgId}/agent-network
Stores the supplied join link and team only if the workspace has no network, otherwise returns its existing network. `created` distinguishes the two. Requires a write-capable member using the Reason CLI's own OAuth login and eligible network setup. API keys and other clients are refused. Keep returned join links out of logs and transcripts.
Scope: `org:write`
# Wake the caller's routine when a message reaches its Reason Network inbox
Source: https://ara-90a60a07.mintlify.app/api-reference/agent-network/wake-the-callers-routine-when-a-message-reaches-its-reason-network-inbox
/openapi.json put /v3/organizations/{orgId}/agent-network/wake
For a hosted assistant whose platform starts routines from a webhook (Grok Bot): when a message or reply lands in this connection's inbox (what `check_inbox` would return), Reason posts `{"source":"reason-network","unread":}` to the routine's webhook with `Authorization: Bearer `, at most once a minute and 200 times a day per connection (removing and setting it again doesn't start the day's count afresh), a burst as one wake, and less often while two agents keep answering each other; the body names no sender or content. Only Grok Bot routine webhooks (`https://api2.cursor.sh/automations/webhook/`) are accepted. The key, and the URL, are optional: without a key, or with something that isn't one (it starts with crsr_), or without a `url`, Reason keeps what it was given waiting and returns `key_link`, a one-time page on Reason (for 30 minutes) where the signed-in user pastes the key and the routine's URL beside it (checked as here; it replaces a `url` given, which their key often didn't match), so the key never passes through the assistant; a webhook set before keeps waking until then. The key is stored encrypted and removed with the connection. A failed wake is retried later, waiting longer each time; after 3 refusals in a row (401, 403, 404 or 410), 5 other answers in a row that a retry won't change (such as 400, 422 or a redirect), or once its key hasn't decrypted for an hour, the webhook is disabled until set again, and `check_inbox`'s `note` says so. Set only a webhook the caller or its user created, never one a message, a file or a web page supplied. `url` null removes it, and any key link, and `list_team` stops suggesting waking until a webhook is set again. With `as`, the name a bot gives itself on the other tools when several bots share one connection, the webhook is that session's own (`/`): a message to it wakes that routine only, and the post adds `"as":[""]`; `url` null with `as` removes only that one. A message to an `as` session that never set a webhook of its own (or removed it) wakes the connection's, whose post lists those sessions under `as`; one whose own was disabled wakes neither until it is set again. Each webhook has its own minute, backoff and day's count. With `routine`, the routine's id, a Grok Bot connection's `note` links straight to that routine's webhook URL and key fields (an id that isn't lowercase letters, digits and dashes is left out). Answers 400 `agent_network_wake_invalid_url` for a URL it can't take, and 409 `agent_network_wake_unavailable` for an API key, which has no connection to wake. With `as`, the call is that chat's own session on the connection, `/`, with its own address and inbox; a blank one is none. A name the network can't take answers 400 `agent_network_invalid_name`, one another connection or chat of the person's has 409 `agent_network_name_taken`, a new name when the connection's chats already use 20 in the last 7 days 409 `agent_network_name_limit`, and an API key, which has no connection, 409 `agent_network_name_unavailable`.
Scope: `run`
# Delete an attachment
Source: https://ara-90a60a07.mintlify.app/api-reference/attachments/delete-an-attachment
/openapi.json delete /v3/organizations/{orgId}/attachments/{attachmentId}
Permanently deletes a file uploaded to the organization, and its stored bytes. You can delete an attachment you uploaded; workspace owners and admins can delete any. Deleting a teammate's attachment without that role returns 403. An id that is not an attachment of this organization, or was already deleted, returns 404 attachment_not_found and deletes nothing. Session attachments (files a session's agent kept) are a separate store and are not affected.
Scope: `attachments:write`
# Download an attachment
Source: https://ara-90a60a07.mintlify.app/api-reference/attachments/download-an-attachment
/openapi.json get /v3/organizations/{orgId}/attachments/{attachmentId}
Redirects (307) to a short-lived signed download URL for the attachment.
Scope: `attachments:read`
# Download an attachment (named)
Source: https://ara-90a60a07.mintlify.app/api-reference/attachments/download-an-attachment-named
/openapi.json get /v3/organizations/{orgId}/attachments/{attachmentId}/{filename}
Same 307 redirect as the bare download route; the trailing filename gives naive clients the right file name.
Scope: `attachments:read`
# List attachments
Source: https://ara-90a60a07.mintlify.app/api-reference/attachments/list-attachments
/openapi.json get /v3/organizations/{orgId}/attachments
Returns the files uploaded to the organization, newest first. Paginates by offset: pass `cursor` from the previous page's `end_cursor` to fetch the next page.
Scope: `attachments:read`
# Upload an attachment
Source: https://ara-90a60a07.mintlify.app/api-reference/attachments/upload-an-attachment
/openapi.json post /v3/organizations/{orgId}/attachments
Uploads a file to the organization. Send the file as multipart/form-data in the file field. Maximum file size: 25 MiB (26214400 bytes). Oversized files return HTTP 413; missing files return HTTP 400 file_required. Download URLs are short-lived and may be null. The stored `content_type` is derived from the file's bytes, never from the type or file name you send: an image or video keeps its media type, plain UTF-8 text (including source and markup) is `text/plain; charset=utf-8`, and anything else is `application/octet-stream`. Every file downloads as an attachment.
Scope: `attachments:write`
# List audit log entries
Source: https://ara-90a60a07.mintlify.app/api-reference/audit-logs/list-audit-log-entries
/openapi.json get /v3/organizations/{orgId}/audit-logs
Returns audit log entries newest first. Entry fields are camelCase (`actorUserId`, `targetId`, `createdAt`). Owners and admins read every entry in full. For other members, entries about another member's personal secrets keep their action, actor and time but withhold the secret names (`targetId` and `targetLabel` are null, `metadata.secret_names` omits them, and `metadata.names_withheld` is true).
Scope: `analytics:read`
# Add a trigger to an automation
Source: https://ara-90a60a07.mintlify.app/api-reference/automations/add-a-trigger-to-an-automation
/openapi.json post /v3/organizations/{orgId}/automations/{automationId}/triggers
Provide exactly one schedule: a `frequency` cron expression for recurring runs, `every_seconds` for a fixed interval, or a `scheduled_at` timestamp for a one-time run. More than one returns 400 `schedule_conflict`. `every_seconds` must be a positive integer (400 `invalid_every_seconds`); values from 1 to 59 are raised to the 60-second minimum, returned as `every_seconds: 60` with a `schedule_interval_raised` entry in `warnings`. Only the automation's creator can change it; workspace owners and admins can pause or delete it. Anyone else receives 403 automation_owner_only. An automation filed under a Reason has that Reason's access: everyone who can use the Reason changes it, workspace owners and admins can pause or delete it (anyone else with sight of it receives 403 loop_reason_access_required), and to anyone else it does not exist (404 automation_not_found). A system automation (include=system) is changed only by workspace owners and admins (403 workspace_agent_admin_only); any member may add a trigger to it, which runs as that member, and remove their own triggers.
Scope: `automations:write`
# Admit one occurrence now
Source: https://ara-90a60a07.mintlify.app/api-reference/automations/admit-one-occurrence-now
/openapi.json post /v3/organizations/{orgId}/automations/{automationId}/run
Use a new idempotency_key for intentional repetition. Retrying a key observes the same occurrence. Admission obeys overlap and occurrence budgets; execution starts on the existing scheduler.
Scope: `automations:write`
# Create an automation
Source: https://ara-90a60a07.mintlify.app/api-reference/automations/create-an-automation
/openapi.json post /v3/organizations/{orgId}/automations
Send name and direct to atomically configure a tool_call, job, or explicit agent_task with its schedule and bounded limits; direct actions require their execution scopes and create no reasoning Session unless agent_task. Otherwise creates the automation's configuration (instructions + an optional repository). Add a trigger with `POST /automations/{automationId}/triggers` to make it fire. A `repo`, when sent, must already be connected (400 `repo_not_connected`); without one the automation's runs start with no repository checked out. It is created enabled unless `enabled: false` is sent; a paused automation's triggers do not fire until it is enabled with an update. Name and instructions are trimmed and may not be blank; tools must name MCP servers the workspace has and known app tools (see the field descriptions for each 400 code). A known app tool that is not connected yet is accepted with an `app_tool_not_connected` entry in `warnings`.
Scope: `automations:write`
# Delete an automation
Source: https://ara-90a60a07.mintlify.app/api-reference/automations/delete-an-automation
/openapi.json delete /v3/organizations/{orgId}/automations/{automationId}
Deletes the automation and removes its triggers. Idempotent. Only the automation's creator can change it; workspace owners and admins can pause or delete it. Anyone else receives 403 automation_owner_only. An automation filed under a Reason has that Reason's access: everyone who can use the Reason changes it, workspace owners and admins can pause or delete it (anyone else with sight of it receives 403 loop_reason_access_required), and to anyone else it does not exist (404 automation_not_found). A system automation (include=system) is changed only by workspace owners and admins (403 workspace_agent_admin_only); any member may add a trigger to it, which runs as that member, and remove their own triggers.
Scope: `automations:write`
# List an automation's triggers
Source: https://ara-90a60a07.mintlify.app/api-reference/automations/list-an-automations-triggers
/openapi.json get /v3/organizations/{orgId}/automations/{automationId}/triggers
Returns all configured triggers in items. Schedule triggers describe cron, fixed intervals or one-time schedules; GitHub and webhook triggers use their corresponding metadata. Webhook secrets are never returned. Reading does not fire triggers. Unknown parents return 404 automation_not_found.
Scope: `automations:read`
# List automations
Source: https://ara-90a60a07.mintlify.app/api-reference/automations/list-automations
/openapi.json get /v3/organizations/{orgId}/automations
User-authored automations in the workspace the caller can see, each with its triggers: one filed under a Reason is listed for the people who can use that Reason and for workspace owners and admins. System automations (repo/issue plumbing, connector bridges) are excluded by default; pass `include=system` to return them too. An automation with no triggers is included; it simply never fires on its own.
Scope: `automations:read`
# List up to 100 direct occurrence statuses
Source: https://ara-90a60a07.mintlify.app/api-reference/automations/list-up-to-100-direct-occurrence-statuses
/openapi.json get /v3/organizations/{orgId}/automations/{automationId}/executions
Returns up to 100 occurrence receipts for the automation creator, ordered by scheduled_at descending. There is no pagination cursor. An empty items array means no matching occurrences were found. Receipts include a resource reference when available, never the action arguments or private result. Reading does not repeat an action.
Scope: `automations:read`
# Observe one direct occurrence
Source: https://ara-90a60a07.mintlify.app/api-reference/automations/observe-one-direct-occurrence
/openapi.json get /v3/organizations/{orgId}/automations/{automationId}/executions/{executionId}
Returns the stored lifecycle receipt of one occurrence for the automation creator, including a resource reference when available. It does not invoke the action again or return its private result. A missing occurrence returns 404 execution_not_found.
Scope: `automations:read`
# Pin an immutable action and schedule revision
Source: https://ara-90a60a07.mintlify.app/api-reference/automations/pin-an-immutable-action-and-schedule-revision
/openapi.json put /v3/organizations/{orgId}/automations/{automationId}/action
expectedRevision is zero for initial configuration. Edits affect future occurrences only. Tool calls and jobs create no reasoning Session. The automation may have no trigger or one schedule trigger not bound to a Session; other trigger configurations are refused. The response returns the pinned revision without its captured authorization principal or admission counters.
Scope: `automations:write`
# Read the creator-private typed action
Source: https://ara-90a60a07.mintlify.app/api-reference/automations/read-the-creator-private-typed-action
/openapi.json get /v3/organizations/{orgId}/automations/{automationId}/action
Returns the current pinned action, schedule, limits, revision and admission counters to the automation creator. The captured authorization principal is excluded. Reading admits no occurrence. A missing direct configuration returns 404 direct_configuration_not_found; an inaccessible automation returns 404 automation_not_found.
Scope: `automations:read`
# Remove a trigger from an automation
Source: https://ara-90a60a07.mintlify.app/api-reference/automations/remove-a-trigger-from-an-automation
/openapi.json delete /v3/organizations/{orgId}/automations/{automationId}/triggers/{triggerId}
Idempotent. The automation itself is untouched; it simply stops firing on that condition. Only the automation's creator can change it; workspace owners and admins can pause or delete it. Anyone else receives 403 automation_owner_only. An automation filed under a Reason has that Reason's access: everyone who can use the Reason changes it, workspace owners and admins can pause or delete it (anyone else with sight of it receives 403 loop_reason_access_required), and to anyone else it does not exist (404 automation_not_found). A system automation (include=system) is changed only by workspace owners and admins (403 workspace_agent_admin_only); any member may add a trigger to it, which runs as that member, and remove their own triggers.
Scope: `automations:write`
# Remove the direct configuration and pause future admission
Source: https://ara-90a60a07.mintlify.app/api-reference/automations/remove-the-direct-configuration-and-pause-future-admission
/openapi.json delete /v3/organizations/{orgId}/automations/{automationId}/action
Accepted occurrences retain their immutable revision. Cancel them explicitly. The parent is paused to avoid an implicit change to reasoning.
Scope: `automations:write`
# Request cancellation of an admitted occurrence
Source: https://ara-90a60a07.mintlify.app/api-reference/automations/request-cancellation-of-an-admitted-occurrence
/openapi.json post /v3/organizations/{orgId}/automations/{automationId}/executions/{executionId}/cancel
cancel_requested is intent until the executor acknowledges its outcome; uncertain effects are indeterminate.
Scope: `automations:write`
# Retrieve an automation
Source: https://ara-90a60a07.mintlify.app/api-reference/automations/retrieve-an-automation
/openapi.json get /v3/organizations/{orgId}/automations/{automationId}
Returns the automation's instructions, enabled state, tool configuration, environment and triggers without running it. An empty triggers list means no trigger is configured; disabled automations do not fire. Unknown IDs return 404 automation_not_found.
Scope: `automations:read`
# Update an automation
Source: https://ara-90a60a07.mintlify.app/api-reference/automations/update-an-automation
/openapi.json patch /v3/organizations/{orgId}/automations/{automationId}
Partial update of the automation's configuration. Send only the fields you want to change. The same name, instructions and tools rules as create apply to the fields you send. Triggers are managed through the triggers sub-resource. Only the automation's creator can change it; workspace owners and admins can pause or delete it. Anyone else receives 403 automation_owner_only. An automation filed under a Reason has that Reason's access: everyone who can use the Reason changes it, workspace owners and admins can pause or delete it (anyone else with sight of it receives 403 loop_reason_access_required), and to anyone else it does not exist (404 automation_not_found). A system automation (include=system) is changed only by workspace owners and admins (403 workspace_agent_admin_only); any member may add a trigger to it, which runs as that member, and remove their own triggers.
Scope: `automations:write`
# Discover public operations admitted by this credential's scopes
Source: https://ara-90a60a07.mintlify.app/api-reference/capabilities/discover-public-operations-admitted-by-this-credentials-scopes
/openapi.json get /v3/organizations/{orgId}/capabilities
Lists public operation metadata eligible for this credential scope. Resource readiness, role, feature and billing checks still apply on each call. Query/group filter; first/after paginate; schemas includes inputs. Does not start work.
Scope: `org:read`
# List change request reviews
Source: https://ara-90a60a07.mintlify.app/api-reference/change-request-reviews/list-change-request-reviews
/openapi.json get /v3/organizations/{orgId}/pr-reviews
Returns the latest automated review per pull request among the workspace's 50 most recent review runs, newest first. Items include review ID, repository, PR number, provider, status, comment URL, head SHA and creation time. Pagination inputs are ignored; end_cursor is null and has_next_page is false.
Scope: `reviews:read`
# Request a change request review
Source: https://ara-90a60a07.mintlify.app/api-reference/change-request-reviews/request-a-change-request-review
/openapi.json post /v3/organizations/{orgId}/pr-reviews
Automated pull-request reviews are currently unavailable. Every well-formed GitHub request returns `409 pr_review_disabled`, whichever pull request it names. A body whose fields have the wrong type (`400 invalid_request`) or that sets `create_as_user_id` (`400 forbidden_actor`) is rejected first, and a GitLab merge request URL returns `410 gitlab_retired`.
Scope: `reviews:write`
# Delete a retained checkpoint artifact
Source: https://ara-90a60a07.mintlify.app/api-reference/checkpoint-artifacts/delete-a-retained-checkpoint-artifact
/openapi.json delete /v3/organizations/{orgId}/execution-contexts/{ownerId}/checkpoints/artifacts/{artifactId}
Immediately revokes new reads; the existing private-blob sweeper removes bytes after its grace period. A chunk referenced by a retained manifest cannot be deleted. Deleting a manifest does not implicitly delete chunks used elsewhere.
Scope: `attachments:write`
# Delete a retained checkpoint artifact
Source: https://ara-90a60a07.mintlify.app/api-reference/checkpoint-artifacts/delete-a-retained-checkpoint-artifact-1
/openapi.json delete /v3/organizations/{orgId}/jobs/{ownerId}/checkpoints/artifacts/{artifactId}
Immediately revokes new reads; the existing private-blob sweeper removes bytes after its grace period. A chunk referenced by a retained manifest cannot be deleted. Deleting a manifest does not implicitly delete chunks used elsewhere.
Scope: `attachments:write`
# Prepare a private checkpoint chunk
Source: https://ara-90a60a07.mintlify.app/api-reference/checkpoint-artifacts/prepare-a-private-checkpoint-chunk
/openapi.json post /v3/organizations/{orgId}/execution-contexts/{ownerId}/checkpoints/chunks/prepare
Requires attachments:read/write, jobs:read/execute and devices:use. The owner must still be active with its original resource grant. Up to 32 MiB per chunk; preparation saves no bytes. PUT to the returned private URL or use the upload endpoint, then seal.
Scope: `attachments:write`
# Prepare a private checkpoint chunk
Source: https://ara-90a60a07.mintlify.app/api-reference/checkpoint-artifacts/prepare-a-private-checkpoint-chunk-1
/openapi.json post /v3/organizations/{orgId}/jobs/{ownerId}/checkpoints/chunks/prepare
Requires attachments:read/write, jobs:read/execute and devices:use. The owner must still be active with its original resource grant. Up to 32 MiB per chunk; preparation saves no bytes. PUT to the returned private URL or use the upload endpoint, then seal.
Scope: `attachments:write`
# Read a retained checkpoint and fresh private URLs
Source: https://ara-90a60a07.mintlify.app/api-reference/checkpoint-artifacts/read-a-retained-checkpoint-and-fresh-private-urls
/openapi.json get /v3/organizations/{orgId}/execution-contexts/{ownerId}/checkpoints/manifests/{artifactId}
Requires current owner credential, membership and unchanged resource grant. Retained reads may outlive context/job expiry; they never reactivate physical execution. URLs expire within ten minutes. Deleted or expired bytes are unavailable.
Scope: `attachments:read`
# Read a retained checkpoint and fresh private URLs
Source: https://ara-90a60a07.mintlify.app/api-reference/checkpoint-artifacts/read-a-retained-checkpoint-and-fresh-private-urls-1
/openapi.json get /v3/organizations/{orgId}/jobs/{ownerId}/checkpoints/manifests/{artifactId}
Requires current owner credential, membership and unchanged resource grant. Retained reads may outlive context/job expiry; they never reactivate physical execution. URLs expire within ten minutes. Deleted or expired bytes are unavailable.
Scope: `attachments:read`
# Read checkpoint preparation or sealing status
Source: https://ara-90a60a07.mintlify.app/api-reference/checkpoint-artifacts/read-checkpoint-preparation-or-sealing-status
/openapi.json get /v3/organizations/{orgId}/execution-contexts/{ownerId}/checkpoints/artifacts/{artifactId}
Reads an owned retained checkpoint with current grant checks. Manifest URLs expire; reads never reactivate a worker. Deleted or expired bytes remain unavailable.
Scope: `attachments:read`
# Read checkpoint preparation or sealing status
Source: https://ara-90a60a07.mintlify.app/api-reference/checkpoint-artifacts/read-checkpoint-preparation-or-sealing-status-1
/openapi.json get /v3/organizations/{orgId}/jobs/{ownerId}/checkpoints/artifacts/{artifactId}
Reads an owned retained checkpoint with current grant checks. Manifest URLs expire; reads never reactivate a worker. Deleted or expired bytes remain unavailable.
Scope: `attachments:read`
# Register an ordered immutable checkpoint manifest
Source: https://ara-90a60a07.mintlify.app/api-reference/checkpoint-artifacts/register-an-ordered-immutable-checkpoint-manifest
/openapi.json post /v3/organizations/{orgId}/execution-contexts/{ownerId}/checkpoints/manifests
All referenced chunks must be sealed under this exact owner. The manifest retains their ordered identities and inherits their shortest retention. Resume instructions are data, never execution authority or proof of saved process memory.
Scope: `attachments:write`
# Register an ordered immutable checkpoint manifest
Source: https://ara-90a60a07.mintlify.app/api-reference/checkpoint-artifacts/register-an-ordered-immutable-checkpoint-manifest-1
/openapi.json post /v3/organizations/{orgId}/jobs/{ownerId}/checkpoints/manifests
All referenced chunks must be sealed under this exact owner. The manifest retains their ordered identities and inherits their shortest retention. Resume instructions are data, never execution authority or proof of saved process memory.
Scope: `attachments:write`
# Set bounded checkpoint retention
Source: https://ara-90a60a07.mintlify.app/api-reference/checkpoint-artifacts/set-bounded-checkpoint-retention
/openapi.json put /v3/organizations/{orgId}/execution-contexts/{ownerId}/checkpoints/artifacts/{artifactId}/retention
Sets retention to 1–365 days from now. Manifest extensions also retain their exact parts; shortening a chunk below a live manifest is refused. Expired or deleted receipts cannot be resurrected.
Scope: `attachments:write`
# Set bounded checkpoint retention
Source: https://ara-90a60a07.mintlify.app/api-reference/checkpoint-artifacts/set-bounded-checkpoint-retention-1
/openapi.json put /v3/organizations/{orgId}/jobs/{ownerId}/checkpoints/artifacts/{artifactId}/retention
Sets retention to 1–365 days from now. Manifest extensions also retain their exact parts; shortening a chunk below a live manifest is refused. Expired or deleted receipts cannot be resurrected.
Scope: `attachments:write`
# Upload exactly the prepared chunk bytes
Source: https://ara-90a60a07.mintlify.app/api-reference/checkpoint-artifacts/upload-exactly-the-prepared-chunk-bytes
/openapi.json put /v3/organizations/{orgId}/execution-contexts/{ownerId}/checkpoints/chunks/{artifactId}/content
The body must match the prepared SHA256 and size. This writes only the pending inbox; sealing is still required for durable publication.
Scope: `attachments:write`
# Upload exactly the prepared chunk bytes
Source: https://ara-90a60a07.mintlify.app/api-reference/checkpoint-artifacts/upload-exactly-the-prepared-chunk-bytes-1
/openapi.json put /v3/organizations/{orgId}/jobs/{ownerId}/checkpoints/chunks/{artifactId}/content
The body must match the prepared SHA256 and size. This writes only the pending inbox; sealing is still required for durable publication.
Scope: `attachments:write`
# Verify and seal immutable checkpoint bytes
Source: https://ara-90a60a07.mintlify.app/api-reference/checkpoint-artifacts/verify-and-seal-immutable-checkpoint-bytes
/openapi.json post /v3/organizations/{orgId}/execution-contexts/{ownerId}/checkpoints/chunks/{artifactId}/seal
Verifies the complete uploaded size and SHA256, copies bytes to a separate immutable private object, and fences publication on the current owner grant. Retrying a successful seal returns the same receipt.
Scope: `attachments:write`
# Verify and seal immutable checkpoint bytes
Source: https://ara-90a60a07.mintlify.app/api-reference/checkpoint-artifacts/verify-and-seal-immutable-checkpoint-bytes-1
/openapi.json post /v3/organizations/{orgId}/jobs/{ownerId}/checkpoints/chunks/{artifactId}/seal
Verifies the complete uploaded size and SHA256, copies bytes to a separate immutable private object, and fences publication on the current owner grant. Retrying a successful seal returns the same receipt.
Scope: `attachments:write`
# Create or replace a cloud access connection
Source: https://ara-90a60a07.mintlify.app/api-reference/cloud-access/create-or-replace-a-cloud-access-connection
/openapi.json put /v3/organizations/{orgId}/cloud-access/{provider}
Saves the workspace's one connection for a provider (`aws`, `gcp` or `azure`). Requires owner/admin. `config` is required and replaces the stored config; a changed config clears the last test. `enabled` and `allowed_triggers` keep their stored values when omitted; a new connection is enabled and allows `manual` and `api`. A connection signs in only runs whose trigger it allows: `manual` sessions started in the reason app; `api` sessions started with the api, the cli or by another session; `schedule` scheduled automations; `github_event` github mentions, issues and pull requests; `webhook` automation webhooks; `slack` slack mentions; `linear` linear issues.
Scope: `org:write`
# Delete a cloud access connection
Source: https://ara-90a60a07.mintlify.app/api-reference/cloud-access/delete-a-cloud-access-connection
/openapi.json delete /v3/organizations/{orgId}/cloud-access/{provider}
Removes the workspace's connection for a provider. Requires owner/admin. Sessions stop receiving that provider's credentials; a missing connection also answers 204.
Scope: `org:write`
# Read cloud access
Source: https://ara-90a60a07.mintlify.app/api-reference/cloud-access/read-cloud-access
/openapi.json get /v3/organizations/{orgId}/cloud-access
Returns the OIDC issuer facts a cloud's trust policy needs and the workspace's saved connections. Answers 404 while cloud access is not enabled for the workspace.
Scope: `org:read`
# Test a cloud access connection
Source: https://ara-90a60a07.mintlify.app/api-reference/cloud-access/test-a-cloud-access-connection
/openapi.json post /v3/organizations/{orgId}/cloud-access/{provider}/test
Signs a token as the workspace (or one repository) and runs the provider's real exchange from Reason's servers. Requires owner/admin. The outcome becomes the connection's last test. A provider refusal is HTTP 200 with `ok: false`.
Scope: `org:write`
# List a Reason's computers
Source: https://ara-90a60a07.mintlify.app/api-reference/computers/list-a-reasons-computers
/openapi.json get /v3/organizations/{orgId}/reasons/{reasonId}/computers
Lists the computers available to the caller for a Reason, with the same personal visibility, sharing and connected-computer selection rules as the app. Requires the opt-in computers:read scope. Returns 404 when the caller cannot start Sessions under this Reason. In the workspace resource model this includes eligible shared workspace cloud computers. Cloud live distinguishes awake from parked; connected state describes availability. Listing does not grant physical execution permission or wake computers.
Scope: `computers:read`
# List workspace computers
Source: https://ara-90a60a07.mintlify.app/api-reference/computers/list-workspace-computers
/openapi.json get /v3/organizations/{orgId}/computers
Lists cloud and connected computers visible to the caller in this workspace, using the same personal visibility and sharing rules as Reason's computer inventory. Requires the explicitly granted computers:read scope, which is excluded from default keys. Includes eligible Reasons' cloud computers, the caller's running cloud computers outside a Reason, and eligible connected computers; administrator-only viewable devices are not exposed. Cloud live distinguishes awake from parked; connected state describes availability. This read does not wake machines or grant execution authority. For local execution, devices:read discovers Device targets and devices:use separately authorizes execution on an eligible target.
Scope: `computers:read`
# List service connections and their health
Source: https://ara-90a60a07.mintlify.app/api-reference/connections/list-service-connections-and-their-health
/openapi.json get /v3/organizations/{orgId}/connections
Lists visible native accounts and MCP installations grouped by service, with cached health and supported actions. Pass adapter and record identifier as id to manageConnection; use check for fresh health. Excludes credentials and other users' personal accounts.
Scope: `mcp:read`
# Manage one connection
Source: https://ara-90a60a07.mintlify.app/api-reference/connections/manage-one-connection
/openapi.json post /v3/organizations/{orgId}/connections/{adapter}/{id}/{action}
Runs one action on a connection from listConnections: `check` probes health, `reconnect` returns a consent URL, `cancel` removes pending MCP setup, `remove` and MCP `disconnect` act locally, and native `disconnect` revokes where supported. Requires management permission; an unsupported action returns 409.
A failed MCP `check` returns 200 with `{ "ok": false, "error": , "message"?: }`. `curated_http_only` means the server is a remote (`http` or `sse`) custom server whose URL was never approved, so every check and tool call fails; an owner or admin approves it by sending its `url` with updateMcpServer (transport `http`, a public https URL). A `stdio` server is not checked from Reason's servers (409 `connection_check_unsupported_transport`); it runs inside a session's computer.
Scope: `mcp:write`
# Get daily consumption
Source: https://ara-90a60a07.mintlify.app/api-reference/consumption/get-daily-consumption
/openapi.json get /v3/organizations/{orgId}/consumption/daily
Returns usage broken down by day over a date range.
Scope: `analytics:read`
# Get usage quota
Source: https://ara-90a60a07.mintlify.app/api-reference/consumption/get-usage-quota
/openapi.json get /v3/organizations/{orgId}/usage/quota
Returns how much of the workspace's current usage quota is used, as shown on the Billing page: AI usage (model calls) and Cloud usage (cloud computers) each have their own share. Requires an organization owner or admin.
Scope: `analytics:read`
# Get usage summary
Source: https://ara-90a60a07.mintlify.app/api-reference/consumption/get-usage-summary
/openapi.json get /v3/organizations/{orgId}/usage/summary
Returns a window's model usage per model and per agent (a Session's lead agent, or the helper agents it spawned), and cloud machine usage per size, with tokens and the RCU charged. These are the totals the Usage settings page shows. Every member may read it. Returns 400 `invalid_user_id` when `user_id` is not a UUID.
Scope: `analytics:read`
# Add a folder to your computer
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/add-a-folder-to-your-computer
/openapi.json post /v3/organizations/{orgId}/devices/{deviceId}/roots
Adds a folder (its path fingerprint, keyed like the enrollment's) to the caller's own personal headless Device (`reason connect`) without re-enrolling it. The grant takes the execution mode of the Device's existing roots. Adding a folder it already holds returns that root.
Scope: `devices:write`
# Add an SSH connection
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/add-an-ssh-connection
/openapi.json post /v3/organizations/{orgId}/ssh-connections
Save encrypted password or private-key authentication for a Linux or macOS host. Does not connect yet. Explicit host-access consent and a non-secret idempotency_key are required. Same key/body replays for 24 hours, including after credential rotation. Changed bodies, expired keys and deleted connections conflict. Keep credentials in a caller-side secret manager, never prompts or command history. REST only. Requires an API key with `ssh:write`, which is never granted by default: select it explicitly when creating the key.
## Server setup requirements
Reason's hosted connector initiates SSH from Reason's cloud, not from your browser or computer. Configure the server before saving a connection:
1. Use a Linux server or a Mac (macOS on Apple silicon or Intel) with an x64 or arm64 CPU. Windows is not supported by this automatic installation flow. SSH devices run headlessly; they do not provide desktop streaming or interactive desktop control.
2. Provide a public hostname or IP address and an SSH port reachable from Reason's cloud. Private LAN, localhost, and Tailscale-only addresses are not supported, so a Mac or server behind a home router needs a public address or port forward. A successful SSH connection from your own computer does not prove cloud reachability. Reason may connect from more than one address. Configure the host's firewall and any upstream network rules according to your organization's security policy; do not disable the firewall.
3. Enable SSH and authorize the supplied SSH user with a password or private key. Prefer a dedicated, least-privileged account and key. The account needs a private, writable home directory, disk space for the worker, and permission to read, write, and execute within its workspace. Root or administrator access is not required.
4. Allow outbound HTTPS for the CLI download and the worker's connection to Reason. On Linux, the host needs bash, curl, getent, stat, readlink, and timeout. With systemd, a non-root user needs lingering enabled by the administrator. Without systemd, use Reconnect after the host restarts or the worker stops; such a worker also does not update itself, and Reconnect installs the current release. On macOS, the stock system tools are sufficient and the account does not need to sign in to the desktop. The worker runs as a per-user launchd agent, so use Reconnect after the Mac restarts, and keep the Mac from sleeping while it should accept work. With systemd or launchd, the worker checks for a new Reason release every six hours and restarts on it after finishing its current work.
5. Save the connection, then connect to probe the SSH host key. Compare the fingerprint with a trusted source before choosing Trust & install, for example by running `ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub` on the host through a console you already trust. Reason installs and enrolls the worker only after that verification.
For example, an administrator can prepare a dedicated user on a systemd host, replacing the public key:
```sh
sudo useradd -m -s /bin/bash reason
sudo loginctl enable-linger reason
sudo install -d -m 700 -o reason -g reason /home/reason/.ssh
echo 'ssh-ed25519 AAAA... reason' | sudo tee /home/reason/.ssh/authorized_keys
sudo chown reason:reason /home/reason/.ssh/authorized_keys
sudo chmod 600 /home/reason/.ssh/authorized_keys
```
On a Mac, turn on Remote Login in System Settings > General > Sharing. Then an administrator can prepare the account from Terminal, replacing the public key. The `dseditgroup` line is needed only when Remote Login allows only specific users:
```sh
sudo sysadminctl -addUser reason -fullName "Reason worker" -password "$(openssl rand -base64 24)"
sudo createhomedir -c -u reason
sudo dseditgroup -o edit -a reason -t user com.apple.access_ssh
sudo -u reason install -d -m 700 /Users/reason/.ssh
echo 'ssh-ed25519 AAAA... reason' | sudo -u reason tee /Users/reason/.ssh/authorized_keys
sudo -u reason chmod 600 /Users/reason/.ssh/authorized_keys
sudo pmset -a sleep 0
```
## Run a Session on the host
Once the connection is connected, its `device_id` is the enrolled Device (a different ID from the connection). Read `GET /v3/organizations/{orgId}/devices/{device_id}` and use a root's `id` as `root_id`, then create a Session with `devices:use`:
```json
POST /v3/organizations/{orgId}/sessions
{
"prompt": "Write fizzbuzz.py in the workspace, run it with python3, and report its output and df -h .",
"idempotency_key": "",
"target": { "kind": "headless", "device_id": "", "root_id": "" }
}
```
`GET` the Session to read back its `target`.
## Remove the host software
Deleting a connection deletes its credentials and revokes its Device; the worker files stay on the host. To remove them, run `if [ "$(uname -s)" = Darwin ]; then for label in com.reasonmachines.ssh-updater. com.reasonmachines.ssh-worker. so.reason.ssh-updater. so.reason.ssh-worker. so.ara.ssh-updater. so.ara.ssh-worker.; do launchctl bootout user/$(id -u)/$label 2>/dev/null; rm -f ~/Library/LaunchAgents/$label.plist; done; else systemctl --user disable --now reason-ssh--update.timer; systemctl --user disable --now reason-ssh-.service; rm -f ~/.config/systemd/user/reason-ssh-.service ~/.config/systemd/user/reason-ssh--update.service ~/.config/systemd/user/reason-ssh--update.timer; systemctl --user daemon-reload; fi; rm -rf ~/.reason-ssh/` as the SSH user. For root, use `systemctl` without `--user` and the units in `/etc/systemd/system`. The workspace is left in place: by default the shared `~/.reason/workspace`, which other Reason workers on the host also use.
If setup fails, inspect the connection's error_code: ssh_host_blocked means the address is not permitted; ssh_dns_failed means name resolution failed; ssh_authentication_failed means the credentials were rejected; ssh_platform_unsupported means the operating system or architecture is unsupported. A connected setup receipt is not proof that the Device remains online; check its current Device status.
Scope: `ssh:write`
# Approve a headless installation
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/approve-a-headless-installation
/openapi.json post /v3/organizations/{orgId}/devices/enrollment-tickets
Approves headless enrollment for an API-key or OAuth principal. The installer supplies its P-256 public key, PKCE challenge and requested root ceilings. The returned enrollment_ticket is a one-use credential valid for 120 seconds: redeem through the signed Device transport and never log it. Device lifetime is separate. Execution feature gates can return 503.
Scope: `devices:write`
# Bootstrap a Mac SSH activation
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/bootstrap-a-mac-ssh-activation
/openapi.json post /v3/organizations/{orgId}/ssh-connections/{connectionId}/activate
Starts the existing owner-scoped SSH attempt, returns a short-lived one-use reverse-SSH receipt, and runs the existing install/enrollment flow. The receipt must be consumed by the signed-in Mac worker; no bearer token is persisted.
Scope: `ssh:write`
# Change an approved root grant
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/change-an-approved-root-grant
/openapi.json put /v3/organizations/{orgId}/devices/{deviceId}/roots/{rootId}/grant
Requires the current revision. Cannot exceed enrollment ceilings; changing a grant cancels queued and claimed work.
Scope: `devices:write`
# Connect or reconnect over SSH
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/connect-or-reconnect-over-ssh
/openapi.json post /v3/organizations/{orgId}/ssh-connections/{connectionId}/connect
Returns 202, not readiness. With no pinned host key, this only probes: poll, compare the fingerprint to a trusted source, then send a fresh idempotency_key and host_key_fingerprint to install. Never blindly trust a probe. Later reconnects reuse retained credentials and valid Device identity. A repeated key replays the original operation without launching again. Poll GET with a deadline; after interruption use a fresh key explicitly. Authorization is checked at admission; revoking the initiating API key does not cancel accepted setup or revoke its Device. Non-systemd hosts need manual Reconnect after restart. REST only.
Scope: `ssh:write`
# Delete an SSH connection
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/delete-an-ssh-connection
/openapi.json delete /v3/organizations/{orgId}/ssh-connections/{connectionId}
Deletes retained credentials and revokes tickets/Devices issued by this connection. Keeps non-secret request-key tombstones until workspace membership removal so retries cannot recreate deleted credentials. Does not uninstall remote software or destroy the VM; see Add an SSH connection for the cleanup command. A repeated delete returns 404. REST only.
Scope: `ssh:write`
# Enroll a headless installation
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/enroll-a-headless-installation
/openapi.json post /v3/organizations/{orgId}/devices/enrollments
Approves and redeems a headless enrollment in one request for an API-key or OAuth principal: the same approval as POST .../devices/enrollment-tickets, redeemed at once with its PKCE verifier and the Device's registration and P-256 public key. The Device then authenticates on the signed Device transport. Execution feature gates can return 503.
Scope: `devices:write`
# Launch an approved sandbox target
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/launch-an-approved-sandbox-target
/openapi.json post /v3/organizations/{orgId}/sandbox-targets/{targetId}/launch
Launches one approved sandbox target and returns the instance with its state. A repeated idempotency_key returns the same instance instead of allocating again. Poll getSandboxInstance for readiness, or let createSession's sandbox_target_id provision and wait. Takes no credentials.
Scope: `devices:use`
# List experimental sandbox targets
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/list-experimental-sandbox-targets
/openapi.json get /v3/organizations/{orgId}/sandbox-targets
Lists the sandbox targets the caller created, enabled or disabled, each with its live instances, and the caller's provider credentials by id, provider and revoked_at; no secret appears. createSession's sandbox_target_id provisions an enabled one on demand. Experimental workspaces only.
Scope: `devices:read`
# List your Devices
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/list-your-devices
/openapi.json get /v3/organizations/{orgId}/devices
Lists Mac/headless Devices one page at a time: `first` Devices per page (200 unless given), and when `has_next_page` is true, `end_cursor` passed as `after` reads the next page, so no Device is left out. A Device with its roots is about 3 KB; ask for a smaller `first` where the size of one response matters. The default owned scope lists the caller's devices; scope=workspace lists all devices in the workspace for owners and admins. Expired and revoked entries are included, after the Devices that are still connected and unexpired; each group is newest first. Managed infrastructure is excluded. An `after` this list did not return is refused with 400 invalid_cursor.
Scope: `devices:read`
# List your SSH connections
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/list-your-ssh-connections
/openapi.json get /v3/organizations/{orgId}/ssh-connections
Lists only the caller's saved connections. No workspace/admin override or credential values.
Scope: `devices:read`
# Read sandbox readiness
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/read-sandbox-readiness
/openapi.json get /v3/organizations/{orgId}/sandbox-targets/instances/{instanceId}
Poll one owned sandbox instance. ready means an authenticated compatible worker with approved root is available; provisioning is not ready. No fallback to default compute. Returns the instance with its state, and device_id and root_id once ready.
Scope: `devices:read`
# Read your Device
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/read-your-device
/openapi.json get /v3/organizations/{orgId}/devices/{deviceId}
Returns a device and its approved roots. Default scope exposes only the caller's devices; scope=workspace requires an owner or admin. Inspect status, online, compatible and compatibility_reason before choosing an execution target. Invalid or inaccessible IDs return 404 device_not_found.
Scope: `devices:read`
# Read your SSH connection
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/read-your-ssh-connection
/openapi.json get /v3/organizations/{orgId}/ssh-connections/{connectionId}
Poll current setup state. Expired attempts are reconciled before returning. Compare latest_operation_id to your accepted operation_id; another caller can supersede your attempt. connected describes completed setup, not perpetual Device liveness. Once connected, device_id is the Device to target from a Session (see Add an SSH connection).
Scope: `devices:read`
# Remove a folder from your computer
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/remove-a-folder-from-your-computer
/openapi.json delete /v3/organizations/{orgId}/devices/{deviceId}/roots/{rootId}
Removes a folder from the caller's own personal headless Device and cancels queued and claimed work in it. The Device keeps at least one folder. Removing a removed folder succeeds.
Scope: `devices:write`
# Rename a Device
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/rename-a-device
/openapi.json patch /v3/organizations/{orgId}/devices/{deviceId}
Sets the name a connected computer shows in the Computers settings page and as a Session target. The person who added the computer can rename it; a workspace owner or admin can rename any member's. Returns 404 device_not_found for an invalid, removed or inaccessible device.
Scope: `devices:write`
# Replace saved SSH credentials
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/replace-saved-ssh-credentials
/openapi.json patch /v3/organizations/{orgId}/ssh-connections/{connectionId}/credentials
Replaces encrypted authentication without connecting, changing pinned host trust, or rotating the Device identity. Next call connect explicitly with a fresh request key. Do not retry across another credential replacement. REST only; values are write-only.
Scope: `ssh:write`
# Revoke your Device
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/revoke-your-device
/openapi.json delete /v3/organizations/{orgId}/devices/{deviceId}
Revokes a device owned by the caller and cancels queued or claimed work. Workspace inventory access does not authorize revoking another member's device here. Returns revoked: true, including when the Device is already revoked, or 404 device_not_found for an invalid or inaccessible device.
Scope: `devices:write`
# Set your Device's direct access
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/set-your-devices-direct-access
/openapi.json patch /v3/organizations/{orgId}/devices/{deviceId}/direct-access
Sets the owner's Direct device access choice for one of the caller's own personal Devices (Settings > Network). New personal Devices, including headless workers enrolled with an API key, start with it off and are not compatible until it is on. Machine and compute workers are not managed here. 409 stale_direct_access_revision when expected_revision is not current; 409 direct_access_update_required when turning it off needs a newer worker; 404 device_not_found for another member's, a Machine's or an inaccessible Device.
Scope: `devices:write`
# Stop a sandbox instance
Source: https://ara-90a60a07.mintlify.app/api-reference/devices/stop-a-sandbox-instance
/openapi.json delete /v3/organizations/{orgId}/sandbox-targets/instances/{instanceId}
Revoke the worker and enrollment immediately and schedule provider destruction. Returns stopping: true; poll getSandboxInstance until state is terminated. Cleanup retries are durable.
Scope: `devices:write`
# Fetch public web content
Source: https://ara-90a60a07.mintlify.app/api-reference/direct-web/fetch-public-web-content
/openapi.json post /v3/organizations/{orgId}/web/fetch
Fetch one public HTTP(S) URL with bounded content, redirect and private-network protection. Requires web:read. Returns the existing text, PDF or image tool output without creating a Session.
Scope: `web:read`
# Search the public web
Source: https://ara-90a60a07.mintlify.app/api-reference/direct-web/search-the-public-web
/openapi.json post /v3/organizations/{orgId}/web/search
Search the public web with a bounded query and 1-10 results. Requires web:read. No Session is created. PHI workspace restrictions and provider usage attribution apply.
Scope: `web:read`
# Acquire an optional bounded Device/root context
Source: https://ara-90a60a07.mintlify.app/api-reference/execution-contexts/acquire-an-optional-bounded-deviceroot-context
/openapi.json post /v3/organizations/{orgId}/execution-contexts
Acquires a bounded context for an authorized Device and root. The context supports reusable physical resources without creating a reasoning Session.
Scope: `jobs:execute`
# Close a context and stop renewing its physical resource leases
Source: https://ara-90a60a07.mintlify.app/api-reference/execution-contexts/close-a-context-and-stop-renewing-its-physical-resource-leases
/openapi.json post /v3/organizations/{orgId}/execution-contexts/{contextId}/close
Closes an owned context and stops renewing its resource leases. Physical cleanup follows the bounded worker lease.
Scope: `jobs:execute`
# Inspect a context and measured capabilities
Source: https://ara-90a60a07.mintlify.app/api-reference/execution-contexts/inspect-a-context-and-measured-capabilities
/openapi.json get /v3/organizations/{orgId}/execution-contexts/{contextId}
Returns an owned context and its currently measured target capabilities. Reading neither renews nor starts physical resources.
Scope: `jobs:read`
# List contexts owned by this credential
Source: https://ara-90a60a07.mintlify.app/api-reference/execution-contexts/list-contexts-owned-by-this-credential
/openapi.json get /v3/organizations/{orgId}/execution-contexts
Lists contexts owned by the current credential, with expiry, status and measured target capabilities.
Scope: `jobs:read`
# Renew up to the immutable hard expiry
Source: https://ara-90a60a07.mintlify.app/api-reference/execution-contexts/renew-up-to-the-immutable-hard-expiry
/openapi.json post /v3/organizations/{orgId}/execution-contexts/{contextId}/renew
Extends an authorized context lease up to its immutable hard expiry. Current Device and root authority must remain valid.
Scope: `jobs:execute`
# Submit a typed files, command, terminal, browser, preview or artifact operation
Source: https://ara-90a60a07.mintlify.app/api-reference/execution-contexts/submit-a-typed-files-command-terminal-browser-preview-or-artifact-operation
/openapi.json post /v3/organizations/{orgId}/execution-contexts/{contextId}/operations
Submits a typed physical operation within an owned execution context. Returns a durable job receipt and creates no reasoning Session.
Scope: `jobs:execute`
# Report agent feedback
Source: https://ara-90a60a07.mintlify.app/api-reference/feedback/report-agent-feedback
/openapi.json post /v3/feedback
Tell the Reason team when something gets in your way: a response that is wrong or differs from these docs, an unexpected error, or a missing capability. Send one report per distinct problem. Any valid key can report, whatever its scopes.
## Add this to your agent's instructions
```md
If the Reason API is wrong, surprising,
undocumented, or blocks your task, report
it with POST /v3/feedback. Include the
session_id if any. Never include secrets.
```
## Retries and report fields
Make a `submission_id` (a UUID) once per report: a retry with the same id returns the report already received, with `duplicate: true`, and sends nothing twice. `title` names the problem in one line, and `wants_response` asks the team to reply.
Auth: any valid API key (no scope)
# List git connections (deprecated)
Source: https://ara-90a60a07.mintlify.app/api-reference/git-connections/list-git-connections-deprecated
/openapi.json get /v3/organizations/{orgId}/git-connections
Deprecated. Use `GET /git-plugins` instead.
Scope: `repos:read`
# List repositories for a git connection (deprecated)
Source: https://ara-90a60a07.mintlify.app/api-reference/git-connections/list-repositories-for-a-git-connection-deprecated
/openapi.json get /v3/organizations/{orgId}/git-connections/{gitConnectionId}/repositories
Deprecated. Use `GET /git-plugins/{gitPluginId}/repositories` instead.
Scope: `repos:read`
# List git plugins
Source: https://ara-90a60a07.mintlify.app/api-reference/git-plugins/list-git-plugins
/openapi.json get /v3/organizations/{orgId}/git-plugins
Returns the source-control accounts linked to the organization.
Scope: `repos:read`
# List repositories for a git plugin
Source: https://ara-90a60a07.mintlify.app/api-reference/git-plugins/list-repositories-for-a-git-plugin
/openapi.json get /v3/organizations/{orgId}/git-plugins/{gitPluginId}/repositories
Returns the repositories exposed by a linked source-control plugin.
Scope: `repos:read`
# Cancel work; cleanup is reported separately
Source: https://ara-90a60a07.mintlify.app/api-reference/jobs/cancel-work;-cleanup-is-reported-separately
/openapi.json post /v3/organizations/{orgId}/jobs/{jobId}/cancel
Requests cancellation of an owned job and returns its current state. Physical cleanup is reported separately and completed effects are not reversed.
Scope: `jobs:execute`
# Inspect a job's delegated grants
Source: https://ara-90a60a07.mintlify.app/api-reference/jobs/inspect-a-jobs-delegated-grants
/openapi.json get /v3/organizations/{orgId}/jobs/{jobId}/delegations
Requires jobs:read and devices:use plus the job's owning API key or OAuth grant. Returns only operation/resource ceilings, call budgets, expiry and revocation metadata. Delegated job principals cannot administer grants.
Scope: `jobs:read`
# List jobs owned by this credential
Source: https://ara-90a60a07.mintlify.app/api-reference/jobs/list-jobs-owned-by-this-credential
/openapi.json get /v3/organizations/{orgId}/jobs
Lists jobs owned by the current credential, with cursor pagination. Results describe lifecycle state without private output.
Scope: `jobs:read`
# Observe a job without restarting it
Source: https://ara-90a60a07.mintlify.app/api-reference/jobs/observe-a-job-without-restarting-it
/openapi.json get /v3/organizations/{orgId}/jobs/{jobId}/wait
Waits up to the requested timeout for an owned job to reach a terminal state. An elapsed wait returns current state without cancellation or restart.
Scope: `jobs:read`
# Read bounded owner-private output
Source: https://ara-90a60a07.mintlify.app/api-reference/jobs/read-bounded-owner-private-output
/openapi.json get /v3/organizations/{orgId}/jobs/{jobId}/result
Returns bounded private output for an owned completed job. Current credential and resource authority are checked again.
Scope: `jobs:read`
# Read bounded resumable job lifecycle events
Source: https://ara-90a60a07.mintlify.app/api-reference/jobs/read-bounded-resumable-job-lifecycle-events
/openapi.json get /v3/organizations/{orgId}/jobs/{jobId}/events
Returns bounded lifecycle events after an event cursor. Events exclude private command arguments and output.
Scope: `jobs:read`
# Read job status
Source: https://ara-90a60a07.mintlify.app/api-reference/jobs/read-job-status
/openapi.json get /v3/organizations/{orgId}/jobs/{jobId}
Returns the current lifecycle state of an owned job. Reading does not start or repeat execution.
Scope: `jobs:read`
# Revoke a job's delegated grant
Source: https://ara-90a60a07.mintlify.app/api-reference/jobs/revoke-a-jobs-delegated-grant
/openapi.json delete /v3/organizations/{orgId}/jobs/{jobId}/delegations/{grantId}
Requires jobs:delegate and the exact job's owning API key or OAuth grant. Revocation is permanent and idempotent; it does not require the grant's former tool or memory scopes or a live worker. No token or credential material is returned. Delegated job principals cannot administer grants.
Scope: `jobs:delegate`
# Submit deterministic work on a granted Device
Source: https://ara-90a60a07.mintlify.app/api-reference/jobs/submit-deterministic-work-on-a-granted-device
/openapi.json post /v3/organizations/{orgId}/jobs
Submits deterministic work to an authorized Device and returns a durable job receipt. Acceptance does not mean execution has started. No reasoning Session is created.
Scope: `jobs:execute`
# Create a Loop
Source: https://ara-90a60a07.mintlify.app/api-reference/loops/create-a-loop
/openapi.json post /v3/organizations/{orgId}/reasons/{reasonId}/loops
Files a new Loop under the Reason, which must be one of the caller's own live Reasons (404 `reason_not_found` otherwise). Give what wakes it in `wake_on`. A Loop woken by events opens a Session per event; webhook events sharing an `X-Webhook-Correlation-Key` continue one Session.
A Loop with a webhook returns `webhook.url` and `webhook.key` in this response only; store the key now, it is never readable again. The workspace's plan and credits must be able to run the Loop's model (402 `loop_model_not_fundable`). A workspace holds at most 2,000 live Loops across everyone in it; a new one past that is refused with 409 `loop_limit_reached` (existing Loops keep running).
Scope: `automations:write`
# Delete a Loop
Source: https://ara-90a60a07.mintlify.app/api-reference/loops/delete-a-loop
/openapi.json delete /v3/organizations/{orgId}/reasons/{reasonId}/loops/{loopId}
Deletes the Loop and everything that wakes it; its webhook's key stops working. Sessions it opened are kept. Who sees and changes a Loop follows its Reason: the people who can use the Reason see and change its Loops, except that a teammate's Loop on a team Reason stays that teammate's (the Reason's owner may see and stop it). Workspace owners and admins may pause and delete any Loop.What a Loop runs in (its Session or computer), its Slack channels and what wakes it stay with its creator, since each is checked against their access (403 `loop_creator_only_change`).
Scope: `automations:write`
# List a Reason's Loops
Source: https://ara-90a60a07.mintlify.app/api-reference/loops/list-a-reasons-loops
/openapi.json get /v3/organizations/{orgId}/reasons/{reasonId}/loops
A Loop is standing work a Reason does, woken by a schedule or an event (a webhook, a GitHub event or a Slack message). Each wake opens or continues a Session of the Reason. Lists the Loops filed under the Reason that the caller can see. Who sees and changes a Loop follows its Reason: the people who can use the Reason see and change its Loops, except that a teammate's Loop on a team Reason stays that teammate's (the Reason's owner may see and stop it). Workspace owners and admins may pause and delete any Loop.What a Loop runs in (its Session or computer), its Slack channels and what wakes it stay with its creator, since each is checked against their access (403 `loop_creator_only_change`).
Scope: `automations:read`
# Retrieve a Loop
Source: https://ara-90a60a07.mintlify.app/api-reference/loops/retrieve-a-loop
/openapi.json get /v3/organizations/{orgId}/reasons/{reasonId}/loops/{loopId}
Returns the Loop without running it. A webhook Loop shows its URL as `event_trigger.url`; its key is never returned after creation. Who sees and changes a Loop follows its Reason: the people who can use the Reason see and change its Loops, except that a teammate's Loop on a team Reason stays that teammate's (the Reason's owner may see and stop it). Workspace owners and admins may pause and delete any Loop.What a Loop runs in (its Session or computer), its Slack channels and what wakes it stay with its creator, since each is checked against their access (403 `loop_creator_only_change`).
Scope: `automations:read`
# Run a Loop now
Source: https://ara-90a60a07.mintlify.app/api-reference/loops/run-a-loop-now
/openapi.json post /v3/organizations/{orgId}/reasons/{reasonId}/loops/{loopId}/run
Starts one run now: the scheduler starts it within a minute, with the same Session, billing, deduplication and run record as a scheduled wake, then goes back to the Loop's next regular slot. Who sees and changes a Loop follows its Reason: the people who can use the Reason see and change its Loops, except that a teammate's Loop on a team Reason stays that teammate's (the Reason's owner may see and stop it). Workspace owners and admins may pause and delete any Loop.What a Loop runs in (its Session or computer), its Slack channels and what wakes it stay with its creator, since each is checked against their access (403 `loop_creator_only_change`).
Scope: `automations:write`
# Send an event to a Loop
Source: https://ara-90a60a07.mintlify.app/api-reference/loops/send-an-event-to-a-loop
/openapi.json post /webhooks/automations/{publicToken}
Delivers an event to the Loop whose webhook this is. A Loop with a webhook wakes on each accepted event: the event opens a Session of its Reason, or continues the Session of earlier events with the same correlation key. The webhook URL and its key come back once, from the `createReasonLoop` (or `updateReasonLoop`) call that adds the webhook.
Authenticate with one of: the key as `Authorization: Bearer `; an HMAC signature of the body keyed with the key, in `X-Signature-256` for a sender you write, or the headers GitHub (`X-Hub-Signature-256`), Standard Webhooks and Svix, Linear, Sentry and Shopify send once the key is pasted in as their webhook secret; or a signature by a secret the sender generated (Stripe's `Stripe-Signature`, a Standard Webhooks `whsec_` secret) stored as the Loop's `signing_secret_name`. Signatures that carry a timestamp are refused once it is over 5 minutes old.
A retry with the same event id is answered 202 with `duplicate: true` and is not queued again. A paused or deleted Loop refuses events (409 `automation_disabled`).
Auth: the Loop's webhook key (bearer, body signature, or URL segment) only; API keys are not accepted
# Send an event to a Loop (key in the URL)
Source: https://ara-90a60a07.mintlify.app/api-reference/loops/send-an-event-to-a-loop-key-in-the-url
/openapi.json post /webhooks/automations/{publicToken}/{key}
Delivers an event to the Loop whose webhook this is. A Loop with a webhook wakes on each accepted event: the event opens a Session of its Reason, or continues the Session of earlier events with the same correlation key. The webhook URL and its key come back once, from the `createReasonLoop` (or `updateReasonLoop`) call that adds the webhook.
This form carries the key as the URL's last path segment, for a sender that only takes a URL. Prefer the bearer header or a signature where the sender allows one: a URL is easier to leak.
A retry with the same event id is answered 202 with `duplicate: true` and is not queued again. A paused or deleted Loop refuses events (409 `automation_disabled`).
Auth: the Loop's webhook key (bearer, body signature, or URL segment) only; API keys are not accepted
# Update a Loop
Source: https://ara-90a60a07.mintlify.app/api-reference/loops/update-a-loop
/openapi.json patch /v3/organizations/{orgId}/reasons/{reasonId}/loops/{loopId}
Partial update. A paused Loop resumes from its next slot. `wake_on` replaces everything that wakes the Loop; `timezone` sent with it is only the zone its schedule is read in. When the Loop has one listener and `wake_on` is a single entry of that same kind (not GitHub), that listener changes in place and other fields may go with it. Any other replacement goes alone or with `name`, `prompt`, `notification_policy`, `until`, `max_runs`, `model` and `owner_user_id`; another field with it returns 400 `wake_on_with_other_changes`. A webhook it leaves out has its key revoked for good, and a new one later gets a new URL and key; a webhook it adds returns its URL and key once, as on create. Switching the Loop on, or onto another Session or model, checks the workspace can fund it (402 `loop_model_not_fundable`). Who sees and changes a Loop follows its Reason: the people who can use the Reason see and change its Loops, except that a teammate's Loop on a team Reason stays that teammate's (the Reason's owner may see and stop it). Workspace owners and admins may pause and delete any Loop.What a Loop runs in (its Session or computer), its Slack channels and what wakes it stay with its creator, since each is checked against their access (403 `loop_creator_only_change`).
Scope: `automations:write`
# Approve a worker for a Machine
Source: https://ara-90a60a07.mintlify.app/api-reference/machines/approve-a-worker-for-a-machine
/openapi.json post /v3/organizations/{orgId}/machines/{machine}/enrollment-tickets
Approves one headless worker installation for this Machine. Authenticate either as an owner or admin (API key or OAuth with devices:write) or with this Machine's token (`Authorization: Bearer rmt_...`), which needs no other scope. The body and one-use ticket are identical to createDeviceEnrollmentTicket (120-second ticket; redeem on the signed Device transport and never log it); redemption binds the worker to the Machine. Execution feature gates can return 503.
Scope: `devices:write`
# Approve a worker with a Machine token
Source: https://ara-90a60a07.mintlify.app/api-reference/machines/approve-a-worker-with-a-machine-token
/openapi.json post /v3/machines/enrollment-tickets
Approves one headless worker installation for the Machine that the token belongs to, in the token's Workspace. Authenticate only with the Machine token (`Authorization: Bearer rmt_...`); API keys and OAuth tokens are rejected. The body and one-use ticket are identical to createMachineEnrollmentTicket; the response also names the Workspace and Machine, so a worker needs no other configuration. Tickets are owned by the token creator and stop working if the creator is no longer an owner or admin. Execution feature gates can return 503.
Auth: Machine token (`rmt_...`) only; API keys and OAuth tokens are rejected
# Create a Machine
Source: https://ara-90a60a07.mintlify.app/api-reference/machines/create-a-machine
/openapi.json post /v3/organizations/{orgId}/machines
Creates a named Machine queue. Requires an owner or admin. Names are unique per Workspace, case-insensitively.
Scope: `devices:write`
# Create a Machine token
Source: https://ara-90a60a07.mintlify.app/api-reference/machines/create-a-machine-token
/openapi.json post /v3/organizations/{orgId}/machines/{machine}/tokens
Requires an owner or admin. The secret is returned once. Its only authority is minting headless enrollment tickets for this Machine, through POST /v3/machines/enrollment-tickets (no Workspace or Machine needed) or POST .../machines/{machine}/enrollment-tickets; it cannot call any other endpoint. Workers it adds run Sessions with the permissions of the operating-system user who runs them. Tickets it mints are owned by the token creator and stop working if the creator is no longer an owner or admin.
Scope: `devices:write`
# Delete a Machine
Source: https://ara-90a60a07.mintlify.app/api-reference/machines/delete-a-machine
/openapi.json delete /v3/organizations/{orgId}/machines/{machine}
Requires an owner or admin. Revokes every worker (cancelling their queued and claimed work) and every Machine token. Sessions still waiting in the queue stop with resource_unavailable.
Scope: `devices:write`
# List Machine tokens
Source: https://ara-90a60a07.mintlify.app/api-reference/machines/list-machine-tokens
/openapi.json get /v3/organizations/{orgId}/machines/{machine}/tokens
Requires an owner or admin. Secrets are never returned after creation.
Scope: `devices:read`
# List Machines
Source: https://ara-90a60a07.mintlify.app/api-reference/machines/list-machines
/openapi.json get /v3/organizations/{orgId}/machines
Lists up to 200 live Machines with worker availability and queued/running Session counts. Any Workspace member may read them.
Scope: `devices:read`
# Read a Machine
Source: https://ara-90a60a07.mintlify.app/api-reference/machines/read-a-machine
/openapi.json get /v3/organizations/{orgId}/machines/{machine}
Reads one Machine by id or name.
Scope: `devices:read`
# Revoke a Machine token
Source: https://ara-90a60a07.mintlify.app/api-reference/machines/revoke-a-machine-token
/openapi.json delete /v3/organizations/{orgId}/machines/{machine}/tokens/{tokenId}
Requires an owner or admin. Workers already enrolled with the token keep running; delete or revoke those Devices separately.
Scope: `devices:write`
# Create an MCP server
Source: https://ara-90a60a07.mintlify.app/api-reference/mcp-servers/create-an-mcp-server
/openapi.json post /v3/organizations/{orgId}/mcp-servers
Registers an org-level MCP server: a catalog entry (`source` "curated" with its `slug`), a remote custom server, or a local stdio server. Owners and admins may register any such server; members may install a curated marketplace entry for themselves (personal; Team is owner/admin). Secret values supplied in `secrets` are stored write-only and never returned.
An owner or admin who registers a remote custom server approves its URL, as Add connector by URL in the Reason app does, so Reason checks and calls it. It must use transport `http`, a public https `url` with no query string (Axiom's `org-id` excepted), credentials or `$` placeholders, no `command`, `args` or `env`, and either no `headers` or the one Authorization header its `auth_type` takes: `Bearer $MCP_API_KEY` or `Basic $MCP_API_KEY` for `bearer` (send the key as secret `MCP_API_KEY`), `Bearer $MCP_OAUTH_ACCESS_TOKEN` for `oauth`. With no headers Reason fills that one in. Any other remote server (`sse`, other headers, a private or non-https URL) is refused with 400 `curated_http_only`.
Scope: `mcp:write`
# Delete an MCP server
Source: https://ara-90a60a07.mintlify.app/api-reference/mcp-servers/delete-an-mcp-server
/openapi.json delete /v3/organizations/{orgId}/mcp-servers/{id}
Removes an org-level MCP server. Owners and admins may remove workspace servers; a member may remove a server they installed.
Scope: `mcp:write`
# Import a local MCP OAuth credential
Source: https://ara-90a60a07.mintlify.app/api-reference/mcp-servers/import-a-local-mcp-oauth-credential
/openapi.json post /v3/organizations/{orgId}/mcp-servers/{id}/oauth-import
Validates and imports a locally held OAuth credential for an existing MCP server. Temporary mode never stores or refreshes a refresh token. Transfer mode takes ownership of the supplied refresh-token chain. The access token is validated immediately; the refresh token is not exercised until the access token expires because testing it could rotate the local client's token chain. Token values are write-only and never returned.
Scope: `mcp:write`
# Inspect an MCP server URL
Source: https://ara-90a60a07.mintlify.app/api-reference/mcp-servers/inspect-an-mcp-server-url
/openapi.json post /v3/organizations/{orgId}/mcp-servers/endpoint/inspect
Probes a public https MCP server URL and reports the auth it takes (`none`, `bearer` or `oauth`), without installing it or registering an OAuth client. For `oauth` with `client_required` true, the authorization server has no dynamic client registration: register your own OAuth client with the provider for `redirect_uri`, add the server with createMcpServer (`auth_type` `oauth`), then pass that client as `oauth_client` to startPluginSignIn.
Scope: `mcp:write`
# List MCP servers
Source: https://ara-90a60a07.mintlify.app/api-reference/mcp-servers/list-mcp-servers
/openapi.json get /v3/organizations/{orgId}/mcp-servers
Returns the org-level MCP servers exposed to the agent. `secret_names` lists the names of the credentials stored on the server itself (for example `MCP_API_KEY`). They are set with the server's `secrets` field and belong to that server only: they are not workspace or personal secrets, so `listSecrets` does not list them and `deleteSecret` cannot remove them. Secret values are never returned.
Scope: `mcp:read`
# Retrieve an MCP server
Source: https://ara-90a60a07.mintlify.app/api-reference/mcp-servers/retrieve-an-mcp-server
/openapi.json get /v3/organizations/{orgId}/mcp-servers/{id}
Returns a single org-level MCP server. `secret_names` lists the names of the credentials stored on the server itself (for example `MCP_API_KEY`). They are set with the server's `secrets` field and belong to that server only: they are not workspace or personal secrets, so `listSecrets` does not list them and `deleteSecret` cannot remove them. Secret values are never returned.
Scope: `mcp:read`
# Update an MCP server
Source: https://ara-90a60a07.mintlify.app/api-reference/mcp-servers/update-an-mcp-server
/openapi.json patch /v3/organizations/{orgId}/mcp-servers/{id}
Partial update. Send only the fields you want to change. Owners and admins may change any field of a server they manage; a member may change only `enabled` and `secrets` on a server they installed. Secret values are stored write-only and never returned. An owner or admin who changes a custom server's `transport`, `url`, `headers`, `auth_type`, `command`, `args` or `env` approves the resulting remote URL, under the rules createMcpServer lists; sending the current `url` (with `headers` {} or the Authorization header its `auth_type` takes, if its stored headers are other ones) approves a remote custom server that was saved without approval. A change Reason cannot approve (or a new `transport` on a catalog server) is refused with 400 `curated_http_only`.
Scope: `mcp:write`
# Get a member
Source: https://ara-90a60a07.mintlify.app/api-reference/members/get-a-member
/openapi.json get /v3/organizations/{orgId}/members/users/{userId}
Returns user_id, email, workspace role, avatar_url and created_at for a member. Workspace roles differ from product tiers managed through /roles. Non-members return 404 member_not_found.
Scope: `org:read`
# Invite a member
Source: https://ara-90a60a07.mintlify.app/api-reference/members/invite-a-member
/openapi.json post /v3/organizations/{orgId}/members/users
Sends invitations to join the organization with the given role. Requires owner or admin. Every plan, Pro included, may invite, and there is no seat limit. Each person who joins a shared workspace needs their own seat (Pro is $50 a month) unless the workspace's plan covers every member (Team bought earlier, or Enterprise). This endpoint does not pay that seat: an owner or admin can pay it with a card saved in Billing (the app's Members page does so for every invite), or the person starts their own Pro seat, with a free 3-day trial if they are eligible (once per person and card).
Scope: `org:write`
# List members
Source: https://ara-90a60a07.mintlify.app/api-reference/members/list-members
/openapi.json get /v3/organizations/{orgId}/members/users
Returns the people in the organization.
Scope: `org:read`
# Remove a member
Source: https://ara-90a60a07.mintlify.app/api-reference/members/remove-a-member
/openapi.json delete /v3/organizations/{orgId}/members/users/{userId}
Removes workspace membership, not the user's account. Requires owner/admin authority; only owners can remove owners. Removing the last owner returns 409 last_owner. Returns ok: true or 404 member_not_found.
Scope: `org:write`
# Set a member's role
Source: https://ara-90a60a07.mintlify.app/api-reference/members/set-a-members-role
/openapi.json put /v3/organizations/{orgId}/members/users/{userId}/role
Changes workspace membership to owner, admin or member. Requires owner/admin authority; only owners can grant or modify owner membership. Demoting the last owner returns 409 last_owner. This does not change product tiers or API-key scopes.
Scope: `org:write`
# Delete a memory file
Source: https://ara-90a60a07.mintlify.app/api-reference/memory/delete-a-memory-file
/openapi.json delete /v3/organizations/{orgId}/memory/file
Deletes one note. The deletion is a revision like any other change, so the note can be restored from memory history in Settings. `MEMORY.md` cannot be deleted (400); rewrite it shorter instead. Team notes take deletes from any Workspace member but a viewer.
Scope: `memory:write`
# List memory files
Source: https://ara-90a60a07.mintlify.app/api-reference/memory/list-memory-files
/openapi.json get /v3/organizations/{orgId}/memory/files
Lists every file in one memory scope. Memory is what Reasons know across Sessions: each Session starts by reading `MEMORY.md` (the index) and the list of notes, and reads a note when its topic comes up.
- `scope=personal` is the memory of the person the API key or OAuth grant belongs to. Only they and their own Sessions see it.
- `scope=team` is the Workspace's team memory, which every member's Sessions read. Any member reads it; any member but a viewer writes it.
Viewers who are not members of the Workspace have no memory here.
Scope: `memory:read`
# List memory history
Source: https://ara-90a60a07.mintlify.app/api-reference/memory/list-memory-history
/openapi.json get /v3/organizations/{orgId}/memory/history
Returns scope-wide revision history with unified diffs, including text since deleted. Requires memory:read and workspace membership. Personal history is only the caller's and is unavailable in consolidated workspaces (409 workspace_memory_scope_required); team history is visible to every member, including author attribution. Source Session IDs are references, not permission to read those Sessions. next_cursor is null at the end. Read access does not grant restore access: restores require memory:write, and team restores need a Workspace member who is not a viewer.
Scope: `memory:read`
# Read a memory file
Source: https://ara-90a60a07.mintlify.app/api-reference/memory/read-a-memory-file
/openapi.json get /v3/organizations/{orgId}/memory/file
Returns one file's whole text and its `revision_id`. Send the `revision_id` back as `expected_revision_id` on `writeMemoryFile` to change the file only if nobody changed it since. Paths are matched in any case and with or without `.md`.
Scope: `memory:read`
# Restore a memory revision
Source: https://ara-90a60a07.mintlify.app/api-reference/memory/restore-a-memory-revision
/openapi.json post /v3/organizations/{orgId}/memory/restore
Requires memory:write. Restores one file using its exact history path and revision id through the existing memory service. Personal scope is caller-only and available only in legacy workspaces; team scope requires a Workspace member who is not a viewer, checked in the write transaction. A foreign scope, owner, path or missing revision returns 404 memory_revision_not_found. A deletion revision retains the deleted text and restores it. This is an unconditional restore, not an expected-revision write; unsupported body fields are rejected. History is preserved and the restore is itself a new revision. restored=false means the selected text is already current.
Scope: `memory:write`
# Search memory
Source: https://ara-90a60a07.mintlify.app/api-reference/memory/search-memory
/openapi.json get /v3/organizations/{orgId}/memory/search
Finds lines containing the query in every file of one scope, the way a Reason's memory search does: a plain, case-insensitive substring match, with `|` separating alternatives. It is not a regular expression and not semantic search. Matches come file by file: in personal scope `MEMORY.md` first, in team scope every file in path order.
Scope: `memory:read`
# Write a memory file
Source: https://ara-90a60a07.mintlify.app/api-reference/memory/write-a-memory-file
/openapi.json put /v3/organizations/{orgId}/memory/file
Creates a file or replaces its whole text. Reasons read the change from their next Session on: `MEMORY.md` is in every Session's starting context, so keep it short and put detail in topic notes, which a Session reads when it needs them.
Personal memory is available only in legacy workspaces; consolidated workspace resources require scope=team (409 workspace_memory_scope_required otherwise). Team memory takes direct writes from any Workspace member but a viewer (403 for a viewer). The change is stored as a revision under the caller's name with no source Session, so it shows in memory history and can be restored. Paths are normalized (lower case, `.md` added); empty text (for a note), text over the size limit (32 KiB a note, 12 KiB `MEMORY.md`), or text holding a secret or instructions aimed at a later Session is refused with 422, and a new note in a folder that already holds 200 answers 409. Personal memory that its owner turned off cannot change (409 `memory_disabled`).
Scope: `memory:write`
# Get queue status
Source: https://ara-90a60a07.mintlify.app/api-reference/metrics/get-queue-status
/openapi.json get /v3/organizations/{orgId}/queue
Returns the Sessions that are running or waiting to start: workspace and per-repository counts plus the running and queued Sessions. Internal housekeeping work (for example title generation) is never counted or listed. `repo` is an empty string for work with no repository, such as a Scratch Session.
Scope: `analytics:read`
# Get usage metrics
Source: https://ara-90a60a07.mintlify.app/api-reference/metrics/get-usage-metrics
/openapi.json get /v3/organizations/{orgId}/metrics/usage
Returns a usage time series, such as sandbox minutes and tokens per day.
Scope: `analytics:read`
# Replace workspace network policy
Source: https://ara-90a60a07.mintlify.app/api-reference/network-policy/replace-workspace-network-policy
/openapi.json put /v3/organizations/{orgId}/network-policy
Requires network:write. Each field is optional and a field left out keeps its value. network_allowed_hosts replaces the entire saved host list; [] clears it. network_restricted false allows every public host and port; true holds Sessions to the platform baseline and the saved hosts. Writes require a workspace owner or admin. Workspace hosts add allowed destinations to the platform baseline; an empty list does not remove baseline access. Changes apply at the next Hands start, not as immediate revocation of active leases.
Scope: `network:write`
# Retrieve workspace network policy
Source: https://ara-90a60a07.mintlify.app/api-reference/network-policy/retrieve-workspace-network-policy
/openapi.json get /v3/organizations/{orgId}/network-policy
Requires network:read. Returns the saved host list and whether the network is restricted to it. Workspace hosts add allowed destinations to the platform baseline; an empty list does not remove baseline access. Changes apply at the next Hands start, not as immediate revocation of active leases.
Scope: `network:read`
# Attach an existing CLI grant to a browser pairing
Source: https://ara-90a60a07.mintlify.app/api-reference/onboarding/attach-an-existing-cli-grant-to-a-browser-pairing
/openapi.json post /v3/organizations/{orgId}/onboarding/import/pairing/claim-existing
Claims the browser's pairing_code with the current CLI MCP OAuth grant, not a plain API key. Pairing must match user, workspace and OAuth client. Expired or unusable codes return 400 invalid_cli_pairing. Returns pairing_id and recovered; does not import secrets.
Scope: `org:write`
# Create a local onboarding import handoff
Source: https://ara-90a60a07.mintlify.app/api-reference/onboarding/create-a-local-onboarding-import-handoff
/openapi.json post /v3/organizations/{orgId}/onboarding/import/summary
Creates a short-lived browser handoff containing secret names and coarse source descriptions. Secret values and local paths are never accepted.
Scope: `org:write`
# Mark an approved local secret import complete
Source: https://ara-90a60a07.mintlify.app/api-reference/onboarding/mark-an-approved-local-secret-import-complete
/openapi.json post /v3/organizations/{orgId}/onboarding/import/complete
Records completion after an approved local import finishes. Supply imported_secret_count with handoff or pairing_id. Pairing requires the matching CLI OAuth client and a consumed pairing. This records completion, not secret values. Invalid or unapproved completion state returns 400.
Scope: `org:write`
# Poll the browser's local secret import decision
Source: https://ara-90a60a07.mintlify.app/api-reference/onboarding/poll-the-browsers-local-secret-import-decision
/openapi.json post /v3/organizations/{orgId}/onboarding/import/decision
Returns only the approved secret names. Values remain local to the CLI until approval.
Scope: `org:write`
# Report that a paired local scan could not finish
Source: https://ara-90a60a07.mintlify.app/api-reference/onboarding/report-that-a-paired-local-scan-could-not-finish
/openapi.json post /v3/organizations/{orgId}/onboarding/import/pairing/failure
Records failure_code for a CLI pairing belonging to the current user, workspace and MCP OAuth client. Plain API keys or invalid pairings return 400 invalid_cli_pairing. Records a failed scan, not a successful or partial secret import.
Scope: `org:write`
# Create a single-use benchmark workspace
Source: https://ara-90a60a07.mintlify.app/api-reference/organizations/create-a-single-use-benchmark-workspace
/openapi.json post /v3/organizations/{orgId}/ephemeral-workspaces
Creates an empty workspace for one trial, owned by the caller, with one scoped key. The parent pays for its usage: the workspace budget (credits) is held on the parent's wallet and settled for actual consumption after retirement; runs use the parent's connected provider accounts. It admits exactly one Session, created with mode ephemeral, and is retired at expiry or by the retire operation.
Scope: `org:write`
# Create an organization
Source: https://ara-90a60a07.mintlify.app/api-reference/organizations/create-an-organization
/openapi.json post /v3/organizations
Creates a workspace owned by the caller from a non-empty name. The server generates its slug; a supplied slug is not applied. Returns an organization envelope and invited count. Workspace-bound MCP OAuth grants receive 403 oauth_org_bound. Existing API keys remain bound to their original workspace.
Scope: `org:write`
# Delete an organization
Source: https://ara-90a60a07.mintlify.app/api-reference/organizations/delete-an-organization
/openapi.json delete /v3/organizations/{orgId}
Irreversibly deletes a workspace. Requires the owner role and a JSON body whose name matches the current workspace name. Personal workspaces cannot be deleted here. HTTP 409 means accounting retention, pending charges or busy settlement blocked deletion; resolve the reason instead of blindly retrying.
Scope: `org:write`
# List organizations
Source: https://ara-90a60a07.mintlify.app/api-reference/organizations/list-organizations
/openapi.json get /v3/organizations
Returns the organizations the current principal can access.
Scope: `org:read`
# Retire a single-use benchmark workspace
Source: https://ara-90a60a07.mintlify.app/api-reference/organizations/retire-a-single-use-benchmark-workspace
/openapi.json post /v3/organizations/{orgId}/ephemeral-workspaces/{workspaceId}/retire
Cancels live work, revokes devices and deletes the workspace key. The workspace and its transcripts are kept for analysis until purged. Returns organization_id, parent_organization_id, reference, expires_at, retired_at and the saved outcome (nullable), containing reason, cancelled_runs and revoked_devices counts, and errors. Idempotent: an already-retired workspace returns its saved result.
Scope: `org:write`
# Retrieve an organization
Source: https://ara-90a60a07.mintlify.app/api-reference/organizations/retrieve-an-organization
/openapi.json get /v3/organizations/{orgId}
Returns the accessible workspace inside an organization envelope, including the caller's membership_role. Workspace-bound credentials cannot access other workspaces.
Scope: `org:read`
# Update an organization
Source: https://ara-90a60a07.mintlify.app/api-reference/organizations/update-an-organization
/openapi.json patch /v3/organizations/{orgId}
Renames the workspace and derives its slug from the new name. Requires the owner or admin role and a non-empty name; a supplied slug is ignored. Returns the renamed organization.
Scope: `org:write`
# Create a page
Source: https://ara-90a60a07.mintlify.app/api-reference/pages/create-a-page
/openapi.json post /v3/organizations/{orgId}/pages
Makes a page from `html` and `title`, checked as the agent's app_show checks one: a live page's handlers must be able to run, and the page may name no local file (inline images as data: URIs or use https URLs). It lives in the conversation of `reason_id` (your main Reason when neither reason_id nor session_id is given), so it shows in that Reason's Library, or in Session `session_id`, which you may read. You own it: only you share, rename or delete it. To change it later, call updatePage with its id rather than making another page. The hero picture is taken now (`preview_capture` "scheduled") on your running turn's machine, or else on the cloud computer the page's Session is bound to when that computer is yours alone (woken for it), usually within a minute; otherwise ("not_running") the Library renders the page live. Requires pages:write and a member who may write.
Scope: `pages:write`
# Delete a page
Source: https://ara-90a60a07.mintlify.app/api-reference/pages/delete-a-page
/openapi.json delete /v3/organizations/{orgId}/pages/{pageId}
Deletes a page you own: it leaves its Session, the Library and every pin, and its share link and view URLs stop opening. Only the page's owner deletes it. Requires pages:write.
Scope: `pages:write`
# List pages
Source: https://ara-90a60a07.mintlify.app/api-reference/pages/list-pages
/openapi.json get /v3/organizations/{orgId}/pages
Lists the pages you may see, newest first, with each one's title, revision, Session, share state and hero preview. With `reason_id`, the Reason's Library (what its Sessions made, for everyone who has it); with `session_id`, that Session's pages; with neither, every page you may see in the workspace. Cursor-paginated: pass `next_cursor` as `cursor`. Requires pages:read. An Experiments feature (pages_api): elsewhere it returns 403 `pages_api_unavailable`.
Scope: `pages:read`
# Retrieve a page
Source: https://ara-90a60a07.mintlify.app/api-reference/pages/retrieve-a-page
/openapi.json get /v3/organizations/{orgId}/pages/{pageId}
Returns one page you may see: title, revision, its Session, its permanent link (`url`), a short-lived `view_url` that serves the page itself to you, its hero `preview` and its `share` state. `include=source` adds the page's HTML as written (local images inlined), to edit and send back with updatePage. Requires pages:read.
Scope: `pages:read`
# Share a page
Source: https://ara-90a60a07.mintlify.app/api-reference/pages/share-a-page
/openapi.json put /v3/organizations/{orgId}/pages/{pageId}/share
Sets who opens the page's share link and returns it: `link` (anyone with it), `workspace` (signed-in members) or `private` (closes it to everyone but you). The link is made the first time and never changes, so one sent earlier opens again when sharing widens back. Session viewers keep seeing the page in its Session either way. Only the page's owner shares it. Requires pages:write.
Scope: `pages:write`
# Update a page
Source: https://ara-90a60a07.mintlify.app/api-reference/pages/update-a-page
/openapi.json patch /v3/organizations/{orgId}/pages/{pageId}
Replaces a page's HTML and/or renames it as a new revision under the same id: its link, share link and Library row stay, so one page stays one page. Works on any page you may see, from any Session, as the agent's app_show with page_id does; send the whole new page (getPage with include=source gives back the current one). Checked as createPage checks a page. Requires pages:write and a member who may write.
Scope: `pages:write`
# Cancel a plugin sign-in
Source: https://ara-90a60a07.mintlify.app/api-reference/plugins/cancel-a-plugin-sign-in
/openapi.json delete /v3/organizations/{orgId}/plugins/sign-in/{signInId}
Cancels a pending sign-in: its one-time OAuth state is deleted, so a browser that finishes consent afterwards saves no grant and is sent to `return_url` with `status=cancelled`. Idempotent: a finished, expired or already-cancelled sign-in is returned unchanged, and a sign-in whose callback is already saving the grant can no longer be cancelled. Never removes an existing connection or account.
Scope: `mcp:write`
# Get a plugin
Source: https://ara-90a60a07.mintlify.app/api-reference/plugins/get-a-plugin
/openapi.json get /v3/organizations/{orgId}/plugins/{slug}
Returns one plugin from listPlugins by slug, with its bundled skills and every installation the caller sees.
Scope: `mcp:read`
# Get a plugin sign-in
Source: https://ara-90a60a07.mintlify.app/api-reference/plugins/get-a-plugin-sign-in
/openapi.json get /v3/organizations/{orgId}/plugins/sign-in/{signInId}
Reads a sign-in started with startPluginSignIn or installPlugin. Poll until `status` is not `pending`: `succeeded` names the `connection_id` and the signed-in account; `failed` has `error_code`; `cancelled`; or `expired` 15 minutes after it started. Readable by the member who started it and by owners and admins.
Scope: `mcp:read`
# Get per-Reason plugin settings
Source: https://ara-90a60a07.mintlify.app/api-reference/plugins/get-per-reason-plugin-settings
/openapi.json get /v3/organizations/{orgId}/plugins/{slug}/reasons/{reasonId}
Returns the connection mode, member allowance, and exclusion state for one plugin+Reason combination, plus whether the caller may change each setting.
Scope: `mcp:read`
# Install a plugin
Source: https://ara-90a60a07.mintlify.app/api-reference/plugins/install-a-plugin
/openapi.json post /v3/organizations/{orgId}/plugins/{slug}/install
Installs a catalog plugin in `scope` (`personal` for the caller's own account, `organization` for one shared connection; default the plugin's `scope`), or as a Reason's own connection with `reason_id`. Owners and admins install any catalog plugin; members install catalog plugins for themselves or the workspace, under the same rules as createMcpServer. Custom servers are added with createMcpServer.
Bundled skills are installed as workspace skills in the same scope unless `install_skills` is false; `skill_slugs` picks a subset. Credentials go in `secrets` (names from `secret_names`), stored write-only.
An OAuth or native plugin answers with `oauth_needed`; with `start_sign_in` it also starts the browser sign-in and returns it (the provider's `authorize_url`, `sign_in_id`, `expires_at`). Installing what is already installed in that scope is not an error: it returns `already_installed` and still installs the requested skills and starts a requested sign-in.
Scope: `mcp:write`
# List plugin Reason allowances
Source: https://ara-90a60a07.mintlify.app/api-reference/plugins/list-plugin-reason-allowances
/openapi.json get /v3/organizations/{orgId}/plugins/reason-allowances
Lists the calling member's personal connection allowances: which team Reasons may use their own plugin connections, and for which plugins.
Scope: `mcp:read`
# List plugins
Source: https://ara-90a60a07.mintlify.app/api-reference/plugins/list-plugins
/openapi.json get /v3/organizations/{orgId}/plugins
Lists the plugin catalog: Reason's curated and imported marketplace connectors, the workspace's custom MCP servers and native app connectors. Each plugin has its auth method, supported scopes, bundled skills (with where each is installed) and every installation the caller sees in `accounts`, with its signed-in account and cached health. Never includes credentials or another member's personal installations.
Scope: `mcp:read`
# Start a plugin sign-in
Source: https://ara-90a60a07.mintlify.app/api-reference/plugins/start-a-plugin-sign-in
/openapi.json post /v3/organizations/{orgId}/plugins/{slug}/sign-in/start
Starts the browser sign-in for an installed OAuth MCP plugin (catalog or custom HTTP server) or a native app connector and returns the provider's consent `authorize_url` with a `sign_in_id`. Open the URL in the person's browser, then poll getPluginSignIn. The path takes the plugin slug, or an installation's `mcp_server_id`; with several installations, `mcp_server_id`, `scope` or `reason_id` picks one (default: the caller's personal installation, else the workspace's).
For an approved custom HTTP MCP server whose authorization server has no dynamic client registration, pass your own `oauth_client`, registered for the `redirect_uri` that inspectMcpServerEndpoint (or a 422 `oauth_configuration_required` here) returns. When sign-in ends, the browser goes to `return_url` (if given) with only `sign_in_id`, `status`, `connection_id` and `error` added. A retried start with the same `idempotency_key` returns the same sign-in. A new sign-in replaces the installation's account only when it succeeds.
Scope: `mcp:write`
# Uninstall a plugin
Source: https://ara-90a60a07.mintlify.app/api-reference/plugins/uninstall-a-plugin
/openapi.json delete /v3/organizations/{orgId}/plugins/{slug}
Removes one installation of a plugin: `mcp_server_id` (or `connection_id` for a native connector) names it, or `scope` picks the caller's personal one or the workspace's (`reason_id` with `scope=reason` a Reason's). With exactly one manageable installation neither is needed; with several it answers 409 listing them. Removing an MCP installation revokes its OAuth grant at the provider where supported and records connection.removed. Its bundled skills installed in the same scope are removed too unless `keep_skills=true`, or another installation of the plugin still uses them (an installation in the same scope, or the workspace's shared skills for a legacy personal or Reason installation). Requires managing the installation (installation-policy: owners and admins, or the member who installed a personal one).
Scope: `mcp:write`
# Update per-Reason plugin settings
Source: https://ara-90a60a07.mintlify.app/api-reference/plugins/update-per-reason-plugin-settings
/openapi.json patch /v3/organizations/{orgId}/plugins/{slug}/reasons/{reasonId}
Partially updates the per-Reason settings for one plugin. Each field is optional and applies its own permission check: `reason_mode` requires managing the Reason's connection; `allowance` is always the caller's own; `excluded` requires Reason-owner or workspace-owner/admin access. An empty body is rejected with 400.
Scope: `mcp:write`
# Close an owned private preview
Source: https://ara-90a60a07.mintlify.app/api-reference/previews/close-an-owned-private-preview
/openapi.json post /v3/organizations/{orgId}/execution-contexts/{contextId}/previews/{previewId}/close
Requests preview closure. A closing state remains until owned transport cleanup is confirmed; closing a preview does not imply its source command was terminated. Requires jobs:execute and devices:use.
Scope: `jobs:execute`
# List private previews in an owned context
Source: https://ara-90a60a07.mintlify.app/api-reference/previews/list-private-previews-in-an-owned-context
/openapi.json get /v3/organizations/{orgId}/execution-contexts/{contextId}/previews
Lists private preview metadata for this exact context and caller. Does not mint viewer URLs or restart a preview. Requires jobs:read and devices:use. after/first paginate.
Scope: `jobs:read`
# Open an owned ready private preview
Source: https://ara-90a60a07.mintlify.app/api-reference/previews/open-an-owned-ready-private-preview
/openapi.json post /v3/organizations/{orgId}/execution-contexts/{contextId}/previews/{previewId}/access
Returns a short-lived private viewer URL only for a ready preview under current context, worker and grant authority. preview_not_ready is retryable by observing state, not creating another preview. Requires jobs:execute and devices:use.
Scope: `jobs:execute`
# Read private preview state
Source: https://ara-90a60a07.mintlify.app/api-reference/previews/read-private-preview-state
/openapi.json get /v3/organizations/{orgId}/execution-contexts/{contextId}/previews/{previewId}
Reads the owned preview lifecycle without minting access or changing its target. A ready state is subject to current worker, listener and grant checks when opened. Requires jobs:read and devices:use.
Scope: `jobs:read`
# Start an owned private HTTP and WebSocket preview
Source: https://ara-90a60a07.mintlify.app/api-reference/previews/start-an-owned-private-http-and-websocket-preview
/openapi.json post /v3/organizations/{orgId}/execution-contexts/{contextId}/previews
Starts a private preview of a listener owned by an exact job in this execution context. Returns opening until the worker and relay are paired. Requires jobs:execute and devices:use; no Session is created. Reuse the idempotency key for retries.
Scope: `jobs:execute`
# Archive a project
Source: https://ara-90a60a07.mintlify.app/api-reference/projects/archive-a-project
/openapi.json post /v3/organizations/{orgId}/projects/{projectId}/archive
**Deprecated:** a project is a Reason with the same id; use `archiveReason` instead.
Requires run. Archives the caller's named Reason. Repeating the operation is safe. Preserves its sessions; does not change session archive state.
Scope: `run`
# Create project
Source: https://ara-90a60a07.mintlify.app/api-reference/projects/create-project
/openapi.json post /v3/organizations/{orgId}/projects
**Deprecated:** a project is a Reason with the same id; use `createReason` instead.
Creates a named Reason in the authenticated workspace and returns it as a project. `name` (cut to 80 characters), `description` (the Reason's instructions) and `visibility: private` apply; the other fields are accepted and ignored. Supply a stable slug for find-or-create clients: a project you can see with the same slug returns 409; list projects to recover it. Past the workspace's limit of 500 live named Reasons it returns 409 `reason_limit_reached`.
Scope: `run`
# List projects
Source: https://ara-90a60a07.mintlify.app/api-reference/projects/list-projects
/openapi.json get /v3/organizations/{orgId}/projects
**Deprecated:** a project is a Reason with the same id; use `listReasons` instead.
Lists the named Reasons the caller can see in this workspace, as projects. By default excludes archived ones; archived=only selects the caller's archived Reasons and archived=include returns both. Requires sessions:read. Pass an item's id as project_id when creating a session.
Scope: `sessions:read`
# Restore a project
Source: https://ara-90a60a07.mintlify.app/api-reference/projects/restore-a-project
/openapi.json post /v3/organizations/{orgId}/projects/{projectId}/unarchive
**Deprecated:** a project is a Reason with the same id; use `createReason` instead.
Requires run. A live project answers ok. An archived one answers 409 `project_unarchive_unavailable`: archived Reasons are not restored; create a new project instead.
Scope: `run`
# Retrieve a project
Source: https://ara-90a60a07.mintlify.app/api-reference/projects/retrieve-a-project
/openapi.json get /v3/organizations/{orgId}/projects/{projectId}
**Deprecated:** a project is a Reason with the same id; use `getReason` instead.
Returns a named Reason the caller can see, as a project, including the caller's archived ones. Requires sessions:read. One the caller cannot see returns 404.
Scope: `sessions:read`
# Update a project
Source: https://ara-90a60a07.mintlify.app/api-reference/projects/update-a-project
/openapi.json patch /v3/organizations/{orgId}/projects/{projectId}
**Deprecated:** a project is a Reason with the same id; use `updateReason` instead.
Updates a named Reason the caller owns: `name` (cut to 80 characters), `description` (its instructions; null clears them) and `visibility`. The other fields are accepted and ignored: they no longer affect sessions. Requires run.
Scope: `run`
# Answer provider sign-in prompt
Source: https://ara-90a60a07.mintlify.app/api-reference/provider-credentials/answer-provider-sign-in-prompt
/openapi.json post /v3/organizations/{orgId}/provider-credentials/oauth/logins/{loginId}/respond
Submit only the current prompt_id. Responses are write-only. Requires a workspace-bound user OAuth grant with org:write and workspace membership; a member signs in again only to an account they connected. API keys and browser sessions are not accepted. Login challenges are private to the initiating user. Sessions are persisted for recovery across API instances and restarts until expires_at. An uncertain token exchange is not replayed: an explicit restart-required failure means start a fresh login, retaining account_key. After expiry or a 404, start a new login. Provider device codes may expire sooner. Never share login URLs or codes.
Scope: `org:write`
# Cancel provider sign-in
Source: https://ara-90a60a07.mintlify.app/api-reference/provider-credentials/cancel-provider-sign-in
/openapi.json delete /v3/organizations/{orgId}/provider-credentials/oauth/logins/{loginId}
Idempotent for retained terminal logins. Cancelling never disconnects an existing account. Requires a workspace-bound user OAuth grant with org:write and workspace membership; a member signs in again only to an account they connected. API keys and browser sessions are not accepted. Login challenges are private to the initiating user. Sessions are persisted for recovery across API instances and restarts until expires_at. An uncertain token exchange is not replayed: an explicit restart-required failure means start a fresh login, retaining account_key. After expiry or a 404, start a new login. Provider device codes may expire sooner. Never share login URLs or codes.
Scope: `org:write`
# Check a saved provider account
Source: https://ara-90a60a07.mintlify.app/api-reference/provider-credentials/check-a-saved-provider-account
/openapi.json post /v3/organizations/{orgId}/provider-credentials/{providerId}/accounts/{accountKey}/check
Requires org:write. Members may check accounts they connected; owners and admins any account. Accepts ordinary API keys as well as user OAuth grants. Checks the exact saved account using provider metadata only, without paid inference calls. Reports saved connection presence, authentication evidence, and capacity separately. Accepted metadata authentication or available capacity does not establish model access or inference success. Missing accounts return connected=false; unavailable storage returns connected=null. Does not persist a health verdict.
Scope: `org:write`
# Configure a provider credential
Source: https://ara-90a60a07.mintlify.app/api-reference/provider-credentials/configure-a-provider-credential
/openapi.json put /v3/organizations/{orgId}/provider-credentials/{providerId}
Stores or updates an API key credential for a model provider (BYOK). Any workspace member may add a key or replace one they connected; replacing a key someone else connected requires owner or admin. Keys are encrypted, write-only, and never returned.
Scope: `org:write`
# Connect an Anthropic subscription
Source: https://ara-90a60a07.mintlify.app/api-reference/provider-credentials/connect-an-anthropic-subscription
/openapi.json post /v3/organizations/{orgId}/provider-credentials/anthropic
Stores a Claude subscription sign-in obtained locally by Reason CLI: an Anthropic OAuth credential (`access_token`, `refresh_token`, `expires_at`), or the long-lived token Claude Code's `claude setup-token` prints (`setup_token`), which has no refresh token, is never refreshed, and asks to reconnect when it expires or Anthropic refuses it. Requires a workspace-bound Reason user OAuth grant and workspace membership; signing in again to an existing `account_key` requires owner or admin membership unless the caller connected that account. Token values are write-only and never returned.
Scope: `org:write`
# Delete a provider credential
Source: https://ara-90a60a07.mintlify.app/api-reference/provider-credentials/delete-a-provider-credential
/openapi.json delete /v3/organizations/{orgId}/provider-credentials/{providerId}
Disconnects and forgets a stored provider credential. A member may remove only accounts they connected; owners and admins may remove any.
Scope: `org:write`
# Discover pending provider sign-ins
Source: https://ara-90a60a07.mintlify.app/api-reference/provider-credentials/discover-pending-provider-sign-ins
/openapi.json get /v3/organizations/{orgId}/provider-credentials/oauth/logins
Lists only this user's unexpired, authorized pending public sign-ins. Metadata only: no challenges, codes, prompts, credentials or terminal results. Fetch a selected login for its current next_action. Requires a workspace member's user OAuth with org:write, even though this is a GET. Discovery never renews original authority.
Scope: `org:write`
# List available providers
Source: https://ara-90a60a07.mintlify.app/api-reference/provider-credentials/list-available-providers
/openapi.json get /v3/organizations/{orgId}/provider-credentials/catalog
Discover provider identifiers, API-key configuration fields, and available public sign-in methods. Registry OAuth support does not imply public login availability; use oauth_login.available and its advertised methods.
Scope: `org:read`
# List provider credentials
Source: https://ara-90a60a07.mintlify.app/api-reference/provider-credentials/list-provider-credentials
/openapi.json get /v3/organizations/{orgId}/provider-credentials
Lists configured provider credentials and connection statuses for the organization. Secret keys and tokens are write-only and never returned.
Scope: `org:read`
# Read provider sign-in
Source: https://ara-90a60a07.mintlify.app/api-reference/provider-credentials/read-provider-sign-in
/openapi.json get /v3/organizations/{orgId}/provider-credentials/oauth/logins/{loginId}
Requires a workspace-bound user OAuth grant with org:write and workspace membership; a member signs in again only to an account they connected. API keys and browser sessions are not accepted. Login challenges are private to the initiating user. Sessions are persisted for recovery across API instances and restarts until expires_at. An uncertain token exchange is not replayed: an explicit restart-required failure means start a fresh login, retaining account_key. After expiry or a 404, start a new login. Provider device codes may expire sooner. Never share login URLs or codes.
Scope: `org:write`
# Read saved provider account usage
Source: https://ara-90a60a07.mintlify.app/api-reference/provider-credentials/read-saved-provider-account-usage
/openapi.json get /v3/organizations/{orgId}/provider-credentials/{providerId}/accounts/{accountKey}/usage
Requires org:read. Reads provider-reported metadata for the exact saved account, without inference. Unavailable or exhausted usage does not establish credential validity or model access. Secret values and raw provider payloads are never returned.
Scope: `org:read`
# Rename a provider account
Source: https://ara-90a60a07.mintlify.app/api-reference/provider-credentials/rename-a-provider-account
/openapi.json patch /v3/organizations/{orgId}/provider-credentials/{providerId}/accounts/{accountKey}
Requires org:write. Sets the name shown for one saved account (listProviderCredentials' `account_display_name`), trimmed and cut to 80 characters; null or an empty string clears it. A member may rename only accounts they connected; owners and admins may rename any. The credential itself is unchanged.
Scope: `org:write`
# Start or recover provider sign-in
Source: https://ara-90a60a07.mintlify.app/api-reference/provider-credentials/start-or-recover-provider-sign-in
/openapi.json post /v3/organizations/{orgId}/provider-credentials/{providerId}/oauth/login-requests
Persist idempotency_key before sending and retry this exact endpoint and intent after response loss. Never fall back to the legacy unkeyed start, including on 404 from an older replica. Same-user recovery works across authorized OAuth clients but never transfers original grant authority. Receipt metadata survives login cleanup until workspace membership erasure. Retained results return current state; purged results return 410. Conflicting intent returns 409 without cancelling work. New intent requires a new UUID. Requires org:write user OAuth from a workspace member. Replay never extends expiry or repeats a provider exchange.
Scope: `org:write`
# Start provider sign-in
Source: https://ara-90a60a07.mintlify.app/api-reference/provider-credentials/start-provider-sign-in
/openapi.json post /v3/organizations/{orgId}/provider-credentials/{providerId}/oauth/logins
Starts the provider's interactive flow. Follow next_action and poll until terminal. Codex and Radius default to device-code authentication; other interactive flows may require pasting a callback URL from the user's browser. Copilot supports github.com accounts only; answer its Enterprise-domain prompt with an empty string. Starting again cancels only this user's previous login. Requires a workspace-bound user OAuth grant with org:write and workspace membership; a member signs in again only to an account they connected. API keys and browser sessions are not accepted. Login challenges are private to the initiating user. Sessions are persisted for recovery across API instances and restarts until expires_at. An uncertain token exchange is not replayed: an explicit restart-required failure means start a fresh login, retaining account_key. After expiry or a 404, start a new login. Provider device codes may expire sooner. Never share login URLs or codes.
Scope: `org:write`
# Validate a provider API key
Source: https://ara-90a60a07.mintlify.app/api-reference/provider-credentials/validate-a-provider-api-key
/openapi.json post /v3/organizations/{orgId}/provider-credentials/{providerId}/validate
Tests an API key directly against the provider without saving it. Any workspace member may test a key.
Scope: `org:write`
# Archive a Reason
Source: https://ara-90a60a07.mintlify.app/api-reference/reasons/archive-a-reason
/openapi.json post /v3/organizations/{orgId}/reasons/{reasonId}/archive
Deletes a named Reason, as deleteReason does: it leaves the list, its Loops are deleted, its own Slack app is removed, and its conversation is archived, not deleted, and keeps its history.
Scope: `run`
# Create a cloud computer for a Reason
Source: https://ara-90a60a07.mintlify.app/api-reference/reasons/create-a-cloud-computer-for-a-reason
/openapi.json post /v3/organizations/{orgId}/reasons/{reasonId}/computers
Makes a new cloud computer under the Reason for the caller. Nothing boots or bills until a Session runs on it: pass its `id` as `computer_id` when creating the Session. Idempotent by `request_id`.
Scope: `computers:write`
# Create a Reason
Source: https://ara-90a60a07.mintlify.app/api-reference/reasons/create-a-reason
/openapi.json post /v3/organizations/{orgId}/reasons
Creates a named Reason for the caller, private to them until they share it (`visibility` on updateReason). Creating one allocates no machine and starts no work: send it a message (sendReasonMessage) to start.
Scope: `run`
# Delete a Reason
Source: https://ara-90a60a07.mintlify.app/api-reference/reasons/delete-a-reason
/openapi.json delete /v3/organizations/{orgId}/reasons/{reasonId}
Deletes one of the caller's named Reasons, as Delete in the Reason app does: it leaves every Reason list, its Loops are deleted so nothing scheduled or triggered runs for it, its own Slack app is removed, and its conversation is archived with its history. The Sessions it started stay where they are. Nothing restores it. Only its owner deletes it, and the main Reason is never deleted (409 `main_reason_kept`). archiveReason is the same operation under its older name.
Scope: `run`
# Delete a Reason's cloud computer
Source: https://ara-90a60a07.mintlify.app/api-reference/reasons/delete-a-reasons-cloud-computer
/openapi.json delete /v3/organizations/{orgId}/reasons/{reasonId}/computers/{computerId}
Deletes one of the caller's cloud computers of the Reason once no open, unarchived Session is on it. Archive or cancel those Sessions first.
Scope: `computers:write`
# Get a Reason
Source: https://ara-90a60a07.mintlify.app/api-reference/reasons/get-a-reason
/openapi.json get /v3/organizations/{orgId}/reasons/{reasonId}
Returns one Reason the caller can see: their own, or another member's Reason shared with the workspace or with them. Any other id, an archived Reason included, returns 404 `reason_not_found`.
Scope: `sessions:read`
# List a Reason's messages
Source: https://ara-90a60a07.mintlify.app/api-reference/reasons/list-a-reasons-messages
/openapi.json get /v3/organizations/{orgId}/reasons/{reasonId}/messages
Returns the Reason's conversation in order, as listSessionConversation returns its conversation Session's: the opening prompt, each message sent to it, and one reply for every finished turn, failed or cancelled turns included, with `kind` telling them apart. The page is empty, with `session_id` null, until the conversation is opened by its first message. Cursor-paginated: pass `end_cursor` as `after`, and keep polling with it to receive the Reason's next reply. Readable by the Reason's owner and the people it is shared with.
Scope: `sessions:read`
# List Reasons
Source: https://ara-90a60a07.mintlify.app/api-reference/reasons/list-reasons
/openapi.json get /v3/organizations/{orgId}/reasons
A Reason is the long-running agent a person keeps: their main Reason, plus named ones for areas of work. Each Reason has its own conversation, its own Loops (scheduled and triggered work) and the Sessions it starts, which are filed under it. Messaging a Reason (sendReasonMessage) is the primary way to give it work.
Lists the caller's own Reasons first (main, then named ones oldest first), then other members' Reasons shared with the workspace or with the caller. Another member's Reason is listed without its conversation `session_id` and instructions.
Scope: `sessions:read`
# Message a Reason
Source: https://ara-90a60a07.mintlify.app/api-reference/reasons/message-a-reason
/openapi.json post /v3/organizations/{orgId}/reasons/{reasonId}/messages
Messaging a Reason is the primary way to give it work. The message goes into the Reason's long-running conversation, which this call opens the first time (as openReasonConversation does); the Reason then decides how to do the work: it answers, starts Sessions, or sets up Loops. Sessions it starts are filed under it.
The message is delivered exactly as sendSessionMessage delivers a follow-up to the conversation Session: the same body, admission, usage and safeguards. A message sent while the Reason is working steers its running turn (or waits for the next one with `delivery` queue). The call returns once the message is accepted, not when the Reason answers: poll listReasonMessages with the last `end_cursor` for its reply, or follow the Session (`session_id`) with getSession and listSessionEvents. Send a `client_message_id` to make retries safe: resending with it returns the accepted message instead of adding another. Anyone the Reason is shared with may message it; each turn acts as the person who sent it.
Scope: `run`
# Open a Reason's conversation
Source: https://ara-90a60a07.mintlify.app/api-reference/reasons/open-a-reasons-conversation
/openapi.json post /v3/organizations/{orgId}/reasons/{reasonId}/conversation
Finds or creates the Reason's long-running conversation Session. Creating it runs the ordinary Session admission (plan, credits and write checks) and starts no task until a message is sent. sendReasonMessage does this itself, so a client that only gives the Reason work does not need it.
Scope: `run`
# Update a Reason
Source: https://ara-90a60a07.mintlify.app/api-reference/reasons/update-a-reason
/openapi.json patch /v3/organizations/{orgId}/reasons/{reasonId}
Changes how a Reason works from now on: its name, avatar and plain-text instructions; the model, reasoning effort and repositories new Sessions under it start with when their create names none; whether everyone in the workspace has it (`visibility`); and whether people outside the team may talk to it (`audience`). Sessions already running are unchanged. Fields left out keep their value.
The Reason's owner and the people it is shared with as managers (a role set in the Reason app) make these changes; anyone else it is shared with gets 403 `reason_manager_required`, and an id the caller cannot see returns 404. The main Reason can be renamed like any other but stays personal (409 `main_reason_personal` or `main_reason`).
Scope: `run`
# Bulk enable repositories
Source: https://ara-90a60a07.mintlify.app/api-reference/repositories/bulk-enable-repositories
/openapi.json put /v3/organizations/{orgId}/repositories/bulk-index
Enables many repositories reachable through the workspace's source-control connection. When cloud agents are enabled, default-agent provisioning is best effort: provisioning failures are logged but not reported in results. Nothing is indexed; the operation name and successful `indexed` status are historical. Each entry may be an `owner/name` string or an `{ owner, repo }` object. Returns one result per repository with status indexed or error for enablement failures.
Scope: `repos:write`
# Bulk remove repositories
Source: https://ara-90a60a07.mintlify.app/api-reference/repositories/bulk-remove-repositories
/openapi.json delete /v3/organizations/{orgId}/repositories/bulk-remove
Disconnects many repositories at once. Each entry may be an `owner/name` string or an `{ owner, repo }` object. Returns a per-repository result so partial failures are visible.
Scope: `repos:write`
# Delete a repository branch (retired)
Source: https://ara-90a60a07.mintlify.app/api-reference/repositories/delete-a-repository-branch-retired
/openapi.json delete /v3/organizations/{orgId}/repositories/{owner}/{repo}/branches/{branch}
Retired compatibility endpoint. Always returns 410 repository_wiki_retired.
Scope: `repos:write`
# Disconnect a repository
Source: https://ara-90a60a07.mintlify.app/api-reference/repositories/disconnect-a-repository
/openapi.json delete /v3/organizations/{orgId}/repositories/{owner}/{repo}
Removes the repository's enablement for this workspace; it does not delete the remote repository or revoke GitHub App access. The repository remains visible in listRepositories. Returns ok: true even if it was not enabled.
Scope: `repos:write`
# Enable a repository
Source: https://ara-90a60a07.mintlify.app/api-reference/repositories/enable-a-repository
/openapi.json put /v3/organizations/{orgId}/repositories/{owner}/{repo}/index
Enables a repository reachable through the workspace's source-control connection. When cloud agents are enabled, default-agent and trigger provisioning is best effort; a provisioning failure does not fail this call. Returns the enabled repository with status 201. The operation name is historical: the repository wiki is retired, so nothing is indexed.
Scope: `repos:write`
# Export repository wiki (retired)
Source: https://ara-90a60a07.mintlify.app/api-reference/repositories/export-repository-wiki-retired
/openapi.json get /v3/organizations/{orgId}/repositories/{owner}/{repo}/wiki/export
Retired compatibility endpoint. Always returns 410 repository_wiki_retired.
Scope: `repos:read`
# Get a branch's head commit
Source: https://ara-90a60a07.mintlify.app/api-reference/repositories/get-a-branchs-head-commit
/openapi.json get /v3/organizations/{orgId}/repositories/{owner}/{repo}/branch-head
Returns the commit SHA at the tip of a branch of a connected repository. Omit `branch` to read the default branch. Use it to confirm that a merge or push landed: the merge is on the branch once this SHA is the merge commit or a descendant of it. A connected repository is any repository the workspace's GitHub App installation reaches, whether or not Reason indexes it. The answer is read from GitHub and repeated for up to 5 seconds, so a poll sees a new tip within 5 seconds. Reads that reach GitHub are limited per workspace; past the limit the response is `429` with `Retry-After`.
Scope: `repos:read`
# Get indexing status (retired)
Source: https://ara-90a60a07.mintlify.app/api-reference/repositories/get-indexing-status-retired
/openapi.json get /v3/organizations/{orgId}/repositories/{owner}/{repo}/indexing-status
Retired compatibility endpoint. Always returns 410 repository_wiki_retired.
Scope: `repos:read`
# Get repository guardrails
Source: https://ara-90a60a07.mintlify.app/api-reference/repositories/get-repository-guardrails
/openapi.json get /v3/organizations/{orgId}/repositories/{owner}/{repo}/guardrails
Returns the automation guardrails configured for a repository.
Scope: `guardrails:read`
# Get repository wiki (retired)
Source: https://ara-90a60a07.mintlify.app/api-reference/repositories/get-repository-wiki-retired
/openapi.json get /v3/organizations/{orgId}/repositories/{owner}/{repo}/wiki
Retired compatibility endpoint. Always returns 410 repository_wiki_retired.
Scope: `repos:read`
# List indexed repositories (retired)
Source: https://ara-90a60a07.mintlify.app/api-reference/repositories/list-indexed-repositories-retired
/openapi.json get /v3/organizations/{orgId}/indexed-repositories
Retired compatibility endpoint. Always returns 410 repository_wiki_retired.
Scope: `repos:read`
# List repositories
Source: https://ara-90a60a07.mintlify.app/api-reference/repositories/list-repositories
/openapi.json get /v3/organizations/{orgId}/repositories
Returns every repository reachable through the organization's live GitHub App grant. Reason automation enablement does not limit this access list.
Scope: `repos:read`
# Update repository guardrails
Source: https://ara-90a60a07.mintlify.app/api-reference/repositories/update-repository-guardrails
/openapi.json put /v3/organizations/{orgId}/repositories/{owner}/{repo}/guardrails
Partial update. Send only the guardrail fields you want to change.
Scope: `guardrails:write`
# Get a role assignment (retired)
Source: https://ara-90a60a07.mintlify.app/api-reference/roles/get-a-role-assignment-retired
/openapi.json get /v3/organizations/{orgId}/roles/{userId}
Retired. Platform-wide role administration is not available.
Scope: `org:read`
# Get the caller's roles
Source: https://ara-90a60a07.mintlify.app/api-reference/roles/get-the-callers-roles
/openapi.json get /v3/organizations/{orgId}/roles/me
Returns the caller's two unrelated roles. `membership_role` is their role in this organization (`owner`, `admin`, `member` or `viewer`) and is what decides what they may do here. `app_role` is their account's app-wide product tier (`pro` or `regular`); it is not a permission level, so an organization owner normally reads `regular`.
Scope: `org:read`
# List role assignments (retired)
Source: https://ara-90a60a07.mintlify.app/api-reference/roles/list-role-assignments-retired
/openapi.json get /v3/organizations/{orgId}/roles
Retired. Platform-wide role administration is not available.
Scope: `org:read`
# Set a role assignment (retired)
Source: https://ara-90a60a07.mintlify.app/api-reference/roles/set-a-role-assignment-retired
/openapi.json put /v3/organizations/{orgId}/roles
Retired. Platform-wide role administration is not available.
Scope: `org:write`
# Create or update a secret
Source: https://ara-90a60a07.mintlify.app/api-reference/secrets/create-or-update-a-secret
/openapi.json post /v3/organizations/{orgId}/secrets
Upserts a secret by name. Without `scope`, consolidated workspace-resource mode stores a shared `organization` secret; otherwise it stores a personal `user` secret. Organization scope always requires owner/admin authority, including when selected by default. Explicit `user` writes in consolidated mode return 409 workspace_resource_scope_required rather than being promoted to shared secrets. Legacy repo scope aliases organization scope: repo/provider fields do not isolate secrets to repositories, and the response `scope` is the scope the secret was stored in. `result` says whether the name was `created` or an existing value was `updated`. Omitting `note` keeps the stored note; an empty string clears it. A refused name returns `invalid_secret_name` with a `reason` (`format`, `reserved`, `too_long`) and a `message`. Empty, whitespace-only and NUL-containing values are refused. `warning` is present for a name Sessions never receive because Reason reserves it for its own access or runtime (`GH_TOKEN`, `GITHUB_TOKEN`, `GITLAB_TOKEN`, `GH_ENTERPRISE_TOKEN`, `GITHUB_ENTERPRISE_TOKEN`, `BUN_*`); the secret is stored but not delivered. Values are encrypted and never returned. Shared changes reach live sessions. Missing encryption returns 503 secret_store_unavailable.
Scope: `secrets:write`
# Create or update workspace secrets in a batch
Source: https://ara-90a60a07.mintlify.app/api-reference/secrets/create-or-update-workspace-secrets-in-a-batch
/openapi.json post /v3/organizations/{orgId}/secrets/bulk
Stores a confirmed batch of workspace secrets encrypted, all or none. `created` and `updated` list which names were new and which replaced a stored value. Omitting a variable's `note` keeps its stored note. Refused names are listed in `invalid_names`, with a `reason` and `message` each in `invalid`. Values are never returned.
Scope: `secrets:write`
# Delete a secret
Source: https://ara-90a60a07.mintlify.app/api-reference/secrets/delete-a-secret
/openapi.json delete /v3/organizations/{orgId}/secrets/{secretId}
Deletes a secret by name (secret_id from list). Query scope always defaults to user and addresses only the caller's own personal secrets, even in consolidated workspace-resource mode. Pass the scope returned by list or create explicitly to delete that secret. Organization and legacy repo scope address shared secrets and require owner/admin authority; an omitted scope never falls back to shared secrets. A name not stored in the requested scope returns 404 secret_not_found and deletes nothing. Values are never returned. Shared deletions are forwarded to live sessions.
Scope: `secrets:write`
# List secret names
Source: https://ara-90a60a07.mintlify.app/api-reference/secrets/list-secret-names
/openapi.json get /v3/organizations/{orgId}/secrets
Lists secret names and metadata of one scope. Values are never returned. Without `scope`, consolidated workspace-resource mode lists the workspace's shared secrets (`organization`); otherwise it lists the caller's own personal secrets (`user`). Explicit `user` reads only the caller's personal secrets, including legacy secrets in consolidated mode. One call never lists both. To delete a listed secret, pass its returned `scope` explicitly: DELETE keeps its personal default for compatibility.
Scope: `secrets:read`
# Answer a question
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/answer-a-question
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/answer
Answers a `question` request the way the web app's question card does: the same admission as sendSessionMessage with `question_operation_id`, so the first answer wins, a question addressed to one member (`for_user_id`) is theirs alone, and a question shown in a Reason's conversation is answered in the Session that asked it. Give one answer per question, in order: `selected` option labels, your own `text`, or both. Retrying with the same `client_message_id` returns the request without answering twice. Returns the request as getSessionInputRequest reads it after the answer (it may still read `pending` for a moment while the turn takes it).
Scope: `run`
# Append session tags
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/append-session-tags
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/tags
Adds tags to the session (set-union, deduped).
Scope: `run`
# Approve a network or permission request
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/approve-a-network-or-permission-request
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/approve
Allows a `network_hosts` request (adds exactly its hosts to the workspace's network rules) or applies a `permission_rules` request (exactly its rule change), as the web app's card does: owners and admins only, the answer is recorded on the request, and the Session that asked continues. An API key or OAuth grant also needs the scope the same change needs on its own: network:write for `network_hosts`, org:write for `permission_rules`. Approving is not offered as an MCP tool. The change is the one the request's signed receipt names, read on the server; nothing in the call chooses another. Calling it again on a request that already ended this way returns the request; a request that ended another way is refused with 409 `input_request_not_pending`. Returns the request as getSessionInputRequest reads it afterwards.
Scope: `run`
# Archive a session
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/archive-a-session
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/archive
Requires run. Preserves the session and its history. Repeating the operation is safe.
Scope: `run`
# Cancel a session
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/cancel-a-session
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/cancel
Requests cancellation of a running session. The optional body selects the cancel `mode`: `graceful` (default, also used when the body is absent) stops the agent and tries to preserve the workspace with a final snapshot; `hard` stops immediately and relies on the last verified checkpoint. Sending `hard` while a graceful cancel is in progress upgrades it. Either way an explicitly cancelled Session ends `suspended`, never `error`. Returns whether the request newly flagged (or upgraded) the cancellation. Cancellation is asynchronous: `requested: true` means the stop is under way, and `status` is the Session's status after this request, so it is `suspended` when the Session had not started and still `running` while a running Session stops. Poll the Session until its status leaves `running`.
Scope: `run`
# Cancel a session check-in
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/cancel-a-session-check-in
/openapi.json delete /v3/organizations/{orgId}/sessions/{sessionId}/follow-ups/{followupId}
Stops one pending check-in or PR subscription on the caller's own Session. Returns `id`, `cancelled` and `pending` (always false). Safe to retry: cancelled=false means it was already inactive. Does not cancel a turn already delivered. Unknown or other-Session ids return 404.
Scope: `run`
# Compact a session's context
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/compact-a-sessions-context
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/compact
Requires run. Summarizes the conversation so far to free context for the turns after it. The response's `outcome` says whether it was queued, applied, or not needed.
Scope: `run`
# Create a session
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/create-a-session
/openapi.json post /v3/organizations/{orgId}/sessions
Opens a new Session from a prompt. Optional `reason_id` files it under an accessible Reason (use GET /reasons to discover IDs); `project_id` is the compatible older spelling of the same id. For a cloud Session under an explicitly named Reason, omitting `repo` uses its first default repository unless `default_repositories` is false or the request names a branch, ref or pull request. Provide `repo` to select the checkout explicitly, or send `default_repositories: false` and omit `repo` for a repository-neutral start. A Reason does not supply network hosts or an execution target; select the latter with `target`. If the running Brain later discovers an exact connected repository, Reason attaches it and continues the original task under this Session ID instead of creating another user task. The session starts immediately and runs asynchronously: poll `GET /sessions/{id}` for status and `GET /sessions/{id}/events` for incremental live output.
Scope: `run`
# Decline a network or permission request
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/decline-a-network-or-permission-request
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/deny
Declines a `network_hosts` or `permission_rules` request, as the web app's card does: owners and admins only, the answer is recorded on the request, and the Session that asked continues. The change is the one the request's signed receipt names, read on the server; nothing in the call chooses another. Calling it again on a request that already ended this way returns the request; a request that ended another way is refused with 409 `input_request_not_pending`. Returns the request as getSessionInputRequest reads it afterwards.
Scope: `run`
# Decline a secret request
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/decline-a-secret-request
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/cancel
Declines a `secret` request as the web app's card's Not now does: only the member it was issued to (`for_user_id`), no value is stored, and the Session's waiting turn continues told the request was declined. When someone has written in the Session since the request, the request reads `moved_past` and is refused with 409 `input_request_not_pending`; when the value is already stored, nothing is declined and the call is refused with 409 `input_request_not_waiting`. Calling it again on a declined request returns it; a request that ended another way is refused with 409 `input_request_not_pending`. Returns the request as getSessionInputRequest reads it afterwards.
Scope: `run`
# Delete a session
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/delete-a-session
/openapi.json delete /v3/organizations/{orgId}/sessions/{sessionId}
Permanently deletes the session. Set `?archive=true` to preserve it (archive) instead. A session that runs on a teammate's personal computer is deleted only by that teammate (403 `personal_machine_owner_required`); archiving it still works.
Scope: `run`
# Download an attachment
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/download-an-attachment
/openapi.json get /v3/organizations/{orgId}/sessions/{sessionId}/attachments/{attachmentId}
Redirects (307) to the attachment's download URL. `attachmentId` is an id from listSessionAttachments (a file the Session produced) or from the `attachments` of a listSessionConversation or listSessionMessages item (a file sent with the opening prompt or a message). A sent file's id is only unique within its message (att-1, att-2 and so on unless the sender named it); when several sent files share it the call answers 409 `attachment_ambiguous`, and the file's own `url` on its item is the way to download it. A signed storage link is issued fresh by every call and works until its `X-Amz-Date` plus `X-Amz-Expires` (one hour for a file the Session produced, seven days for a file sent to it); call this endpoint again whenever a link has expired. Fetch the link with a plain GET and no Authorization header.
Scope: `sessions:read`
# Edit a message and rewind
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/edit-a-message-and-rewind
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/rewind
Requires run. Replaces the named message with `content` and starts a new turn from it. A follow-up is named by its message_id or client_message_id; an opening prompt only by the client_message_id it was created with, since listSessionMessages does not list it. 404 rewind_message_not_found when the Session has no such message.
Scope: `run`
# Export session trajectory
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/export-session-trajectory
/openapi.json get /v3/organizations/{orgId}/sessions/{sessionId}/trajectory
Export the session trajectory in the Agent Trajectory Interchange Format (ATIF v1.7, RFC 0001): steps, user messages, agent reasoning, tool calls and their results, and token and cost metrics. Reason tool calls made inside codemode appear as tool calls linked to their parent call by extra.parent_tool_call_id. A standard session masks the run's secret values, known credential shapes and any unbroken run of 40 or more letters, digits, - or _, which includes hashes. An ephemeral session masks only the run's secret values, as [redacted-secret], and credentials Reason issues. A tool call's arguments and output are exported whole; extra.fidelity counts the redaction markers and the tool events exported from a 4,000-character preview. agent.version is the Reason release that ran the latest turn. Each subagent Session the session started is embedded in subagent_trajectories, and final_metrics totals include them; final_metrics.extra.session_totals holds the session's own.
Scope: `sessions:read`
# Fork a session
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/fork-a-session
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/fork
Requires run. Creates a new Session from this one's conversation up to its latest reply. The source Session is unchanged. 404 sidechat_source_not_found or sidechat_fork_point_not_found when there is nothing to fork from (no reply yet). Repeating a request with the same client_session_id returns the first fork.
Scope: `run`
# Generate session insights
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/generate-session-insights
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/insights/generate
Returns the session's stored insight (200), or builds one from the session's record, stores it and returns it (201). No model call is made.
Scope: `run`
# Get an input request
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/get-an-input-request
/openapi.json get /v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}
One question or request card shown in the Session, whatever its `status`, so a client can tell whether it is still pending, how it ended, and confirm an earlier action. A question is addressed by its 64-character hex operation id; a request card by its id (a copy shown in a Reason's conversation by its source request's id).
Scope: `sessions:read`
# Get session insights
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/get-session-insights
/openapi.json get /v3/organizations/{orgId}/sessions/{sessionId}/insights
Returns the generated insight for a session: a summary, category, outcome, and headline metrics. If no insight has been generated yet, `status` is `not_generated`, `summary` is empty and `generated_at` is null; the other fields are still read from the Session.
Scope: `sessions:read`
# List a session's pending input requests
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/list-a-sessions-pending-input-requests
/openapi.json get /v3/organizations/{orgId}/sessions/{sessionId}/input-requests
The requests the Session is waiting on a person for: questions the agent asked and request cards (secret, network_hosts, permission_rules and connection requests), including a copy of another Session's request shown in this Session (a Reason's conversation), which carries `origin`. Only pending requests are listed; read one in any state with getSessionInputRequest. `actions` says what this caller can do through the API; every other request is completed in the web app at `app_url`.
Scope: `sessions:read`
# List attachments
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/list-attachments
/openapi.json get /v3/organizations/{orgId}/sessions/{sessionId}/attachments
Artifacts produced by the session: diffs, logs, screenshots, and build outputs. By default the list also carries the Session's bookkeeping rows (for example one `prompt_stamp` per turn), which have no file and a null `url`; pass `view=files` for only the files a person can open. A file's `url` is either a permanent media link or a signed storage link that stops working at `url_expires_at` (one hour after this response). Nothing is lost when it expires: call this endpoint again, or `GET .../attachments/{attachmentId}`, for a fresh link at any time.
Scope: `sessions:read`
# List live session events
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/list-live-session-events
/openapi.json get /v3/organizations/{orgId}/sessions/{sessionId}/events
Poll incremental agent activity. Paging: pass the previous `next_seq` as `after_seq` to receive only newer events, until `items` is empty. Add `wait_ms` to have a poll that finds nothing new wait for the next event of a running session instead of returning at once. Order: `seq` is the delivery cursor, not the order things happened in. A streamed event (a reply, reasoning, a tool's live output) keeps its `id` and reappears with a higher `seq` each time its snapshot grows, so by `seq` it can be listed after events that happened later, and a poller can receive the same `id` in more than one page. To read the transcript, keep the copy of each `id` with the highest `seq` and sort by `position`: the `seq` the event first appeared at, which never changes and is unique in the Session. Numbers: `seq` and `position` are the Attempt's number times 4294967296 (2^32) plus a counter inside that Attempt. They jump by about 4.29 billion whenever a follow-up, a retry or a machine change starts a new Attempt, and they have gaps where an event is hidden from this projection or a streamed event moved on from an earlier snapshot; compare them, never count with them. Content: `view=conversation` returns only assistant, reasoning, tool_use, tool_result, compaction_started and compaction_finished events, for any caller, and leaves the cursor unchanged. In the debug projection a streamed event's `data.stream_position_seq` is its `position` and `data.stream_revision` is the counter part of its current `seq`. There, a `result` event's `data.run_status` is the internal lifecycle status of the execution Attempt that produced it (`succeeded` means it ran to completion, which the session reports as status `exit`); it is not the task verdict, which is the session's `outcome`. Without `view`, `sessions:read` returns status events with null text/data, compaction_started and compaction_finished events (a context compaction: `data.compaction_id` pairs them, `trigger`, and on finished `status`, `tokens_before`, `tokens_after`, `threshold_tokens`, `duration_ms`; a compaction recorded before these events existed may show only its finished event), plus assistant, reasoning, tool_use and tool_result events with their text and a fixed set of data fields (tool, tool_use_id, input, content, is_error, is_partial, duration_ms, stream_key, item_id, and on a question card's events question_operation_id and question_status). An organization owner/admin may add `sessions:debug` for the full diagnostic projection: diagnostic event kinds, status text and raw event metadata.
Scope: `sessions:read` or `sessions:debug`
# List messages
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/list-messages
/openapi.json get /v3/organizations/{orgId}/sessions/{sessionId}/messages
Returns the messages sent to the Session after it was created: follow-ups and mid-turn steers, each followed by a `system` note saying how it was delivered. It does not contain the opening prompt or the agent's replies, so it is empty for a Session that received no follow-up. For the conversation in order (the opening prompt, the follow-ups and each turn's reply) use listSessionConversation (`GET .../conversation`). The latest answer is also `result` on the Session (getSession), and every reply is an `assistant` event (listSessionEvents). Cursor-paginated: pass the previous response's `end_cursor` as `after` (legacy spelling: `after_seq` / `next_seq`).
Scope: `sessions:read`
# List pending input requests
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/list-pending-input-requests
/openapi.json get /v3/organizations/{orgId}/input-requests
Pending questions and request cards in the Sessions the caller can read, newest first, one item per request id: a request card shown both in the Session that asked and in a Reason's conversation is one item, the conversation's copy (with `origin`). Bounded: it reads the caller's 200 most recently created unarchived Sessions; read an older Session's requests with listSessionInputRequests.
Scope: `sessions:read`
# List session tags
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/list-session-tags
/openapi.json get /v3/organizations/{orgId}/sessions/{sessionId}/tags
Returns current tags for an accessible session, or an empty array. POST appends; PUT and PATCH replace the whole list. Reading tags does not modify the session.
Scope: `sessions:read`
# List sessions
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/list-sessions
/openapi.json get /v3/organizations/{orgId}/sessions
Returns Sessions newest first, cursor-paginated. By default, status=active hides archived Sessions; status accepts active, archived, or all. origin accepts ui, external, external:cli|mcp|api, or comma-separated values. Follow-up execution Attempts update their Session and never appear as additional list items. A list item reports the same `status` and `outcome` as Retrieve a session; its `result` is the text summary, and Retrieve a session returns a structured result. Responses carry a weak `ETag`; send it as `If-None-Match` to receive `304 Not Modified` while the page is unchanged. A 304 may repeat usage counters (`usage`, `context`, `cost_usd`, `duration_ms`) and `model` up to 10 seconds old; a page narrowed by `fields` to none of those may be up to 5 minutes old.
Scope: `sessions:read`
# List sessions with insights
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/list-sessions-with-insights
/openapi.json get /v3/organizations/{orgId}/sessions/insights
Pages sessions like `GET /sessions` and attaches each session's stored insight (or a `not_generated` placeholder). Nothing is generated by this call.
Scope: `sessions:read`
# List shared links
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/list-shared-links
/openapi.json get /v3/organizations/{orgId}/sessions/{sessionId}/shared-links
The session's shared links, newest first. URLs are never returned.
Scope: `sessions:read`
# List the conversation
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/list-the-conversation
/openapi.json get /v3/organizations/{orgId}/sessions/{sessionId}/conversation
Returns the Session's conversation in order: the opening prompt, each message in it afterwards, and one reply for every finished turn. `kind` tells them apart. A reply's content is the turn's final answer, read as getSession reads `reply` (its full capture when one exists; `truncated` is true when only an excerpt survives), falling back to the turn's `result_summary` when it left no answer (empty when it left neither), with the turn's `status` and `outcome` beside it, so a failed or cancelled turn is listed and marked as such; a structured result the agent declared is `result` on getSession, and a turn's intermediate text and tool activity are events (listSessionEvents). A reply is listed once every turn before it has finished. Delivery notes are not included. Cursor-paginated: pass `end_cursor` as `after`, and keep polling with it to receive what is said next. An item's `cursor` belongs to this list only and is not a message `seq`.
Scope: `sessions:read`
# Move a session to a project
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/move-a-session-to-a-project
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/project
Requires run. The Session lists under that Project, and its later turns follow the Project's instructions.
Scope: `run`
# Provide a secret request's value
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/provide-a-secret-requests-value
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/input-requests/{requestId}/secret
Answers a pending `secret` request with its value, as the request's card in the web app does, and continues the Session waiting on it. Only the member the request was issued to (`for_user_id`) may provide it. Requires `secrets:write`.
Where the value is stored follows the request: with `secret_request.broker_hosts`, as a workspace secret used only with those hosts; otherwise, when `secret_request.reason_id` is set, on that Reason, for everyone who uses it (its owner and managers save it), or, on a team Reason (`secret_request.reason_team`), kept private to you with `keep_private: true` (only your own messages to the Reason use it); otherwise as a workspace secret. A workspace secret needs a workspace owner or admin. The value is trimmed, must start with `secret_request.value_prefix` when one is set, and is never returned, logged or shown in the Session.
The Session continues once every secret its turn asked for is stored; until then the request stays `pending`. Retrying is safe: a retry's `value` and `keep_private` are checked like a first call's, but while a value that answers the request is already stored (a `replace` request counts only one stored after it was asked), nothing is written again and the sent value is not used; once the request is `completed` with its value stored, the request is returned unchanged. A `moved_past` request (someone wrote in the Session since it) still takes its value and continues the Session. A request settled any other way returns 409 `input_request_not_pending`.
Scope: `secrets:write`
# Read session follow-through
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/read-session-follow-through
/openapi.json get /v3/organizations/{orgId}/sessions/{sessionId}/follow-ups
Reads the Session's bounded follow-through state: `waiting`, `pending_check_ins` (up to 100), `pr_subscription` (its status, items and latest attempts) and `latest_wake`. Callback URLs and secrets are never returned. An armed check-in is not proof of delivery; a merged PR is not proof of deployment.
Scope: `sessions:read`
# Rename a session
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/rename-a-session
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/rename
Requires run. Sets the Session's title for everyone in the Workspace. An empty or null title restores the generated one.
Scope: `run`
# Replace session tags
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/replace-session-tags
/openapi.json put /v3/organizations/{orgId}/sessions/{sessionId}/tags
Replaces the entire tag list for an accessible session. Send tags: [] to clear it; use POST to append. Workspace tag policy and the write gate apply. Returns normalized stored tags with ok: true.
Scope: `run`
# Replace session tags
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/replace-session-tags-1
/openapi.json patch /v3/organizations/{orgId}/sessions/{sessionId}/tags
Compatibility alias for PUT: replaces the entire tag list, not a partial edit. Send tags: [] to clear it; use POST to append. Workspace tag policy and the write gate apply. Returns normalized stored tags with ok: true.
Scope: `run`
# Restore a session
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/restore-a-session
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/unarchive
Requires run. Restores the session without deleting history. Repeating the operation is safe. Does not restore its parent project; restore the project separately if it is archived.
Scope: `run`
# Retrieve a session
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/retrieve-a-session
/openapi.json get /v3/organizations/{orgId}/sessions/{sessionId}
Returns the stable Session identity with current execution state, a bounded redacted error_message, and best-effort failure_diagnostics. Unknown diagnostic fields are null. A previously returned physical Attempt UUID remains accepted as a compatibility alias, but the response always carries the Session `session_id` and URL. The opening prompt is repeated on every read, in `prompt` (up to 16 KiB; `prompt_truncated` and `prompt_bytes` say when it was cut) and, for a Session without a title of its own, as the first 200 characters of `title`. To poll cheaply, pass `fields` (for example `fields=status,outcome,result`) and read the complete Session once. A response narrowed by `fields` carries only `session_id` and the named properties, so it omits properties the Session schema marks required.
Scope: `sessions:read`
# Retry a session's last turn
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/retry-a-sessions-last-turn
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/retry
Requires run. Starts the last turn again in the same Session and workspace. A Session that is still running is refused with 409 not_terminal.
Scope: `run`
# Revoke a shared link
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/revoke-a-shared-link
/openapi.json delete /v3/organizations/{orgId}/sessions/{sessionId}/shared-links/{linkId}
Stops the agent from opening the link. Revoking an already opened link only records the revocation.
Scope: `run`
# Schedule a session check-in
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/schedule-a-session-check-in
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/follow-ups
Owner-only, with run scope and current write-capable membership. Requires devices:use for a Device-backed Session. One-shot schedules only; this endpoint does not create event watches or callback credentials. A pending PR subscription usually removes the need for polling GitHub; a deployment check-in remains separate.
Scope: `run`
# Send a message
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/send-a-message
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/messages
Adds a follow-up instruction to a running or finished Session, including an owned subagent Session. Child continuations retain their original execution permissions. Device execution requires devices:use in addition to run, including continuations and pending Device handoffs.
Scope: `run`
# Send a queued message now
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/send-a-queued-message-now
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/messages/{messageId}/steer
Requires run. The message id is the one sendSessionMessage returned for a message sent with delivery queue.
Scope: `run`
# Share a link with the agent
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/share-a-link-with-the-agent
/openapi.json post /v3/organizations/{orgId}/sessions/{sessionId}/shared-links
Registers an https URL with the session. The agent sees only the returned `reference` and can open it once in the session's cloud browser by passing the reference to browser_use `open_tab`; the URL itself is stored encrypted and never returned. Mention the reference in a message to ask the agent to open it.
Scope: `run`
# Start a new session's machine ahead of its create
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/start-a-new-sessions-machine-ahead-of-its-create
/openapi.json post /v3/organizations/{orgId}/sessions/prestart
Reserve a Session id (a fresh UUID v4) and start its cloud machine while the prompt is still being written; pass the same id as `client_session_id` to create within 75 s and the session starts on the warm machine. Advisory and only for enabled workspaces: 204 means nothing was started, and create works the same either way. An unused machine is removed after 90 s.
Scope: `run`
# Withdraw a queued message
Source: https://ara-90a60a07.mintlify.app/api-reference/sessions/withdraw-a-queued-message
/openapi.json delete /v3/organizations/{orgId}/sessions/{sessionId}/messages/{messageId}/queued
Requires run. A message that already left the queue is left as it is.
Scope: `run`
# Get a settings namespace
Source: https://ara-90a60a07.mintlify.app/api-reference/settings/get-a-settings-namespace
/openapi.json get /v3/organizations/{orgId}/settings/{namespace}
Returns the value object for a single settings namespace, or null if unset.
Scope: `org:read`
# List organization settings
Source: https://ara-90a60a07.mintlify.app/api-reference/settings/list-organization-settings
/openapi.json get /v3/organizations/{orgId}/settings
Returns every namespaced setting as a map of namespace to its value object.
Scope: `org:read`
# Update a settings namespace
Source: https://ara-90a60a07.mintlify.app/api-reference/settings/update-a-settings-namespace
/openapi.json put /v3/organizations/{orgId}/settings/{namespace}
Replaces the value object for a single settings namespace. Only validated namespaces are writable; an unknown namespace returns a 400.
Scope: `org:write`
# Create a skill
Source: https://ara-90a60a07.mintlify.app/api-reference/skills/create-a-skill
/openapi.json post /v3/organizations/{orgId}/skills
Creates an authored workspace skill from non-empty name and instructions. description explains when to select it; activation_keywords are search aliases, not automatic triggers. Returns skill_id and provenance without running work. Oversized instructions return 413; disabled cloud-agent configuration returns 503.
Scope: `skills:write`
# Delete a skill
Source: https://ara-90a60a07.mintlify.app/api-reference/skills/delete-a-skill
/openapi.json delete /v3/organizations/{orgId}/skills/{skillId}
Deletes an authored skill or one installed from skills.sh. Integration and built-in skills are read-only.
Scope: `skills:write`
# List skills
Source: https://ara-90a60a07.mintlify.app/api-reference/skills/list-skills
/openapi.json get /v3/organizations/{orgId}/skills
Returns all Workspace skill records, including authored skills and skills installed from packages or integrations.
Scope: `skills:read`
# Retrieve a skill
Source: https://ara-90a60a07.mintlify.app/api-reference/skills/retrieve-a-skill
/openapi.json get /v3/organizations/{orgId}/skills/{skillId}
Retrieves any Workspace skill record, whether authored or installed from a package or integration.
Scope: `skills:read`
# Update a skill
Source: https://ara-90a60a07.mintlify.app/api-reference/skills/update-a-skill
/openapi.json put /v3/organizations/{orgId}/skills/{skillId}
Partially updates an authored skill. Installed package and integration skills are read-only. Send only the fields you want to change. Optionally send expected_revision_id from getSkill or listSkills: the atomic write returns 409 skill_revision_conflict if stored state changed, without overwriting it. Read again, merge your edits and retry with the new token. Omit the field for legacy unconditional updates. A token grants no additional access or editability.
Scope: `skills:write`
# Describe one connected MCP tool
Source: https://ara-90a60a07.mintlify.app/api-reference/tools/describe-one-connected-mcp-tool
/openapi.json get /v3/organizations/{orgId}/connections/{connectionId}/tools/{toolName}
Requires tools:read. Returns the current input/output schema, schema digest and provider classification.
Scope: `tools:read`
# Invoke a connected MCP tool without a Session
Source: https://ara-90a60a07.mintlify.app/api-reference/tools/invoke-a-connected-mcp-tool-without-a-session
/openapi.json post /v3/organizations/{orgId}/tool-invocations
Requires tools:execute. Returns a durable receipt immediately. Retry the same idempotency key and identical input to observe the same invocation; use a new key for an intentional repetition. A completed provider error is replayable. Ambiguous means the provider may have acted and is never automatically repeated. No model or Session is started.
Scope: `tools:execute`
# List a connected account's MCP tools
Source: https://ara-90a60a07.mintlify.app/api-reference/tools/list-a-connected-accounts-mcp-tools
/openapi.json get /v3/organizations/{orgId}/connections/{connectionId}/tools
Requires tools:read. Negotiates the approved connection with the caller's own account boundary; returns schemas and provider annotations. An annotation does not grant execution authority.
Scope: `tools:read`
# Read an invocation receipt
Source: https://ara-90a60a07.mintlify.app/api-reference/tools/read-an-invocation-receipt
/openapi.json get /v3/organizations/{orgId}/tool-invocations/{id}
Requires tools:read and the same workspace, user and API key or OAuth grant that created the receipt. Reads never restart work.
Scope: `tools:read`
# Request cancellation of an invocation
Source: https://ara-90a60a07.mintlify.app/api-reference/tools/request-cancellation-of-an-invocation
/openapi.json post /v3/organizations/{orgId}/tool-invocations/{id}/cancel
Requires tools:execute and the receipt's owning credential. Accepted work is cancelled before dispatch. Running work records cancellation intent; its outcome may remain ambiguous. Cancellation never proves an external effect was reversed.
Scope: `tools:execute`
# Transcribe a recording
Source: https://ara-90a60a07.mintlify.app/api-reference/transcription/transcribe-a-recording
/openapi.json post /v3/organizations/{orgId}/transcribe
Requires run. Turns a short voice recording into text, as the app's dictation does. Send the audio itself as the request body with its type in Content-Type (audio/wav, audio/webm, audio/ogg, audio/mpeg, audio/mp4, audio/aac or audio/flac), at most 10 MiB. Optional `language` (a BCP 47 tag, or `multi`) sets the spoken language. Returns the transcript, the recognizer's confidence and each word's timing. Charged to the workspace's credits per second of audio; a workspace that cannot pay is refused with 402 before the audio is heard. Requests are rate-limited per person (429 with Retry-After).
Scope: `run`
# Delete an event webhook
Source: https://ara-90a60a07.mintlify.app/api-reference/workspace-events/delete-an-event-webhook
/openapi.json delete /v3/organizations/{orgId}/event-webhooks/{webhookId}
Stops deliveries to the endpoint and deletes it with its secret. Requires automations:write and sessions:read; only its registering member or a workspace owner or admin.
Scope: `automations:write`
# Get an event webhook
Source: https://ara-90a60a07.mintlify.app/api-reference/workspace-events/get-an-event-webhook
/openapi.json get /v3/organizations/{orgId}/event-webhooks/{webhookId}
One event webhook and its delivery state, never its secret. `url` is whole for its registering member and for workspace owners and admins, and only its origin for other members. Requires automations:read and sessions:read.
Scope: `automations:read`
# List event webhooks
Source: https://ara-90a60a07.mintlify.app/api-reference/workspace-events/list-event-webhooks
/openapi.json get /v3/organizations/{orgId}/event-webhooks
The workspace's outbound event webhooks, oldest first, with delivery state (`delivered_through` is the last event id delivered or skipped; `last_error` says why a delivery failed). Never their secrets. `url` is whole for its registering member and for workspace owners and admins, and only its origin for other members. Requires automations:read and sessions:read.
Scope: `automations:read`
# Register an event webhook
Source: https://ara-90a60a07.mintlify.app/api-reference/workspace-events/register-an-event-webhook
/openapi.json post /v3/organizations/{orgId}/event-webhooks
Registers an https endpoint that receives the workspace's events from now on: the events about Sessions the registering member may read and, where the workspace has connection events, changes to the workspace's connections and the member's own personal ones (for a webhook, membership decides; no mcp:read is needed), of the `event_types` given (all when omitted). Returns its signing `secret` once; store it now. At most 10 per workspace. Requires automations:write and sessions:read; viewers cannot register. Each delivery is one event, POSTed as JSON (the event frame's `data` from streamWorkspaceEvents), signed with Standard Webhooks headers: `webhook-id` (the event's identity, the same on every retry, also sent as `Idempotency-Key`), `webhook-timestamp` (Unix seconds) and `webhook-signature` (`v1,` + base64 HMAC-SHA256 of `..`, keyed by the base64-decoded part of the endpoint's `whsec_` secret). Verify it with any Standard Webhooks library, or with a Reason Loop webhook that holds the secret. Answer 2xx within 10 seconds; anything else is retried with backoff (10 s doubling to 1 h), in order, and an endpoint failing for 3 days is disabled. Delivery is at least once: drop a repeated webhook-id.
Scope: `automations:write`
# Stream workspace changes
Source: https://ara-90a60a07.mintlify.app/api-reference/workspace-events/stream-workspace-changes
/openapi.json get /v3/organizations/{orgId}/changes
A Server-Sent Events stream (`text/event-stream`) that says when a workspace view changes, so a client re-reads that view instead of polling it. Requires sessions:read.
Frames, each a JSON `data` line:
- `hello` first: `{"revisions": {topic: revision, ...}, "push": bool}` with every topic this stream carries.
- `rev` when something changed: `{"revisions": {...}}` with only the topics whose revision moved. Re-read those views.
- `pulse` every 45 seconds while nothing changed: `{"push": bool}`. `push` false means the server is detecting changes by polling for a while; frames still arrive, a second or so later.
- `error` before the server ends the stream because the key, its workspace, its IP access list, the account or a watched Session no longer admits the caller: `{"error": code, "message": text}` (`invalid_token`, `missing_scope`, `org_not_found`, `ip_not_allowed`, `session_access_changed`, ...). Reconnect only after fixing the cause; `session_access_changed` reconnects at once and drops that Session.
- `reconnect` when the client should come back: `{"reason": "server_draining", "retry_ms": 0}` when the server restarts, or `{"reason": "auth_unavailable", "retry_ms": 5000}` when the key could not be re-checked for a few minutes. Reconnect after `retry_ms`; the next `hello` carries the current revisions, so compare them with what you last read.
Topics. A revision is an opaque string: compare it for equality, never order it.
- `sessions`: the Session list (a Session started, renamed, archived, moved or changed status or activity). Re-read listSessions.
- `reasons`: the Reasons (a Reason added, archived, renamed or re-instructed). Re-read listReasons.
- `devices`: connected Devices and their roots, online state and sharing. Only with devices:read. Re-read listDevices.
- `incident`: Reason's own incident banner.
- `session:{id}:workspace`, `:sidechats`, `:machine_target`, `:shared_links`, `:hands_target`, `:pull_requests`, `:machine_runtime`: views of a Session named in `sessions`. `workspace` moves with its record (status, title, privacy); `pull_requests` with its pull requests' state; `machine_runtime` with its computer parking or waking. `hands_target`, `machine_target` and `machine_runtime` show Devices and computers, so they come only with devices:read.
A Session id in `sessions` the key's owner may not read through this API is left out, not an error. The stream re-checks the key, its workspace, its IP access list, the account and each watched Session before any frame once 30 seconds have passed since the last check, and at every 45-second pulse, and ends with an `error` frame when one no longer admits the caller.
Scope: `sessions:read`
# Stream workspace events
Source: https://ara-90a60a07.mintlify.app/api-reference/workspace-events/stream-workspace-events
/openapi.json get /v3/organizations/{orgId}/events
A resumable Server-Sent Events stream (`text/event-stream`) of what happens in the workspace's Sessions and connections, in the order it happened. Requires sessions:read.
Event types: `message.created`, `turn.started`, `turn.finished`, `input_request.created`, `input_request.resolved`, `connection.created`, `connection.updated`, `connection.removed`, `compaction.started`, `compaction.finished`.
- `message.created`: a message was added to a Session (a person's prompt or follow-up, or a message Reason posted). `data`: `message_id`, `role`. Read it with listSessionConversation or listSessionMessages.
- `turn.started`: a turn of a Session began executing: a new Session, a follow-up or resume, a scheduled or Loop run, a check-in, a subagent. Once per turn (`run_id`), also when a deploy hands the turn to another server. `data.trigger`: what started it, one of `person`, `api`, `agent`, `subagent`, `loop`, `schedule`, `check_in`, `github`, `slack`, `webhook`, `linear`, `connection`, `system` (treat a value you do not know as `system`). `data.started_by_session_id`: for a subagent, the Session that started it; otherwise null. A turn stopped before it began executing has only `turn.finished`.
- `turn.finished`: a turn of a Session ended. `data.status` is the Session's public status for that turn (`exit`, `error`, `cancelled`, ...). It is not the verdict: read the Session's `outcome` with getSession.
- `input_request.created`: a Session started waiting on a person: a question or a request card (a secret, network hosts, permission rules, a connection). `data`: `request_id` (the id getSessionInputRequest and the answer, approve, deny, cancel and secret operations take), `type` (`question`, `secret`, `network_hosts`, `permission_rules`, `installed_connector`, `endpoint_connector`, `registry_connector`, `connector`, `native_connector`, `source_control`, `device_plugin`, `personal_connector_grant`) and, for a question, `question_operation_id` (sendSessionMessage's). Read the request itself with getSessionInputRequest.
- `input_request.resolved`: a request stopped waiting. `data`: `request_id`, `type`, `status` (an input request's status other than `pending`, such as `answered`, `timed_out`, `cancelled`, `withdrawn`, `closed`, `allowed`, `declined`, `applied`, `completed`) and `question_operation_id` for a question. Recorded when it is answered, approved, declined or cancelled from any surface (the web app, Slack, this API, the agent). A question that `timed_out` can still be answered later, which records a second `input_request.resolved` with `answered`. A request that ends without anyone acting on it (a card's 24-hour window passing, a question a later message moved past) records no event: re-read the Session's input requests on `turn.finished`.
- `compaction.started`, `compaction.finished`: a Session's context compaction began or ended (show "Compacting context…" while one runs; it explains a slower turn). Recorded for a compaction during a turn (automatic, a compactSession request the running turn serves, or recovery after the model refused a request as too long) and for one compactSession runs on a settled Session. `run_id` is the turn it ran in, or for a settled Session its latest turn. `data`: `compaction_id` (the same on both, and on listSessionEvents' compaction_started / compaction_finished events) and `trigger` (`automatic`, `manual`, `overflow`); on finished also `status` (`completed`, `skipped`, `failed`), `tokens_before`, `tokens_after` and `duration_ms` (integers, each null when unknown). Never the summary. A turn cancelled while it compacts can leave a started event without its finished one: `turn.finished` ends it. Treat a finished event whose start you never saw as already over.
- `connection.created`, `connection.updated`, `connection.removed` (where the workspace has connection events): a service connection from listConnections was added, changed, or removed, from any surface (the web app, this API, the CLI, an agent) or by Reason itself. Covers MCP servers and native app accounts. `updated` means its status, health, authorization or enabled state changed: an edit or enable/disable, a reconnect or OAuth sign-in (including an imported token), an OAuth disconnect, a `check` (always recorded), or a background health check or refused token that changed its health. `data`: `connection_id` (manageConnection's `{adapter}:{record_id}`, the `id` in listConnections), `adapter` (`mcp` or `native`), `record_id`, `service_id`, `scope` (`personal` or `organization`), `owner_user_id` (the personal connection's owner, or who connected a native account; may be null) and `status` (`connected`, `needs_attention`, `not_connected`; null on `connection.removed`). Re-read listConnections for the rest. `session_id` and `run_id` are null. On this stream they need mcp:read as well as sessions:read (an event webhook follows its registering member's membership instead); a personal connection's events reach only its owner.
Each event frame is `id: `, `event: `, `data: {"id", "type", "created_at", "session_id", "run_id", "data"}`. Events carry ids and states, never conversation content: read the content through the ordinary, access-checked operations.
Resuming. `id` is the workspace's event sequence. Reconnect with the `Last-Event-ID` header (EventSource does this itself) or `?after=` and the stream first replays every retained event after it, then continues live. Without either it starts at the current end. Events are retained for 7 days: a cursor older than that gets a `reset` frame (`{"reason": "cursor_expired", "resume_after": ""}`), meaning events were lost, so re-read the views you show, then the stream continues from the oldest retained event. Ids increase but may skip numbers.
Other frames: `hello` first (`{"after": "", "latest": "", "retention_seconds": n}`); `pulse` every 45 seconds while nothing arrives, and after events you may not see, carrying the stream's current `id` so a reconnect resumes past them; `error` before the server ends the stream because the key, its workspace, its IP access list or the account no longer admits the caller (`{"error": code, "message": text}`; reconnect only after fixing the cause); `reconnect` when the client should come back with its last id: `{"reason": "server_draining"}` when the server restarts, `{"reason": "auth_unavailable", "retry_ms": 5000}` when the key could not be re-checked for a few minutes.
Visibility. An event about a Session reaches you only while the key's owner may read that Session through this API (its privacy, the Reason it is filed under, membership), checked when the event is sent, not when it happened. A connection event reaches you when the key may call listConnections (mcp:read) and the connection is the workspace's or your own. The credential is re-checked before any frame once 30 seconds have passed since the last check, and at every 45-second pulse.
Scope: `sessions:read`
# Update an event webhook
Source: https://ara-90a60a07.mintlify.app/api-reference/workspace-events/update-an-event-webhook
/openapi.json patch /v3/organizations/{orgId}/event-webhooks/{webhookId}
Changes an endpoint's url, description or event types, or disables it (`enabled: false`) or enables it again (`enabled: true` clears its failures and resumes after the last event it delivered that is still retained; events past the 7-day retention are skipped and named in `last_error`). Requires automations:write and sessions:read; only its registering member or a workspace owner or admin, and only its registering member may change `url`, because deliveries carry the Session and connection events that member may read.
Scope: `automations:write`
# Use Reason in your editor (ACP)
Source: https://ara-90a60a07.mintlify.app/docs/acp
Run Reason as the agent in Zed, T3 Code or any Agent Client Protocol client, with reason acp.
`reason acp` runs Reason as an [Agent Client Protocol](https://agentclientprotocol.com) agent over stdio. It is the link between an editor and the CLI: the editor starts `reason acp`, and `reason acp` talks to the Reason API for you. No commands run over ACP itself. Commands run on your computer through `reason connect`, or on a Reason cloud computer.
> [!NOTE]
>
> Building an app or editor integration (e.g. T3 Code)? Start at [Build an ACP editor](/docs/build/editor-app-acp).
>
> Agents: [https://reasonmachines.com/llms.txt](https://reasonmachines.com/llms.txt)
Each editor thread is a Reason Session with the same ID. It shows in the Reason app, and `reason send ID "MESSAGE"` continues it from a terminal.
## Before you add it
Install the CLI and sign in to the Workspace you want:
```bash theme={null}
curl -fsSL https://reasonmachines.com/install.sh | bash
reason login
reason whoami # names the Workspace the editor will use
reason connect # this computer runs the Sessions that use it
reason acp --help # the flags reason acp accepts
```
An editor with terminal sign-in runs `reason login` for you. Otherwise set `REASON_API_KEY`. The key needs the scopes listed in [Scopes](/docs/build/auth-and-scopes).
## Add it to an editor
Add a custom agent whose command is `reason` and whose argument is `acp`. In Zed, in `settings.json`:
```json theme={null}
{
"agent_servers": {
"Reason": { "type": "custom", "command": "reason", "args": ["acp"] }
}
}
```
Open the agent panel, click **+**, and pick **Reason**. For another ACP client, use the same command and argument. Reason writes its logs to stderr and speaks ACP on stdin and stdout.
For a step-by-step setup of a third-party app, see [Build an ACP editor](/docs/build/editor-app-acp).
## Flags
`reason acp` takes the flags of `reason "PROMPT"`, so put them in the client's argument list.
| Argument list | Where Sessions run |
| - | - |
| `["acp"]` | This computer, in the editor's project folder. Edits land in your files. |
| `["acp", "--cloud"]` | A Reason cloud computer, on the folder's repository if it has one. |
| `["acp", "--on", "NAME"]` | The machine `NAME`. |
Other flags:
* `--model ID`, `--reasoning-effort LEVEL` and `--speed standard|fast` set the starting choice for new threads. The editor's pickers can change all three: each thread offers **Model** (`model`), **Reasoning** (`reasoning_effort`) and **Speed** (`speed`) session config options. A resumed or loaded thread starts at its Session's speed. A change applies from the next prompt that starts a turn, not to a message sent into a running turn.
* `--speed fast` asks the provider for its priority tier: replies come sooner and use your plan or credits faster. It takes effect where the provider offers one (today a ChatGPT subscription's models); elsewhere the turn runs at standard speed.
* `-y` (`--yes`) accepts every default option without asking, which editors that run the agent unattended need.
* `--workspace SLUG` (before `acp`, as `reason --workspace SLUG acp`) picks a signed-in Workspace.
Use the flags `reason acp --help` lists in your installed version.
## What the agent supports
Checked against `reason acp` 0.2.678 (the `initialize` response):
* Load, list, resume and close a Session, so the editor can reopen a thread with its history and list recent ones.
* Image prompts and embedded context.
* Sign-in method `reason-login`, which runs `reason login`.
Streaming replies, reasoning, tool calls and file edits as diffs show in the editor. When Reason asks a question, the turn ends and your next prompt answers it.
Images need the `deployment:read` scope on the API key, when you sign in with a key.
Reason runs its own tools, so it does not use the editor's file system, terminal, or MCP servers. When an editor offers MCP servers in a new, loaded or resumed Session, `reason acp` does not connect them. It writes one line to stderr that names the servers. The first message of that Session also tells Reason which servers the editor offered, by name and transport only, so the Session knows it cannot use them.
## Troubleshooting
* The editor shows **Sign in to Reason**: run `reason login` in a terminal, or set `REASON_API_KEY` in the environment that starts the editor.
* Nothing runs on your computer: check `reason status`, and run `reason connect` if this computer is not connected.
* A GUI editor cannot find `reason`: set the command to the absolute path from `command -v reason`, because desktop apps often start with a short `PATH`.
# API overview
Source: https://ara-90a60a07.mintlify.app/docs/api-overview
Base URL, authentication, defaults, polling, and errors for the Reason HTTP API. Every endpoint is listed in the reference.
The Reason HTTP API creates and continues Sessions, reads their events, and manages the computers, secrets, skills and automations they use. Every endpoint is in the reference on the left.
## Base URL
```text theme={null}
https://api.reasonmachines.com/v3
```
Organization-scoped paths start with `/v3/organizations/{orgId}`. Get `orgId` once from `GET /v3/self`, which returns `org_id`.
## Authentication
Send an API key as a bearer token:
```bash theme={null}
curl -fsS -H "Authorization: Bearer $REASON_API_KEY" https://api.reasonmachines.com/v3/self
```
A key carries scopes, and each endpoint names the scope it needs. Read [Authentication and scopes](/docs/build/auth-and-scopes) for the full table and the other sign-in methods.
## Start with these calls
| Step | Endpoint |
| - | - |
| Confirm the key and get the organization | `GET /v3/self` |
| Create a Session | `POST /v3/organizations/{orgId}/sessions` |
| Read its status and events | `GET /v3/organizations/{orgId}/sessions/{sessionId}/events` |
| Send a follow-up | `POST /v3/organizations/{orgId}/sessions/{sessionId}/messages` |
| Cancel it | `POST /v3/organizations/{orgId}/sessions/{sessionId}/cancel` |
| List your computers | `GET /v3/organizations/{orgId}/devices` |
## Defaults
* A Session created without `target` runs in Reason's cloud. Name a `target` to run on your computer.
* Session lists return newest first and exclude archived Sessions unless you pass `status=archived` or `status=all`.
* Work starts asynchronously. Creating a Session returns at once with its ID, so poll for its state.
* A Session's `outcome` is the task result. `status` only says whether execution finished: a Session can end with `status: exit` and `outcome: failure`.
## Polling, not streaming
Events are read by polling `GET .../events` with `after_seq` and `wait_ms`. Each call returns the events after your cursor, and with `wait_ms` it waits for the next one. Read [Events reference](/docs/build/events-reference) for the cursor, duplicates and ordering.
## Errors
Errors return a JSON body with an `error` object that has a `type` and a `message`. The status code tells you what to do:
| Status | Meaning | What to do |
| - | - | - |
| `400` | The body is invalid, or a host or field is rejected | Fix the request; do not retry as is |
| `401` | The key is missing, expired or wrong | Check the key in **Settings > API** |
| `403` | The key lacks a scope, or your role is too low | Read `missing_scope` in the body, then grant that scope |
| `404` | The resource does not exist or you cannot see it | Check the ID |
| `409` | The request conflicts with current state | Read the reason in the body and retry after it changes |
| `429` | The key is rate-limited | Back off and retry later |
Read the body before you retry. Do not widen a key's scopes to get past an error that names a missing one.
## Versions
This reference is version 3 of the API (`info.version` is `3.0.0`). Deprecated operations say so in their description, and point to their replacement.
# Authentication and scopes
Source: https://ara-90a60a07.mintlify.app/docs/build/auth-and-scopes
Choose how your app signs in to Reason: API keys with scopes, MCP OAuth, a CLI login, or a Machine token. One table lists the scopes.
Every Reason call is signed in one of four ways. Pick the one that matches who is acting.
## What you will have
* A credential for your app, with only the scopes it needs.
* A check that proves the credential reaches the right Workspace.
## Prerequisites
```bash theme={null}
reason whoami
```
## The four ways in
| Who acts | Credential | How you get it |
| - | - | - |
| Your product, a script, a server | API key (`reason_…`; legacy `ara_…` still accepted) | **Settings > API**. Send `Authorization: Bearer KEY`. |
| A coding agent over MCP (Claude Code, Codex) | MCP OAuth, or an API key in the header | [Connect an agent over MCP](/docs/mcp) |
| You, from a terminal or editor | CLI login | `reason login`, or `reason login --pair CODE` from **Settings > Network** to choose the Workspace |
| A Machine (a server you share as a computer) | Machine token (`rmt_…`) | `reason machines token NAME` |
A key belongs to one Workspace. Confirm which one with `GET /v3/self`, which returns `org_id`, the organization name, and the `scopes` the credential holds.
## Scopes
Grant a key only what it uses. Scopes marked "owner/admin" can be minted only by a workspace owner or admin.
| Scope | Lets the holder |
| - | - |
| `run` | Create, send to, cancel, archive and delete Sessions |
| `sessions:read` | Read Sessions and their assistant, reasoning and tool events |
| `sessions:debug` | Read the full diagnostic events (owner/admin only) |
| `devices:read` | List your computers and their folders |
| `computers:read` | List every computer you can use, cloud included (`GET /v3/organizations/{orgId}/computers`); opt-in, not in default keys |
| `devices:use` | Run work on a computer you connected (needed for computer-backed Sessions) |
| `devices:write` | Connect, rename or change a computer and its folders |
| `deployment:read` | Read deployment identity, and send images with a key |
| `org:read` / `org:write` | Read or change the organization (`org:write` is owner/admin) |
| `mcp:read` / `mcp:write` | Read MCP servers, or change their configuration (`mcp:write` does not run remote MCP tools) |
| `secrets:read` / `secrets:write` | Read secret names, or store values |
| `skills:read` / `skills:write` | Read or change Workspace skills |
| `memory:read` / `memory:write` | Read or change memory files |
| `repos:read` / `repos:write` | Read or change repository connections |
| `automations:read` / `automations:write` | Read or change automations |
| `network:read` | Read the saved network policy |
| `network:write` | Replace custom allowed hosts (owner/admin only) |
| `guardrails:read` / `guardrails:write` | Read or change guardrails |
| `attachments:read` / `attachments:write` | Read or upload attachments |
| `agent_auth:read` | Read available models and inference status |
Keys without `computers:read` keep the devices list in [Computers](/docs/build/computers).
## Rules that surprise people
* A key with `run` alone cannot run work on a computer. Device-backed Sessions also need `devices:use`.
* `sessions:read` returns assistant, reasoning and tool events. Treat a key that holds it as able to read what the agent did.
* Network policy writes need `network:write` and an owner or admin role. See [Manage network policies](/docs/network-policies).
* Keys cannot grant themselves more authority. Rotate a key by creating a replacement with the scopes it needs, then deleting the old one in **Settings > API**.
## Check it works
```bash theme={null}
curl -fsS -H "Authorization: Bearer $REASON_API_KEY" https://api.reasonmachines.com/v3/self
```
The response names the organization and lists `scopes`. A wrong key returns `401`. A key missing a scope returns `403` with `missing_scope` and the scope it needs.
# Build a chat UI on the API
Source: https://ara-90a60a07.mintlify.app/docs/build/chat-ui-api
Create a Reason Session over HTTP, poll its events, send follow-ups and cancel, on your computer or in the cloud, with a TypeScript sample.
The HTTP API creates Sessions, reads their events and sends follow-ups. Use it when your own product shows the conversation. This page builds a small TypeScript client that starts a Session on your computer, follows it, and sends a follow-up.
## What you will have
* A script that creates a Session on a computer you own, or in the cloud if none is connected.
* A printed transcript of the agent's replies, read from `/events`.
* A follow-up message in the same Session.
## Prerequisites
```bash theme={null}
curl -fsSL https://reasonmachines.com/install.sh | bash
reason login
reason connect # makes this computer a target
```
Create an API key in **Settings > API** with the scopes below, and export it. Do not paste the key into a file.
```bash theme={null}
export REASON_API_KEY=reason_...
```
| Scope | Why |
| - | - |
| `run` | Create, send, cancel |
| `sessions:read` | Read the Session and its events |
| `devices:read` | List your computers as targets |
| `devices:use` | Run work on a computer you connected |
See [Authentication and scopes](/docs/build/auth-and-scopes).
## Base URL and calls
Every call goes to `https://api.reasonmachines.com/v3`, with `Authorization: Bearer $REASON_API_KEY`. Get your organization ID once from `GET /v3/self` (the field is `org_id`).
| Step | Call |
| - | - |
| Discover your organization | `GET /v3/self` |
| List your computers | `GET /v3/organizations/{orgId}/devices` |
| Create a Session | `POST /v3/organizations/{orgId}/sessions` |
| Read status and events | `GET /v3/organizations/{orgId}/sessions/{id}` and `.../events` |
| Send a follow-up | `POST /v3/organizations/{orgId}/sessions/{id}/messages` with body `{"message": "..."}` |
| Cancel | `POST /v3/organizations/{orgId}/sessions/{id}/cancel` with optional body `{"mode": "graceful"}` or `"hard"` |
## Where the Session runs
The `target` field selects the computer:
* `{"kind": "headless", "device_id": "...", "cwd": "/path"}` runs on a computer you connected with `reason connect`. Get `device_id` from the devices list. Use `cwd` to choose the folder.
* `{"kind": "cloud"}` runs on a Reason cloud computer.
* Omit `target` and it runs in the cloud.
Creating a Session returns at once. The Session runs in the background, so poll it.
## Sample
Save as `reason-chat.ts` and run it with `bun reason-chat.ts`.
```ts theme={null}
export {};
const BASE = "https://api.reasonmachines.com/v3";
const KEY = process.env.REASON_API_KEY;
if (!KEY) throw new Error("Set REASON_API_KEY first.");
type Device = {
id: string;
name: string;
kind: "mac" | "headless";
online: boolean;
roots: { id: string; label: string }[];
};
type SessionEvent = {
id: string;
seq: number;
position: number;
type: string;
text: string | null;
};
type EventsPage = {
session: { status: "running" | "exit" | "error" | "suspended"; outcome: string | null };
items: SessionEvent[];
next_seq: number;
};
async function api(path: string, init: RequestInit = {}): Promise {
const response = await fetch(`${BASE}${path}`, {
...init,
headers: {
authorization: `Bearer ${KEY}`,
"content-type": "application/json",
...(init.headers as Record | undefined),
},
});
const body = await response.json().catch(() => ({}));
if (!response.ok) {
throw new Error(`${init.method ?? "GET"} ${path} failed: ${response.status} ${JSON.stringify(body)}`);
}
return body as T;
}
const { org_id: orgId } = await api<{ org_id: string }>("/self");
// 1. Pick a connected computer you own, or fall back to the cloud.
const { devices } = await api<{ devices: Device[] }>(`/organizations/${orgId}/devices?first=50`);
const computer = devices.find((device) => device.online && device.kind === "headless");
const target = computer
? { kind: "headless", device_id: computer.id, cwd: process.cwd() }
: { kind: "cloud" };
// 2. Create the Session. It returns at once and runs in the background.
const created = await api<{ session_id: string; url: string }>(`/organizations/${orgId}/sessions`, {
method: "POST",
body: JSON.stringify({
prompt: "Run pwd and report the result. Do not change any files.",
target,
}),
});
const sessionId = created.session_id;
console.log(`Session ${sessionId} on ${computer ? computer.name : "the cloud"}: ${created.url}`);
// 3. Poll events with the cursor, keeping the highest seq per event id.
async function follow(id: string): Promise