Skip to main content
CA Colombia’s API enforces access control through a bitfield permission system. Every authenticated session carries a permissions value — a decimal string encoding a set of permission flags. Each flag represents a role or capability, and the API checks these flags on every request that requires elevated access. Understanding which permissions are required where will help you predict exactly what your integration can and cannot do.

How Bitfield Permissions Work

Permissions are stored as a 64-bit integer encoded as a decimal string (e.g. "2", "32", "128"). Each bit position corresponds to a specific role or capability. A user holds a permission if the corresponding bit is set in their permissions value. When your session token is issued, your permission flags are derived from your Discord roles in the CA Colombia server. They are re-evaluated every time your Discord data is refreshed.
The permissions field is always a string, not a number. Parse it with your language’s big-integer or bitwise utilities to check individual flags. In JavaScript, use BigInt("34") before performing bitwise operations.

Permission Roles

The following roles are defined in the platform. Multiple roles can be combined — a user may hold several simultaneously.
SERVICE_ADMINISTRATOR and DEVELOPER are superuser roles — they pass every permission check automatically, regardless of what specific flag an endpoint requires. If your integration holds one of these roles, you will never receive a permission-related 401 or 403 from the API.

Rate Limit Bypass

Certain roles are exempt from the standard API rate limits: If your integration is a bot or automated service and you are experiencing rate limiting, contact a platform administrator to request the BOT role for your account.

Endpoint Permission Requirements

Most endpoints require only the base USER permission. The following endpoints have elevated requirements:
“Any one” means the caller needs at least one of the listed flags set. “All” means the caller must hold that specific flag (though SERVICE_ADMINISTRATOR and DEVELOPER always pass regardless).

Permission Errors

When you call an endpoint without the required permissions, the API responds with either a 401 Unauthorized or 403 Forbidden status code and a JSON body describing the error. 401 Unauthorized — No valid session token was provided, or the token has expired:
403 Forbidden — Your session is valid but you lack the required permission flags:
You cannot self-assign or escalate your own permissions. Roles are assigned exclusively by platform administrators through Discord role management, and are synced to your account when your Discord data is refreshed during login.

Checking Permissions Programmatically

To check whether a permissions string includes a specific flag, perform a bitwise AND against the flag’s bit value: