> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.cacolombia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CA Colombia REST API — Complete Reference Overview

> Full reference for the CA Colombia REST API. Base URL, authentication, request format, versioning, and links to every endpoint group.

The CA Colombia REST API gives you programmatic access to users, characters, economy, banking, OAuth flows, and staff operations. Every endpoint is versioned under `/v1` and communicates exclusively over HTTPS using JSON.

## Base URL

All requests must be sent to:

```text theme={null}
https://api.cacolombia.com/v1
```

## Request Format

Send all request bodies as JSON and include the appropriate content-type header:

```text theme={null}
Content-Type: application/json
```

Requests that do not require a body (such as `GET` and `DELETE`) should omit the header entirely.

## Authentication

The API uses **cookie-based authentication**. After completing an OAuth flow, the server sets a signed access-token cookie (valid for 24 hours) and a refresh-token cookie (valid for 8 days) on your domain. Subsequent requests automatically include these cookies as long as you send them with `credentials: 'include'` (or the equivalent in your HTTP client).

See the [Authentication guide](/authentication) for a full walkthrough of how to obtain and refresh tokens.

## Versioning

All endpoints are served under the `/v1` path prefix. Breaking changes will be introduced under a new version prefix (e.g., `/v2`) with advance notice.

## Endpoint Groups

<CardGroup cols={2}>
  <Card title="Users" icon="user" href="/api-reference/users/get-user">
    Look up user profiles and fetch Roblox avatar assets tied to a user account.
  </Card>

  <Card title="Characters" icon="person" href="/api-reference/characters/list-characters">
    Create, update, submit, and cancel roleplay characters belonging to a user.
  </Card>

  <Card title="Economy" icon="wallet" href="/api-reference/economy/get-wallet">
    Read and modify character wallets that track in-game currency balances.
  </Card>

  <Card title="Banking" icon="building-columns" href="/api-reference/banks/create-bank">
    Manage banks, open accounts, track balances, and perform account operations.
  </Card>

  <Card title="OAuth" icon="key" href="/api-reference/oauth/initiate">
    Initiate OAuth 2.0 flows with Discord and Roblox to authenticate your users.
  </Card>

  <Card title="Staff" icon="shield" href="/api-reference/staff/pending-characters">
    Review, approve, and reject character submissions — restricted to staff roles.
  </Card>
</CardGroup>

## Endpoints Index

| Method   | Path                                                     | Description                 |
| -------- | -------------------------------------------------------- | --------------------------- |
| `POST`   | `/v1/oauth/:provider`                                    | Initiate OAuth              |
| `GET`    | `/v1/oauth/:provider`                                    | OAuth callback              |
| `GET`    | `/v1/users/:userId`                                      | Get user                    |
| `GET`    | `/v1/users/:userId/roblox/avatar`                        | Get Roblox full-body avatar |
| `GET`    | `/v1/users/:userId/roblox/avatar-bust`                   | Get Roblox avatar bust      |
| `GET`    | `/v1/users/:userId/roblox/avatar-3d`                     | Get Roblox 3D avatar data   |
| `GET`    | `/v1/users/:userId/characters`                           | List characters             |
| `POST`   | `/v1/users/:userId/characters`                           | Create character            |
| `GET`    | `/v1/users/:userId/characters/:characterId`              | Get character               |
| `PATCH`  | `/v1/users/:userId/characters/:characterId`              | Update character            |
| `POST`   | `/v1/users/:userId/characters/:characterId/submit`       | Submit character            |
| `POST`   | `/v1/users/:userId/characters/:characterId/cancel`       | Cancel submission           |
| `GET`    | `/v1/users/:userId/characters/:characterId/wallet`       | Get wallet                  |
| `PATCH`  | `/v1/users/:userId/characters/:characterId/wallet`       | Update wallet (partial)     |
| `PUT`    | `/v1/users/:userId/characters/:characterId/wallet`       | Replace wallet              |
| `GET`    | `/v1/users/:userId/characters/:characterId/bankAccounts` | List bank accounts          |
| `POST`   | `/v1/banks`                                              | Create bank                 |
| `GET`    | `/v1/banks/:bankId`                                      | Get bank                    |
| `PATCH`  | `/v1/banks/:bankId`                                      | Update bank (partial)       |
| `PUT`    | `/v1/banks/:bankId`                                      | Replace bank                |
| `DELETE` | `/v1/banks/:bankId`                                      | Delete bank                 |
| `GET`    | `/v1/banks/:bankId/accounts`                             | List accounts               |
| `POST`   | `/v1/banks/:bankId/accounts`                             | Create account              |
| `GET`    | `/v1/banks/:bankId/accounts/:accountId`                  | Get account                 |
| `PATCH`  | `/v1/banks/:bankId/accounts/:accountId`                  | Update account (partial)    |
| `PUT`    | `/v1/banks/:bankId/accounts/:accountId`                  | Replace account             |
| `DELETE` | `/v1/banks/:bankId/accounts/:accountId`                  | Delete account              |
| `GET`    | `/v1/banks/:bankId/accounts/:accountId/balance`          | Get balance                 |
| `GET`    | `/v1/staff/characters/pending`                           | List pending characters     |
| `POST`   | `/v1/staff/characters/approve`                           | Approve character           |
| `POST`   | `/v1/staff/characters/reject`                            | Reject character            |
