---
title: "Mint Console Session"
method: POST
path: "/api/auth/console-session"
---

# Mint Console Session

`POST /api/auth/console-session`

Mint a short-lived browser bearer for direct /v1/* calls.

Authenticated by the user's session JWT. The returned token carries
(user_id, org_id, aud=console-v1) and is valid for ~10 min. The browser
holds it in memory and presents it on POST /v1/compact (and, for admins,
the deprecated /v1/capsule) direct to the API host (no Vercel proxy on the
data plane).

Body must specify the target org. Prefer `org_id` (unambiguous);
`org_slug` is accepted as a one-release deprecation path and is
resolved against the caller's memberships only — 409 `slug_ambiguous`
when the user belongs to ≥2 orgs sharing that slug.

## Request body

- ConsoleSessionRequest
  - `org_id` string, nullable
  - `org_slug` string, nullable

## Response `200`

Successful Response

- ConsoleSessionResponse
  - `token` string, required
  - `org_id` string, required
  - `org_slug` string, required
  - `expires_at` integer, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/codag/apis/infra-logs-templater.md) · [All operations](https://skmtc.net/codag/apis/infra-logs-templater/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/codag/infra-logs-templater/revisions/a2c84c9154da/schema)
