> For the complete documentation index, see [llms.txt](https://noctaly-bot.gitbook.io/noctaly-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://noctaly-bot.gitbook.io/noctaly-api/leveling/xp-and-levels.md).

# XP & Levels

### Update Member XP

```http
POST guilds/{guildID}/users/{userID}/xp
```

Add or remove XP from a member.

#### Request Body

<table><thead><tr><th width="96">Field</th><th width="100" align="center">Type</th><th width="423">Description</th><th align="center">Default</th></tr></thead><tbody><tr><td>xp <mark style="color:red;">*</mark></td><td align="center"><code>number</code></td><td><p>The amount of XP to give or remove. If the amount is positive, it gives XP, if it's negative, it removes XP.</p><p>Max: 100,000,000. Min: -100,000,000.</p></td><td align="center">—</td></tr><tr><td>multiply</td><td align="center"><code>boolean</code></td><td>Should the server multiplier and the member's booster roles affect the amount of XP.</td><td align="center">false</td></tr></tbody></table>

#### Response Fields

<table data-full-width="false"><thead><tr><th width="96">Field</th><th width="100" align="center">Type</th><th>Description</th></tr></thead><tbody><tr><td>xp</td><td align="center"><code>number</code></td><td>The amount of XP given or removed.</td></tr></tbody></table>

```json
{
    "xp": 2632,
}
```

### Update Member Level

```http
POST users/{userID}/level
```

Add or remove levels from a member.

#### Request Body

<table><thead><tr><th width="96">Field</th><th width="100" align="center">Type</th><th width="423">Description</th><th align="center">Default</th></tr></thead><tbody><tr><td>level <mark style="color:red;">*</mark></td><td align="center"><code>number</code></td><td><p>The amount of levels to give or remove. If the amount is positive, it gives levels, if it's negative, it removes levels.</p><p>Max: 1,000. Min: -1,000.</p></td><td align="center">—</td></tr></tbody></table>

#### Response Fields

<table data-full-width="false"><thead><tr><th width="96">Field</th><th width="100" align="center">Type</th><th>Description</th></tr></thead><tbody><tr><td>level</td><td align="center"><code>number</code></td><td>The number of levels given or removed.</td></tr></tbody></table>

```json
{
    "level": 5,
}
```
