# Add & Remove XP

## Overview

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,

## API Reference

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/users/{userId}/xp" method="post" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}

{% openapi src="<https://api-v2.zealy.io/swagger.json>" path="/public/communities/{subdomain}/users/{userId}/xp" method="delete" %}
<https://api-v2.zealy.io/swagger.json>
{% endopenapi %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zealy.io/api-reference/users/add-and-remove-xp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
