---
title: "Get the CRM settings"
---

> 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.

# Get the CRM settings

Path: Nicer API › Notes and tasks

`GET /crm/settings`

URL: `https://api.nicer.travel/crm/settings`

Returns how the agency uses its CRM: the custom fields its travelers carry (the keys and types a traveler's customFields takes), its task templates (the templateId POST /crm/task-templates/{templateId}/apply takes), its saved segments (the segmentId GET /crm/travelers takes), who sees a new traveler by default, and its webhooks with the last four characters of each signing secret, never the secret itself. The revision is the one PUT /crm/settings needs; an agency that never saved its settings reads the defaults at revision 0. The agency's advisors and admins may read them. Errors: 403 ERROR_UNAUTHORIZED for a traveler.

## Authentication

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

## Header parameters

- `x-nicer-company` (`crm.settings.list.header.x-nicer-company`; string, required) — Company context. Authentication and tenant membership are validated by the API.
- `X-Nicer-CRM-Contract` (`crm.settings.list.header.X-Nicer-CRM-Contract`; string, required)
  - one of `"resource"` · example: `"resource"`

## Code samples

### JavaScript SDK

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

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

await nicer.crm.settings.list();
```

### Nicer CLI

```bash
nicer crm settings list --company "$NICER_COMPANY"
```

### cURL

```bash
curl --request GET \
  --url https://api.nicer.travel/crm/settings \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Nicer-CRM-Contract: resource' \
  --header 'x-nicer-company: string'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/crm/settings';
const options = {
  method: 'GET',
  headers: {
    'x-nicer-company': 'string',
    'X-Nicer-CRM-Contract': 'resource',
    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/crm/settings"

headers = {
    "x-nicer-company": "string",
    "X-Nicer-CRM-Contract": "resource",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "companyName": "string",
  "customFields": [
    {
      "key": "string",
      "label": "string",
      "options": [
        "string"
      ],
      "type": "BOOLEAN"
    }
  ],
  "defaultVisibility": "ADVISORS",
  "revision": 9007199254740991,
  "segments": [
    {
      "filter": {
        "assignedAdvisorUserId": "string",
        "documentExpiringWithinDays": 1,
        "isArchived": true,
        "nextTripWithinDays": 1,
        "stage": "CLIENT",
        "tag": "string"
      },
      "name": "string",
      "segmentId": "string"
    }
  ],
  "taskTemplates": [
    {
      "applyOnTripCreated": true,
      "name": "string",
      "tasks": [
        {
          "anchor": "TRIP_CREATED",
          "offsetDays": -365,
          "title": "string"
        }
      ],
      "templateId": "string"
    }
  ],
  "updatedAt": "2019-08-24T14:15:22Z",
  "webhooks": [
    {
      "createdAt": "2019-08-24T14:15:22Z",
      "events": [
        "crm.advisor-reminders-due.v1"
      ],
      "isActive": true,
      "secret": "string",
      "secretLast4": "string",
      "url": "http://example.com",
      "webhookId": "string"
    }
  ]
}
```

- `companyName` (`crm.settings.list.response.200.companyName`; string, required) — The agency the settings belong to.
- `customFields` (`crm.settings.list.response.200.customFields`; array of object, required) — The fields the agency adds to its travelers.
  - `key` (`crm.settings.list.response.200.customFields.key`; string, required) — The key a traveler's value is stored under in their customFields, in camelCase: a lowercase letter, then up to 39 letters or digits, e.g. favoriteAirline. Unique among the agency's fields.
    - pattern: `^[a-z][a-zA-Z0-9]{0,39}$`
  - `label` (`crm.settings.list.response.200.customFields.label`; string, required) — The name the agency's screens show for the field, 1 to 60 characters.
    - maxLength: `60` · minLength: `1`
  - `options` (`crm.settings.list.response.200.customFields.options`; array of string, required) — The choices of a SELECT field, up to 30, each 1 to 60 characters; a traveler's value must be one of them. The other types ignore it: send an empty list.
    - maxLength: `60` · minLength: `1`
  - `type` (`crm.settings.list.response.200.customFields.type`; string, required) — The kind of value the field holds; a traveler's value that is not of this kind is refused.
    - one of `"BOOLEAN"`, `"DATE"`, `"NUMBER"`, `"SELECT"`, `"TEXT"`
- `defaultVisibility` (`crm.settings.list.response.200.defaultVisibility`; string, required) — Who sees a new traveler unless it says otherwise.
  - one of `"ADVISORS"`, `"COMPANY"`
- `revision` (`crm.settings.list.response.200.revision`; integer, required) — The settings' revision, to send back with a change; 0 until the settings are saved for the first time.
  - maximum: `9007199254740991` · minimum: `0`
- `segments` (`crm.settings.list.response.200.segments`; array of object, required) — The agency's saved filters of travelers.
  - `filter` (`crm.settings.list.response.200.segments.filter`; object, required) — The conditions the segment's travelers meet.
    - `assignedAdvisorUserId` (`crm.settings.list.response.200.segments.filter.assignedAdvisorUserId`; string, optional) — Travelers this advisor serves, by user id. Left out, any advisor.
      - minLength: `1`
    - `documentExpiringWithinDays` (`crm.settings.list.response.200.segments.filter.documentExpiringWithinDays`; integer, optional) — Travelers with a document that expires within this many days, 1 to 730.
      - maximum: `730` · minimum: `1`
    - `isArchived` (`crm.settings.list.response.200.segments.filter.isArchived`; boolean, optional) — True keeps archived travelers, false the ones not archived. Left out, the list's own isArchived decides: travelers not archived, unless it says otherwise.
    - `nextTripWithinDays` (`crm.settings.list.response.200.segments.filter.nextTripWithinDays`; integer, optional) — Travelers whose next trip starts within this many days, 1 to 365.
      - maximum: `365` · minimum: `1`
    - `stage` (`crm.settings.list.response.200.segments.filter.stage`; string, optional) — Travelers at this stage only.
      - one of `"CLIENT"`, `"LEAD"`
    - `tag` (`crm.settings.list.response.200.segments.filter.tag`; string, optional) — Travelers with this tag only.
      - maxLength: `40` · minLength: `1`
  - `name` (`crm.settings.list.response.200.segments.name`; string, required) — The segment's name, 1 to 80 characters.
    - maxLength: `80` · minLength: `1`
  - `segmentId` (`crm.settings.list.response.200.segments.segmentId`; string, required) — The segment's id: what GET /crm/travelers?segmentId= takes.
    - minLength: `1`
- `taskTemplates` (`crm.settings.list.response.200.taskTemplates`; array of object, required) — The agency's task templates.
  - `applyOnTripCreated` (`crm.settings.list.response.200.taskTemplates.applyOnTripCreated`; boolean, required) — Whether the template is applied to every trip of the agency as soon as the trip is created.
  - `name` (`crm.settings.list.response.200.taskTemplates.name`; string, required) — The template's name, 1 to 80 characters.
    - maxLength: `80` · minLength: `1`
  - `tasks` (`crm.settings.list.response.200.taskTemplates.tasks`; array of object, required) — The tasks the template adds to a trip, 1 to 30.
    - `anchor` (`crm.settings.list.response.200.taskTemplates.tasks.anchor`; string, required) — The trip date the task's date counts from.
      - one of `"TRIP_CREATED"`, `"TRIP_END"`, `"TRIP_START"`
    - `offsetDays` (`crm.settings.list.response.200.taskTemplates.tasks.offsetDays`; integer, required) — Days after the anchor, -365 to 365; negative is before it, 0 is the anchor's day.
      - maximum: `365` · minimum: `-365`
    - `title` (`crm.settings.list.response.200.taskTemplates.tasks.title`; string, required) — The title of the task the template adds, 1 to 255 characters.
      - maxLength: `255` · minLength: `1`
  - `templateId` (`crm.settings.list.response.200.taskTemplates.templateId`; string, required) — The template's id: what POST /crm/task-templates/{templateId}/apply takes.
    - minLength: `1`
- `updatedAt` (`crm.settings.list.response.200.updatedAt`; any of, required) — When the settings last changed; null until the first save.
  - any of the following: `string`, `null`
- `webhooks` (`crm.settings.list.response.200.webhooks`; array of object, required) — The agency's webhooks. Only the answer to an update carries a secret, and only on the webhooks that update created.
  - `createdAt` (`crm.settings.list.response.200.webhooks.createdAt`; string, required) — When the webhook was added.
    - format: `date-time` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$`
  - `events` (`crm.settings.list.response.200.webhooks.events`; array of string, required) — The events sent to the webhook.
    - one of `"crm.advisor-reminders-due.v1"`, `"crm.note-changed.v1"`, `"crm.settings-updated.v1"`, `"crm.task-changed.v1"`, `"crm.traveler-advisors-changed.v1"`, `"crm.traveler-created.v1"`, `"crm.traveler-documents-changed.v1"`, `"crm.traveler-erased.v1"`, `"crm.traveler-invitation-requested.v1"`, `"crm.traveler-linked.v1"`, `"crm.traveler-unlinked.v1"`, `"crm.traveler-updated.v1"`, `"crm.travelers-merged.v1"`, `"crm.trip-updated.v1"`
  - `isActive` (`crm.settings.list.response.200.webhooks.isActive`; boolean, required) — Whether events are sent to it; false pauses it without losing it.
  - `secretLast4` (`crm.settings.list.response.200.webhooks.secretLast4`; string, required) — The last four characters of the signing secret, to tell secrets apart.
  - `url` (`crm.settings.list.response.200.webhooks.url`; string, required) — The HTTPS address the events are posted to.
    - format: `uri` · maxLength: `2048`
  - `webhookId` (`crm.settings.list.response.200.webhooks.webhookId`; string, required) — The webhook's id, sent back in an update to keep the webhook and its secret.
    - minLength: `1`
  - `secret` (`crm.settings.list.response.200.webhooks.secret`; string, optional) — The signing secret (whsec_…) the endpoint checks each delivery's X-Nicer-Signature with. Present only in the answer to the update that created the webhook, and never again: store it then.

### 400

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

#### Example

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

- `errorCode` (`crm.settings.list.response.400.errorCode`; string, required)
- `errorMessage` (`crm.settings.list.response.400.errorMessage`; string, required)

### 401

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

#### Example

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

- `errorCode` (`crm.settings.list.response.401.errorCode`; string, required)
- `errorMessage` (`crm.settings.list.response.401.errorMessage`; string, required)

### 403

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

#### Example

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

- `errorCode` (`crm.settings.list.response.403.errorCode`; string, required)
- `errorMessage` (`crm.settings.list.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Notes-and-tasks/crm.settings.list/index.md
