---
title: "List users in the back office"
---

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

# List users in the back office

Path: Nicer API › backoffice

`GET /backoffice/users`

URL: `https://api.nicer.travel/backoffice/users`

Lists the accounts Identity holds, 50 a page (limit, at most 100), paged with nextToken, in user id order (not a meaningful one). Each account carries what the users list shows: name, email, phone, photo, agency and role; name, email, phone and photo are personal data. Deleted accounts are listed too, with deleted true. role narrows the list to one platform role. The agency is named by the x-nicer-company header and nothing else: with one named, only the people with an active membership in it (as advisor, admin or Nicer staff), whatever agency they signed up in; with none, every account. A page narrowed by role or agency may hold fewer accounts than limit, even none, before the last page: read on while nextToken is not null. Nicer staff only. Errors: 400 ERROR_INVALID_QUERY for a bad role, limit or token; 403 ERROR_DO_NOT_HAVE_PERMISSION for a caller who is not Nicer staff.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Query parameters

- `limit` (`backoffice.users.list.query.limit`; integer, optional) — The most people a page holds, 1 to 100; 50 by default. A page narrowed by role or agency may hold fewer, even none, before the last one.
  - maximum: `100` · minimum: `1` · default: `50`
- `nextToken` (`backoffice.users.list.query.nextToken`; string, optional) — The nextToken of the previous page, to read the next one. Send it with the same role and agency.
  - minLength: `1`
- `role` (`backoffice.users.list.query.role`; string, optional) — Only the people with this platform role: traveler, advisor, admin (an agency admin) or superadmin (Nicer staff).
  - one of `"advisor"`, `"traveler"`, `"admin"`, `"superadmin"`

## Header parameters

- `x-nicer-company` (`backoffice.users.list.header.x-nicer-company`; string, optional) — Company context for an agency admin who belongs to several companies. Optional when the caller belongs to one.

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
});

await nicer.backoffice.users.list();
```

### Nicer CLI

```bash
nicer backoffice users list
```

### cURL

```bash
curl --request GET \
  --url https://api.nicer.travel/backoffice/users \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/backoffice/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.nicer.travel/backoffice/users"

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

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

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "items": [
    {
      "avatar": "http://example.com",
      "companyName": "nicer",
      "deleted": true,
      "email": "string",
      "familyName": "string",
      "fullName": "string",
      "givenName": "string",
      "phoneNumber": "string",
      "role": "advisor",
      "userId": "string"
    }
  ],
  "nextToken": "string"
}
```

- `items` (`backoffice.users.list.response.200.items`; array of object, required) — The items of this page.
  - `familyName` (`backoffice.users.list.response.200.items.familyName`; string, required) — The person's family name, as they gave it; may be empty. Personal data.
  - `fullName` (`backoffice.users.list.response.200.items.fullName`; any of, required) — The person's whole name, when stored. Personal data.
    - any of the following: `string`, `null`
  - `givenName` (`backoffice.users.list.response.200.items.givenName`; string, required) — The person's given name, as they gave it; may be empty. Personal data.
  - `role` (`backoffice.users.list.response.200.items.role`; string, required) — The person's platform role: traveler, advisor, admin (an agency admin) or superadmin (Nicer staff).
    - one of `"advisor"`, `"traveler"`, `"admin"`, `"superadmin"`
  - `userId` (`backoffice.users.list.response.200.items.userId`; string, required) — The person's user id.
    - minLength: `1`
  - `avatar` (`backoffice.users.list.response.200.items.avatar`; string, optional) — The URL of the person's photo, when they uploaded one: the stored media key behind Nicer's media host, as Identity's own user reads answer it. Personal data.
    - format: `uri`
  - `companyName` (`backoffice.users.list.response.200.items.companyName`; any of, optional) — The agency the account belongs to: the one the person signed up in, or nicer for an account that signed up with none. It does not list the other agencies the person works with or travels with.
    - any of the following: `string`, `null`
  - `deleted` (`backoffice.users.list.response.200.items.deleted`; boolean, optional) — True once the account was deleted; absent or false otherwise. Deleted accounts are listed too.
  - `email` (`backoffice.users.list.response.200.items.email`; any of, optional) — The person's email, when the account has one; null or absent otherwise. Personal data.
    - any of the following: `string`, `null`
  - `phoneNumber` (`backoffice.users.list.response.200.items.phoneNumber`; any of, optional) — The person's phone number, when the account has one; null or absent otherwise. Personal data.
    - any of the following: `string`, `null`
- `nextToken` (`backoffice.users.list.response.200.nextToken`; any of, required) — Send it back as nextToken to read the next page; null on the last page.
  - any of the following: `string`, `null`

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`backoffice.users.list.response.400.errorCode`; string, required)
- `errorMessage` (`backoffice.users.list.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`backoffice.users.list.response.401.errorCode`; string, required)
- `errorMessage` (`backoffice.users.list.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`backoffice.users.list.response.403.errorCode`; string, required)
- `errorMessage` (`backoffice.users.list.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/backoffice/backoffice.users.list/index.md
