---
title: "Exchange Codex OAuth code"
method: POST
path: "/api/projects/{projectId}/credentials/codex/exchange"
tags: ["Credentials"]
---

# Exchange Codex OAuth code

`POST /api/projects/{projectId}/credentials/codex/exchange`

Exchange Codex OAuth code. Accepts a JSON request body when defined and returns the resulting resource or action status.

## Path parameters

- `projectId` string, required

## Request body

- CodexExchangeRequest — codex Exchange Request payload accepted by the API.
  - `code` string, required — OAuth authorization code.
  - `redirectUri` string, required — OAuth redirect URI.
  - `verifier` string, required — PKCE verifier used by OAuth code exchange.

## Response `200`

Exchange result

- CodexExchangeResponse — codex Exchange Response payload returned by the API.
  - `success` boolean, required — Whether the requested action succeeded.
  - `error` string — Error message when the operation failed.

---

[API](https://skmtc.net/ibuildthecloud/apis/discobot-server-api.md) · [All operations](https://skmtc.net/ibuildthecloud/apis/discobot-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ibuildthecloud/discobot-server-api/versions/4de3fcd6be56/schema)
