---
title: "Start CLI device authorization"
method: POST
path: "/v1/auth/device/code"
tags: ["Auth"]
---

# Start CLI device authorization

`POST /v1/auth/device/code`

Creates a short-lived PKCE-bound device authorization request for the Inth CLI. This endpoint is only available when CLI device authorization is enabled.

## Request body

- DeviceAuthorizationCodeRequest
  - `clientId` string, required
  - `codeChallenge` string, required
  - `codeChallengeMethod` 'S256', required

## Response `201`

Device authorization request created.

- object
  - `success` true, required
  - `data` DeviceAuthorizationRequest, required
    - `deviceCode` string, required
    - `userCode` string, required
    - `client` DeviceAuthorizationClient, required
      - `id` string, required
      - `name` string, required
      - `publisher` string, required
    - `expiresIn` integer, required
    - `interval` integer, required
    - `verificationUri` string, uri, required
    - `verificationUriComplete` string, uri, required

## Other responses

- `400` — The request payload or parameters are invalid.
- `401` — Authentication is missing, invalid, or expired.
- `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.
- `403` — The authenticated principal cannot access the resource.
- `404` — The requested resource was not found.
- `413` — The request body exceeds the 1 MB limit.
- `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.
- `500` — An unexpected internal error occurred.

---

[API](https://skmtc.dev/inth/apis/inth-api.md) · [All operations](https://skmtc.dev/inth/apis/inth-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/inth/inth-api/revisions/97262bd49ddd/schema)
