> For the complete documentation index, see [llms.txt](https://docs.thebrief.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thebrief.ai/public-api/rest-api/projects/users.md).

# 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" 
    }
}
```
