Skip to main content
POST
Enroll a headless installation

Authorizations

Authorization
string
header
required

Your Reason API key from Settings > API. 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, knowledge:read, memory:read, memory:write, skills:read, skills: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, automations:read, automations:write, agent_auth:read. 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).

Path Parameters

orgId
string
required

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

Body

application/json
approval
object
required

Single-use P-256/PKCE headless enrollment. Persistent TTL defaults to 30 days (maximum 90 days); ephemeral defaults to 1 hour (maximum 24 hours). Minimum TTL is 60 seconds. Root fingerprints and permissions are the approval ceiling; unknown fields, including device_kind and bound_run_id, are rejected.

code_verifier
string
required

PKCE verifier of the approval's code_challenge.

Pattern: ^[A-Za-z0-9_-]{43,128}$
registration
object
required

The Device's registration as the signed Device transport's enroll takes it (name, os, architecture, versions, protocol_version, capabilities, roots, device_public_key), without enrollment_ticket and code_verifier. device_public_key is required.

Response

The installation's existing Device enrolled again.

device_id
string<uuid>
required
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)$
organization_id
string
required
auth_scheme
string
required
Allowed value: "p256"
protocol_version
integer
required
roots
object[]
required
headless
object
first_heartbeat
object

A single-use proof challenge for the Device's first heartbeat, and what that heartbeat may carry.