/clans/{clanId}/members/{robloxId}/xp
BetaAdds XP to a member. On an Auto Clan, crossing the first NORMAL rank's threshold creates the membership as a side effect.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
clanId | string | required | The clan's identifier. |
robloxId | string | required | The member's Roblox user ID. |
Body
| Name | Type | Required | Description |
|---|---|---|---|
amount | integer | required | XP to add. May be negative to deduct. |
reason | string | optional | Free text recorded alongside the change. |
source | object | optional | Where the award came from. Nested to exercise the child-attribute renderer. |
placeId | string | optional | The Roblox place that issued the award. |
matchId | string | optional | Opaque round identifier. |
verified | boolean | optional | Whether 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)
endUpdated member.
{
"robloxId": "ROBLOX_ID",
"xp": "4200",
"rank": "Sergeant"
}