---
title: "Store Authorization Code"
method: POST
path: "/api/internal/oauth/store-code"
tags: ["Internal OAuth", "Internal OAuth"]
---

# Store Authorization Code

`POST /api/internal/oauth/store-code`

## Request

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

Store an OAuth authorization code in the database.

Called by the frontend after user authenticates on /oauth/authorize page.
Protected by internal key (JWT_SECRET_KEY).

## Request body

- StoreCodeRequest
  - `code` string, required
  - `client_id` string, required
  - `user_id` string, required
  - `organization_id` string, required
  - `redirect_uri` string, required
  - `code_challenge` string, required
  - `scope` string
  - `expires_at` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/thebetterhire/apis/interanalysis-b2b-api.md) · [All operations](https://skmtc.dev/thebetterhire/apis/interanalysis-b2b-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thebetterhire/apis/interanalysis-b2b-api/revisions/c8ad03e900ea?raw)
