---
title: "Exchange a Clerk session token for a console session"
method: POST
path: "/v1/auth/clerk/exchange"
tags: ["auth"]
---

# Exchange a Clerk session token for a console session

`POST /v1/auth/clerk/exchange`

## Request

- Base URL: `https://api.hyperresearch.ai`
- URL: `https://api.hyperresearch.ai/v1/auth/clerk/exchange`
- Auth: HTTP bearer

The console's only sign-in. Send the Clerk session JWT as `Authorization: Bearer …`; the body is ignored. Verification is networkless and the Clerk user's primary email must be verified. Sets the `hr_session` cookie: the first exchange for an email provisions account, workspace, vault and first API key (returned once as `api_key`), later exchanges just open a session.

## Response `200`

Session opened

- AuthRedeemResult
  - `account` AuthAccount, required
    - `id` string, required
    - `email` string, required
    - `name` string, nullable, required
    - `plan` string, required
    - `status` string, required
    - `card_on_file` boolean, required
    - `trial` object, required
      - `light_remaining` number, required
      - `full_remaining` number, required
      - `premier_remaining` number, required
    - `free_deep_available` boolean
    - `deletion` object, nullable
      - `status` 'scheduled' | 'purging' | 'purged', required
      - `scheduled_for` string, nullable, required
      - `cancellable` boolean, required
  - `user` object, required
    - `id` string, required
    - `email` string, required
    - `role` string, required
  - `workspace` object, required
    - `id` string, required
    - `name` string, required
    - `status` string, required
  - `api_key` string
  - `csrf_token` string, required
  - `session` AuthSessionExpiry, required
    - `expires_at` string, required
  - `is_new` boolean, required
  - `card_required` boolean, required

## Other responses

- `400`: Invalid request
- `401`: Authentication failed
- `403`: Insufficient scope or plan
- `404`: Not found
- `429`: Rate limited or over quota
- `500`: Internal error
- `503`: Provider unavailable

---

[API](https://skmtc.dev/hyperresearch/apis/hyperresearch-cloud-api.md) · [All operations](https://skmtc.dev/hyperresearch/apis/hyperresearch-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hyperresearch/apis/hyperresearch-cloud-api/revisions/726ef831ebf4?raw)
