Poll for a CLI device token
Last updated August 23, 2026
/v1/auth/device/tokenRequest
Required
Content type application/json
| Property | Type | Required | Description |
|---|---|---|---|
deviceCode | string | Required | — |
clientId | string | Required | — |
codeVerifier | string | Required | — |
View JSON schema
Responses
200
One-time CLI access token.
Content type application/json
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Required | — |
data | object | Required | — |
data.accessToken | string | Required | — |
data.tokenType | string | Required | — |
View JSON schema
400
The request payload or parameters are invalid.
Content type application/json
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Required | — |
error | object | Required | — |
error.code | "UNAUTHORIZED" | "FORBIDDEN" | "INSTANCE_LIMIT_REACHED" | "PLAN_LIMIT_REACHED" | "PLAN_REQUIRED" | "INVALID_ORIGIN" | "INVALID_REGION" | "INVALID_PAYLOAD" | "NOT_FOUND" | "CONFLICT" | "KEY_LIMIT_REACHED" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | Required | — |
error.message | string | Required | — |
error.details | unknown | Optional | Optional structured error details. |
View JSON schema
401
Authentication is missing, invalid, or expired.
Content type application/json
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Required | — |
error | object | Required | — |
error.code | "UNAUTHORIZED" | "FORBIDDEN" | "INSTANCE_LIMIT_REACHED" | "PLAN_LIMIT_REACHED" | "PLAN_REQUIRED" | "INVALID_ORIGIN" | "INVALID_REGION" | "INVALID_PAYLOAD" | "NOT_FOUND" | "CONFLICT" | "KEY_LIMIT_REACHED" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | Required | — |
error.message | string | Required | — |
error.details | unknown | Optional | Optional structured error details. |
View JSON schema
402
The requested operation requires a paid plan. API access (organization API keys) requires the Starter plan or higher; a downgraded organization receives this error until its plan is restored.
Content type application/json
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Required | — |
error | object | Required | — |
error.code | "UNAUTHORIZED" | "FORBIDDEN" | "INSTANCE_LIMIT_REACHED" | "PLAN_LIMIT_REACHED" | "PLAN_REQUIRED" | "INVALID_ORIGIN" | "INVALID_REGION" | "INVALID_PAYLOAD" | "NOT_FOUND" | "CONFLICT" | "KEY_LIMIT_REACHED" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | Required | — |
error.message | string | Required | — |
error.details | unknown | Optional | Optional structured error details. |
View JSON schema
403
The authenticated principal cannot access the resource.
Content type application/json
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Required | — |
error | object | Required | — |
error.code | "UNAUTHORIZED" | "FORBIDDEN" | "INSTANCE_LIMIT_REACHED" | "PLAN_LIMIT_REACHED" | "PLAN_REQUIRED" | "INVALID_ORIGIN" | "INVALID_REGION" | "INVALID_PAYLOAD" | "NOT_FOUND" | "CONFLICT" | "KEY_LIMIT_REACHED" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | Required | — |
error.message | string | Required | — |
error.details | unknown | Optional | Optional structured error details. |
View JSON schema
404
The requested resource was not found.
Content type application/json
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Required | — |
error | object | Required | — |
error.code | "UNAUTHORIZED" | "FORBIDDEN" | "INSTANCE_LIMIT_REACHED" | "PLAN_LIMIT_REACHED" | "PLAN_REQUIRED" | "INVALID_ORIGIN" | "INVALID_REGION" | "INVALID_PAYLOAD" | "NOT_FOUND" | "CONFLICT" | "KEY_LIMIT_REACHED" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | Required | — |
error.message | string | Required | — |
error.details | unknown | Optional | Optional structured error details. |
View JSON schema
409
The request conflicts with the current resource state.
Content type application/json
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Required | — |
error | object | Required | — |
error.code | "UNAUTHORIZED" | "FORBIDDEN" | "INSTANCE_LIMIT_REACHED" | "PLAN_LIMIT_REACHED" | "PLAN_REQUIRED" | "INVALID_ORIGIN" | "INVALID_REGION" | "INVALID_PAYLOAD" | "NOT_FOUND" | "CONFLICT" | "KEY_LIMIT_REACHED" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | Required | — |
error.message | string | Required | — |
error.details | unknown | Optional | Optional structured error details. |
View JSON schema
413
The request body exceeds the 1 MB limit.
Content type application/json
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Required | — |
error | object | Required | — |
error.code | "UNAUTHORIZED" | "FORBIDDEN" | "INSTANCE_LIMIT_REACHED" | "PLAN_LIMIT_REACHED" | "PLAN_REQUIRED" | "INVALID_ORIGIN" | "INVALID_REGION" | "INVALID_PAYLOAD" | "NOT_FOUND" | "CONFLICT" | "KEY_LIMIT_REACHED" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | Required | — |
error.message | string | Required | — |
error.details | unknown | Optional | Optional structured error details. |
View JSON schema
429
The rate limit was exceeded. API key limits are set by plan tier (Starter 600/min, Pro 1500/min, Enterprise 3000/min). Check the Retry-After header before retrying.
Content type application/json
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Required | — |
error | object | Required | — |
error.code | "UNAUTHORIZED" | "FORBIDDEN" | "INSTANCE_LIMIT_REACHED" | "PLAN_LIMIT_REACHED" | "PLAN_REQUIRED" | "INVALID_ORIGIN" | "INVALID_REGION" | "INVALID_PAYLOAD" | "NOT_FOUND" | "CONFLICT" | "KEY_LIMIT_REACHED" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | Required | — |
error.message | string | Required | — |
error.details | unknown | Optional | Optional structured error details. |
View JSON schema
500
An unexpected internal error occurred.
Content type application/json
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Required | — |
error | object | Required | — |
error.code | "UNAUTHORIZED" | "FORBIDDEN" | "INSTANCE_LIMIT_REACHED" | "PLAN_LIMIT_REACHED" | "PLAN_REQUIRED" | "INVALID_ORIGIN" | "INVALID_REGION" | "INVALID_PAYLOAD" | "NOT_FOUND" | "CONFLICT" | "KEY_LIMIT_REACHED" | "PAYLOAD_TOO_LARGE" | "RATE_LIMITED" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | Required | — |
error.message | string | Required | — |
error.details | unknown | Optional | Optional structured error details. |
View JSON schema
Related
- REST API overview: Every operation in this API.