Get XP balance
Read a member's current XP total and level.
GET /v1/xp/balance?discordId={id} · requires xp:read
Query parameters
Prop
Type
Returns
Prop
Type
Example
curl "https://ceejay.communitystudios.xyz/api/v1/xp/balance?discordId=409876543210987654" \
-H "Authorization: Bearer $CEEJAY_API_KEY"The TypeScript example uses ceejay.xp.getBalance from the TypeScript SDK. It returns the data of the response below.
{
"success": true,
"data": {
"discordId": "409876543210987654",
"xp": 8450,
"level": 12,
"lastUpdated": "2026-10-01T09:14:22.118Z"
}
}Errors
| Status | code | error | When |
|---|---|---|---|
400 | bad_request | discordId must be a valid Discord snowflake (17-20 digits) | discordId is missing, is not 17 to 20 digits, or was sent more than once |
Every error body also includes requestId, and a 400 with the code bad_request identifies the invalid field in field. Match on code; message text can change.
The errors every request shares (401, 403, 405, 429, 500) are on the Errors page.
Unknown members
Returns 200 with xp: 0, level: 0, lastUpdated: null rather than 404, so you can call it
without checking membership first. Reading creates nothing.

