agent-swarm.devagent-swarm.dev

Codex OAuth

Codex OAuth API endpoints

GET/api/codex-oauth/accounts

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Response Body

application/json

application/json

curl -X GET "http://localhost:3013/api/codex-oauth/accounts"
{
  "accounts": [
    {
      "slot": 0,
      "configKey": "string",
      "legacy": true,
      "suffix": "string",
      "plan": "string",
      "email": "string",
      "status": "ok"
    }
  ]
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
DELETE/api/codex-oauth/accounts/{slot}

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

slot?|
Range0 <= value <= 100

Response Body

application/json

application/json

application/json

curl -X DELETE "http://localhost:3013/api/codex-oauth/accounts/{slot}"
{
  "accounts": [
    {
      "slot": 0,
      "configKey": "string",
      "legacy": true,
      "suffix": "string",
      "plan": "string",
      "email": "string",
      "status": "ok"
    }
  ]
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
POST/api/codex-oauth/device

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:3013/api/codex-oauth/device" \  -H "Content-Type: application/json" \  -d '{}'
{
  "flowId": "ccd52024-9c9c-4751-993a-9d75a778bf9d",
  "userCode": "string",
  "verificationUrl": "http://example.com",
  "intervalSeconds": 0,
  "expiresAt": "2019-08-24T14:15:22Z"
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
POST/api/codex-oauth/device/{flowId}/poll

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

flowId*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "http://localhost:3013/api/codex-oauth/device/497f6eca-6276-4993-bfeb-53cbbbba6f08/poll" \  -H "Content-Type: application/json" \  -d '{}'
{
  "status": "pending",
  "slot": 100,
  "error": "string"
}