# Ban user

## Overview

This endpoint allows you to ban a user from your community. Once a user is banned:

* He won't be able to claim quests in the community anymore.
* All his quests waiting for reviews will be canceled.
* He will be removed from the all-time and sprint leaderboards if any.

## API Reference

## Ban a user from a community

<mark style="color:green;">`POST`</mark> `https://api-v2.zealy.io/public/communities/:subdomain/users/:userId/ban`

#### Path Parameters

| Name                                        | Type   | Description                      |
| ------------------------------------------- | ------ | -------------------------------- |
| subdomain<mark style="color:red;">\*</mark> | String | Subdomain of your community      |
| userId                                      | String | Id of the requested user invites |

#### Request Body

| Name   | Type   | Description                                                                   |
| ------ | ------ | ----------------------------------------------------------------------------- |
| reason | String | Reason for banning, will be displayed to the user when visiting the community |

{% tabs %}
{% tab title="200: OK " %}

{% endtab %}
{% endtabs %}


---

# 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/ban-user.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.
