Skip to main content

API reference

XP

Fixture XP operations.


POST

/clans/{clanId}/members/{robloxId}/xp

Beta

Adds XP to a member. On an Auto Clan, crossing the first NORMAL rank's threshold creates the membership as a side effect.

Path parameters

Path parameters for POST /clans/{clanId}/members/{robloxId}/xp
NameTypeRequiredDescription
clanIdstringrequiredThe clan's identifier.
robloxIdstringrequiredThe member's Roblox user ID.

Body

Request body fields for POST /clans/{clanId}/members/{robloxId}/xp
NameTypeRequiredDescription
amountintegerrequiredXP to add. May be negative to deduct.
reasonstringoptionalFree text recorded alongside the change.
sourceobjectoptionalWhere the award came from. Nested to exercise the child-attribute renderer.
placeIdstringoptionalThe Roblox place that issued the award.
matchIdstringoptionalOpaque round identifier.
verifiedbooleanoptionalWhether the issuing server passed attestation.
local HttpService = game:GetService("HttpService")

local response = HttpService:RequestAsync({
    Url = "https://api.example.invalid/v0/clans/CLAN_ID/members/ROBLOX_ID/xp",
    Method = "POST",
    Headers = {
        ["Authorization"] = "Bearer YOUR_CLAN_API_KEY",
        ["Content-Type"] = "application/json",
    },
    Body = HttpService:JSONEncode({
        amount = 150,
    }),
})

if response.Success then
    print(HttpService:JSONDecode(response.Body))
else
    warn(response.StatusCode, response.Body)
end

Updated member.

{
  "robloxId": "ROBLOX_ID",
  "xp": "4200",
  "rank": "Sergeant"
}
POST

/clans/{clanId}/xp

Deprecated

Superseded by the per-member endpoint. Still functional so existing game code keeps working.

Path parameters

Path parameters for POST /clans/{clanId}/xp
NameTypeRequiredDescription
clanIdstringrequiredThe clan's identifier.

Body

Request body fields for POST /clans/{clanId}/xp
NameTypeRequiredDescription
awardsarray of objectrequiredOne entry per member.
robloxIdstringoptionalRecipient's Roblox user ID.
amountintegeroptionalXP to add.
local HttpService = game:GetService("HttpService")

local response = HttpService:RequestAsync({
    Url = "https://api.example.invalid/v0/clans/CLAN_ID/xp",
    Method = "POST",
    Headers = {
        ["Authorization"] = "Bearer YOUR_CLAN_API_KEY",
        ["Content-Type"] = "application/json",
    },
    Body = HttpService:JSONEncode({
        awards = {
            {
                robloxId = "ROBLOX_ID",
                amount = 150,
            },
        },
    }),
})

if response.Success then
    print(HttpService:JSONDecode(response.Body))
else
    warn(response.StatusCode, response.Body)
end

Per-target results.

{
  "applied": 2,
  "results": []
}