Skip to main content
POST
Approve a worker with a Machine token
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

Authorizations

Authorization
string
header
required

A Machine token from createMachineToken. It can only create enrollment tickets for its own Machine; every other operation rejects it.

Body

application/json

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.

install_id
string
required
Required string length: 16 - 160
code_challenge
string
required
Pattern: ^[A-Za-z0-9_-]{43}$
lifecycle
enum<string>
required
Available options:
persistent,
ephemeral
roots
object[]
required
Required array length: 1 - 32 elements
ttl_seconds
integer
Required range: x >= 60
folder_lane_of
string<uuid>
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)$

Response

One-use ticket bound to the token's Machine.

enrollment_ticket
string
required
expires_at
string
required
device_kind
string
required
Allowed value: "headless"
lifecycle
enum<string>
required
Available options:
persistent,
ephemeral
device_expires_at
string
required
machine_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)$
machine_name
string
required
organization_id
string<uuid>
required

Workspace the worker redeems the ticket in.

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)$