Levels
Update User Level
Update the experience of a user in a guild
PATCH
/levels/{guildId}/users/{userId}
Authorization
X-Api-Key
<token>The user's API key to authenticate requests
In: header
Request Body
application/json
Requiredxp
Requiredobject | integertriggerCooldown
booleanWhether to trigger the leveling cooldown for this user, meaning they won't gain XP for the duration of the cooldown after this request
Default:
false
Path Parameters
guildId
RequiredSnowflakeA Discord snowflake identifier
Minimum length:
17
Maximum length: 19
Pattern: "^[1-9]\\d+$"
userId
RequiredSnowflakeA Discord snowflake identifier
Minimum length:
17
Maximum length: 19
Pattern: "^[1-9]\\d+$"
Response Body
Default Response
TypeScript Definitions
Use the response body type in TypeScript.
level
Requiredobjectcurl -X PATCH "https://api.lurkr.gg/v2/levels/stringstringstrin/users/stringstringstrin" \
-H "X-Api-Key: <token>" \
-H "Content-Type: application/json" \
-d '{
"xp": {
"increment": 1
},
"triggerCooldown": false
}'
{
"level": {
"xp": 2147483647,
"level": 6554,
"messageCount": 0
}
}