---
title: "Mint a CLI authorization code"
method: POST
path: "/auth/cli/authorize"
tags: ["auth"]
---

# Mint a CLI authorization code

`POST /auth/cli/authorize`

## Request

- Base URL: `https://api.thebridge.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://api.thebridge.dev/auth/cli/authorize`
- Auth: none declared

Creates a 60-second single-use authorization code bound to a PKCE challenge. Authenticated via the user session (Authorization: Bearer).

## Response `200`

Authorization code created

## Other responses

- `400`: Validation failure
- `401`: Missing/invalid user JWT
- `403`: app_id not owned by user

---

[API](https://skmtc.dev/thebridge/apis/bridge-api.md) · [All operations](https://skmtc.dev/thebridge/apis/bridge-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thebridge/apis/bridge-api/revisions/290fffcb3d80?raw)
