---
title: "Exchange"
method: POST
path: "/api/identity/oauth/exchange"
tags: ["identity"]
---

# Exchange

`POST /api/identity/oauth/exchange`

## Request

- Base URL: `https://api.superit.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.superit.ai/api/identity/oauth/exchange`
- Auth: none declared

Exchange one-time code for JWT tokens.

## Request body

- OAuthExchangeRequest: Request to exchange one-time code for tokens.
  - `code` string, required

## Response `200`

Successful Response

- OAuthExchangeResponse: Response with JWT tokens after OAuth.
  - `access` string, required
  - `refresh` string, required
  - `userKey` string, required
  - `isNewUser` boolean, required
  - `isFirstLogin` boolean
  - `defaultTeamKey` string, nullable

## Other responses

- `400`: Invalid input
- `401`: Invalid or expired code
- `403`: Forbidden
- `404`: Not found
- `405`: Method not allowed
- `409`: Conflict
- `422`: Validation Error

---

[API](https://skmtc.dev/superit/apis/super-it-api.md) - [All operations](https://skmtc.dev/superit/apis/super-it-api/llms.txt) - [OpenAPI document](https://skmtc.dev/superit/apis/super-it-api/revisions/4944d556c2bb?raw)
