# Project Users

## List project users

This endpoint makes an HTTP GET request to retrieve a list of user for a project

### Request

* Method: GET
* Endpoint: `https://api.thebrief.ai/v1/project/users`
* Query Parameters:
  * `projectId` (integer, required): The projectId in which will search for users

```bash
curl --location 'https://api.thebrief.ai/v1/project/users' \
--header 'Authorization: Bearer eyJh...'
```

### Response

Upon a successful execution, the response will have a status code of 200 and a JSON content type. The response body will contain the following structure:

JSON

```json
{
    "response": [
        {
            "userId": 111111,
            "teamId": 111,
            "name": "User Name 1",
            "url": null,
            "email": "user@email.com",
            "profilePicture": null,
            "role": "Admin",
            "teamRoleId": 1
        },
        {
            "userId": 22222,
            "teamId": 111,
            "name": "User Name 2",
            "url": null,
            "email": "user2@email.com",
            "profilePicture": null,
            "role": "Admin",
            "teamRoleId": 1
        },
     ]
 }
```

## Add User to Project

This endpoint allows you to add a user to a project.

### Request

* Method: POST
* Endpoint: `https://api.thebrief.ai/v1/project/users`
* Body:
  * `userId` (integer, required): The ID of the user.
  * `projectId` (integer, required): The ID of the project where we want to add the user

### Response

The response of this request can be documented as a JSON schema:

JSON

```json
{
    "response": 
    {
        "status": "success" 
    }
}
```

## Remove User from a Project

This endpoint allows you to remove a user from a project.

### Request

* Method: DELETE
* Endpoint: `https://api.thebrief.ai/v1/project/users`
* Body:
  * `userId` (integer, required): The ID of the user.
  * `projectId` (integer, required): The ID of the project from where we want to remove the user

### Response

```
{
    "response": 
    {
        "status": "success" 
    }
}
```


---

# 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.thebrief.ai/public-api/rest-api/projects/users.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.
