Skip to main content

cancel Terminal Enrollment

POST /api/terminal/cancel

Canonical HTTPS terminal client endpoint. Send application/json without cookies, Origin, Authorization or content encoding. No browser session authentication applies here. Start returns a 10-minute browser approval link, confirmation code and separate terminal secret. Poll every five seconds using that secret; approved delivery contains one agent credential scoped to the approved workspace and capabilities. Preserve it securely before acknowledgement, which removes recoverable delivery. Pending, denied, cancelled, ready and acknowledged states are explicit. Cancel requires the originating terminal secret and returns safeToRestart only when issuance has provably never begun, including after expiry within a 24-hour recovery window. It is idempotent; ambiguous or previously issued enrollments return 409 and must be resumed or reviewed in the workspace. Expired delivery secrets are removed; recovery retains only metadata. Expired requests return 410 and rapid polling returns 429. Approval uses normal browser sign-in and MFA. This API is a component of the forthcoming guided installer; it does not install or start an agent.

Authentication​

No authenticated session is required by this operation. Origin checks and request limits still apply.

[]

Parameters​

[]

Request body​

{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"request": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{43}$"
},
"deviceSecret": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{43}$"
}
},
"required": [
"request",
"deviceSecret"
]
}
}
}
}

Responses​

{
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"400": {
"description": "Validation error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Missing/expired/revoked credential",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Insufficient role",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"409": {
"description": "State or idempotency conflict",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"413": {
"description": "Body too large",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"415": {
"description": "Unsupported media type",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Request budget exhausted; respect Retry-After",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"headers": {
"Retry-After": {
"schema": {
"type": "integer",
"minimum": 1
},
"description": "Seconds until sufficient budget is expected; concurrent traffic may consume replenished capacity."
}
}
},
"500": {
"description": "Internal error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"503": {
"description": "Not configured",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}

References such as #/components/schemas/Asset resolve in shared schemas. Download the OpenAPI contract for client generation. This page is generated; it describes the implemented development API, not planned endpoints.