Last updated 4 months ago
Was this helpful?
Those two endpoints allow you to add/remove XP from a user. The XP added and removed will appear in the user notifications and activity.
The XP given from the API will count both for the all time and sprint leaderboard if any,
/public/communities/{subdomain}/users/{userId}/xp
curl -L \ --request POST \ --url 'https://api-v2.zealy.io/public/communities/{subdomain}/users/{userId}/xp' \ --header 'x-api-key: text' \ --header 'Content-Type: application/json' \ --data '{"xp":1,"label":"text"}'
{ "xp": 1, "label": "text", "description": "text", "communityId": "text", "receiverId": "text", "createdAt": "text", "updatedAt": "text", "id": "text", "deleted": true }
curl -L \ --request DELETE \ --url 'https://api-v2.zealy.io/public/communities/{subdomain}/users/{userId}/xp' \ --header 'x-api-key: text' \ --header 'Content-Type: application/json' \ --data '{"xp":1,"label":"text"}'