---
title: "List project users"
description: "Get all users and optional invitations for a project"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.testandaccept.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Test And Accept API › ProjectUsers

`GET /projects/{projectId}/users`

Get all users and optional invitations for a project

## Authentication

- `bearerAuth`, http, header `Authorization`, format `tnda_ token`

## Path parameters

- `projectId` (`projectUsers-listUsers.path.projectId`; string, required)
  - format `uuid`; pattern `^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$`

## Query parameters

- `includeInvitations` (`projectUsers-listUsers.query.includeInvitations`; string, optional)

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.testandaccept.com/api/rest/projects/<projectId>/users' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.testandaccept.com/api/rest/projects/<projectId>/users';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.testandaccept.com/api/rest/projects/<projectId>/users"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Successful response

#### Example

```json
{
  "users": [
    {
      "userId": "string",
      "email": "string",
      "firstName": "string",
      "lastName": "string",
      "imageUrl": "string",
      "accessLevel": "owner",
      "grantedAt": "string",
      "grantedBy": "string",
      "expiresAt": "string"
    }
  ],
  "invitations": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "email": "string",
      "accessLevel": "owner",
      "status": "pending",
      "invitedBy": "string",
      "invitedAt": "string",
      "expiresAt": "string",
      "acceptedAt": "string",
      "acceptedBy": "string"
    }
  ],
  "totalUsers": 0,
  "totalInvitations": 0
}
```

- `users` (`projectUsers-listUsers.response.200.users`; array<object>, required)
  - `userId` (`projectUsers-listUsers.response.200.users.userId`; string, required)
  - `email` (`projectUsers-listUsers.response.200.users.email`; any of, required)
    - any of: `string`, `null`
  - `firstName` (`projectUsers-listUsers.response.200.users.firstName`; any of, required)
    - any of: `string`, `null`
  - `lastName` (`projectUsers-listUsers.response.200.users.lastName`; any of, required)
    - any of: `string`, `null`
  - `imageUrl` (`projectUsers-listUsers.response.200.users.imageUrl`; any of, required)
    - any of: `string`, `null`
  - `accessLevel` (`projectUsers-listUsers.response.200.users.accessLevel`; string, required)
    - one of `"owner"`, `"editor"`, `"approver"`, `"viewer"`, `"follower"`
  - `grantedAt` (`projectUsers-listUsers.response.200.users.grantedAt`; string, required)
  - `grantedBy` (`projectUsers-listUsers.response.200.users.grantedBy`; string, required)
  - `expiresAt` (`projectUsers-listUsers.response.200.users.expiresAt`; any of, required)
    - any of: `string`, `null`
- `totalUsers` (`projectUsers-listUsers.response.200.totalUsers`; number, required)
- `invitations` (`projectUsers-listUsers.response.200.invitations`; array<object>, optional)
  - `id` (`projectUsers-listUsers.response.200.invitations.id`; string, required)
    - format `uuid`; pattern `^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$`
  - `email` (`projectUsers-listUsers.response.200.invitations.email`; string, required)
  - `accessLevel` (`projectUsers-listUsers.response.200.invitations.accessLevel`; string, required)
    - one of `"owner"`, `"editor"`, `"approver"`, `"viewer"`, `"follower"`
  - `status` (`projectUsers-listUsers.response.200.invitations.status`; string, required)
    - one of `"pending"`, `"accepted"`, `"declined"`, `"expired"`
  - `invitedBy` (`projectUsers-listUsers.response.200.invitations.invitedBy`; string, required)
  - `invitedAt` (`projectUsers-listUsers.response.200.invitations.invitedAt`; string, required)
  - `expiresAt` (`projectUsers-listUsers.response.200.invitations.expiresAt`; string, required)
  - `acceptedAt` (`projectUsers-listUsers.response.200.invitations.acceptedAt`; any of, required)
    - any of: `string`, `null`
  - `acceptedBy` (`projectUsers-listUsers.response.200.invitations.acceptedBy`; any of, required)
    - any of: `string`, `null`
- `totalInvitations` (`projectUsers-listUsers.response.200.totalInvitations`; number, optional)

### 400

Invalid input data

#### Example

```json
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
```

- `message` (`projectUsers-listUsers.response.400.message`; string, required) — The error message
  - example `"Invalid input data"`
- `code` (`projectUsers-listUsers.response.400.code`; string, required) — The error code
  - example `"BAD_REQUEST"`
- `issues` (`projectUsers-listUsers.response.400.issues`; array<object>, optional) — An array of issues that were responsible for the error
  - example `[]`
  - `message` (`projectUsers-listUsers.response.400.issues.message`; string, required)

### 401

Authorization not provided

#### Example

```json
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
```

- `message` (`projectUsers-listUsers.response.401.message`; string, required) — The error message
  - example `"Authorization not provided"`
- `code` (`projectUsers-listUsers.response.401.code`; string, required) — The error code
  - example `"UNAUTHORIZED"`
- `issues` (`projectUsers-listUsers.response.401.issues`; array<object>, optional) — An array of issues that were responsible for the error
  - example `[]`
  - `message` (`projectUsers-listUsers.response.401.issues.message`; string, required)

### 403

Insufficient access

#### Example

```json
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
```

- `message` (`projectUsers-listUsers.response.403.message`; string, required) — The error message
  - example `"Insufficient access"`
- `code` (`projectUsers-listUsers.response.403.code`; string, required) — The error code
  - example `"FORBIDDEN"`
- `issues` (`projectUsers-listUsers.response.403.issues`; array<object>, optional) — An array of issues that were responsible for the error
  - example `[]`
  - `message` (`projectUsers-listUsers.response.403.issues.message`; string, required)

### 404

Not found

#### Example

```json
{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
```

- `message` (`projectUsers-listUsers.response.404.message`; string, required) — The error message
  - example `"Not found"`
- `code` (`projectUsers-listUsers.response.404.code`; string, required) — The error code
  - example `"NOT_FOUND"`
- `issues` (`projectUsers-listUsers.response.404.issues`; array<object>, optional) — An array of issues that were responsible for the error
  - example `[]`
  - `message` (`projectUsers-listUsers.response.404.issues.message`; string, required)

### 500

Internal server error

#### Example

```json
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}
```

- `message` (`projectUsers-listUsers.response.500.message`; string, required) — The error message
  - example `"Internal server error"`
- `code` (`projectUsers-listUsers.response.500.code`; string, required) — The error code
  - example `"INTERNAL_SERVER_ERROR"`
- `issues` (`projectUsers-listUsers.response.500.issues`; array<object>, optional) — An array of issues that were responsible for the error
  - example `[]`
  - `message` (`projectUsers-listUsers.response.500.issues.message`; string, required)


Source: https://docs.testandaccept.com/reference/project-users/list-users/index.md
