Modify XP
Modify XP
Add, subtract, or set a user's XP or level
Fields
| Field | Type | Required | Description |
|---|---|---|---|
target | enum: xp | level | yes | xp only supports add/subtract; level supports add/subtract/set. |
operation | enum: add | subtract | set | yes | set is level-only. |
amount | number (as string) or {path} | yes | Capped at 1,000,000,000 (xp) or 100,000 (level). |
preventNegative | boolean | no | Only meaningful for target 'xp'; defaults to true. |
targetUserId | string or {path} | no | Cross-user write target. |
Example
{
"id": "01H8XGJVBWX7Y5Z3K9M2N4P6Q1",
"type": "modify_xp",
"target": "xp",
"operation": "add",
"amount": "100"
}Updated about 14 hours ago
Did this page help you?
