Skip to main content
POST
Start a plugin sign-in

Authorizations

Authorization
string
header
required

Your Reason API key from Settings › API keys. New keys use reason_; legacy ara_ keys remain accepted. Keys are capability-scoped: run, mcp:read, mcp:write, secrets:read, secrets:write, sessions:read, sessions:debug, devices:read, devices:write, devices:use, computers:read, computers:write, ssh:write, knowledge:read, memory:read, memory:write, skills:read, skills:write, pages:read, pages:write, repos:read, repos:write, reviews:read, reviews:write, deployment:read, analytics:read, org:read, org:write, attachments:read, attachments:write, guardrails:read, guardrails:write, network:read, network:write, automations:read, automations:write, agent_auth:read. devices:write, devices:use, computers:read, computers:write, ssh:write, network:read and network:write are opt-in, excluded from default keys. computers:read lists visible cloud and connected computers without waking them or granting execution access. devices:read discovers local Device targets; devices:use separately consents to local execution, so a discover-and-run local workflow needs both. devices:write manages enrollment and device grants; computers:write creates or deletes cloud computers; ssh:write manages retained SSH access. network:read reads the saved workspace network policy; network:write replaces custom allowed hosts and requires a current organization owner/admin. Legacy project PATCH requests containing network_allowed_hosts also require network:write plus their existing run scope and project management permission; saved project hosts do not affect current session egress. Only owners/admins can mint or manage keys with network:write; keys cannot grant themselves more authority. See /docs/network-policies for replacement semantics and runtime applicability. mcp:write manages MCP server configuration only; it does not authorize remote MCP-tool execution. sessions:read reads sessions, including the assistant, reasoning and tool activity in their events. sessions:debug is privileged: only for organization owners/admins, it expands session events to the full diagnostic projection (diagnostic event kinds, status text and raw event metadata).

Scopes

mcp:write

Path Parameters

orgId
string
required

Organization id or slug. Resolve it with GET /v3/self.

slug
string
required

Plugin slug from listPlugins, stable across installs and uninstalls.

Required string length: 1 - 120

Body

application/json
mcp_server_id
string<uuid>

The MCP installation to sign in (from accounts). Omit to use the caller's personal installation of the plugin, else the workspace's (or the one in scope).

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
connection_id
string<uuid>

A native connector's existing connection to reconnect; omit to connect a new account.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
scope
enum<string>

Pick the installation in this scope when the plugin has several.

Available options:
personal,
organization,
reason
reason_id
string<uuid>

Sign in the Reason's own installation of the plugin.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
return_url
string

Where the OAuth callback sends the browser when sign-in ends: https://, http://localhost or http://127.0.0.1, or an app scheme such as myapp://callback. javascript:, data:, vbscript:, file:, blob:, about:, protocol-relative URLs, backslashes, control characters and credentials are rejected. Reason sets only sign_in_id, status, connection_id and error on the redirect, never tokens or codes; parameters already in return_url are kept as they were.

Maximum string length: 2048
oauth_client
object

Your own OAuth client, for an approved custom HTTP MCP server whose authorization server has no dynamic client registration. Catalog plugins always use Reason's client.

idempotency_key
string

A start you retry with the same key returns that sign-in instead of starting another.

Required string length: 1 - 200

Response

The pending sign-in (or the one this idempotency_key started).

sign_in_id
string
required

Sign-in id; pass it to getPluginSignIn and cancelPluginSignIn.

status
enum<string>
required

pending until the browser flow finishes; then succeeded, failed, cancelled (cancelPluginSignIn) or expired.

Available options:
pending,
succeeded,
failed,
cancelled,
expired
authorize_url
string | null
required

The provider's consent page (https). Open it in the person's browser. Null once the sign-in is no longer pending.

expires_at
string
required

When a pending sign-in expires (15 minutes after it starts).

adapter
enum<string>
required

Connection adapter.

Available options:
mcp,
native
plugin_slug
string
required

The plugin this sign-in connects.

mcp_server_id
string | null
required

The MCP installation being signed in (adapter mcp).

connection_id
string | null
required

The connection id once it succeeded (pass to manageConnection with adapter). On failed with a non-null connection_id, the grant was saved but its first verification failed: the account is connected and a later health check or reconnect may resolve it.

account_id
string | null
required

Provider account id once it succeeded, when the provider names it.

account_name
string | null
required

Account label (email, workspace or team) once it succeeded, when known.

error_code
string | null
required

Machine-readable failure code, for example access_denied, oauth_exchange_failed, or an MCP verification code.

error_message
string | null
required

Human-readable failure message.

return_url
string | null
required

Where the browser goes when the sign-in ends. Reason sets only sign_in_id, status, connection_id and error on it; parameters already in return_url are kept as they were.

completed_at
string | null
required

When it stopped being pending.

created_at
string
required

When it started.