---
title: "Add a note"
---

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

# Add a note

Path: Nicer API › Notes and tasks

`POST /crm/notes`

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

Adds a note about one traveler or one trip. Log a call, an email, a meeting or a message with its kind. Requires an Idempotency-Key header. Errors: 400 ERROR_BODY_VALIDATION, 404 ERROR_ITEM_NOT_FOUND, 409 CRM_IDEMPOTENCY_CONFLICT.

## Authentication

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

## Header parameters

- `Idempotency-Key` (`crm.notes.create.header.Idempotency-Key`; string, required) — Unique key (8–255 chars) per request; replays return the original result.
- `x-nicer-company` (`crm.notes.create.header.x-nicer-company`; string, required) — Company context. Authentication and tenant membership are validated by the API.
- `X-Nicer-CRM-Contract` (`crm.notes.create.header.X-Nicer-CRM-Contract`; string, required)
  - one of `"resource"` · example: `"resource"`

## Request body

_Required._

- `content` (`crm.notes.create.content`; string, required) — The text, 1 to 20,000 characters once trimmed, in the format of the editor that writes it.
  - maxLength: `20000` · minLength: `1`
- `isPinned` (`crm.notes.create.isPinned`; boolean, optional) — Pins the note to the traveler's overview. False when left out.
- `kind` (`crm.notes.create.kind`; string, optional) — What the note records. NOTE when left out.
  - one of `"CALL"`, `"EMAIL"`, `"MEETING"`, `"MESSAGE"`, `"NOTE"`
- `travelerId` (`crm.notes.create.travelerId`; string, optional) — The traveler (TRV…) the note is about. Required unless travelersTripId is sent; never both.
  - maxLength: `64` · minLength: `1`
- `travelersTripId` (`crm.notes.create.travelersTripId`; string, optional) — The trip (TT…) the note is about. Required unless travelerId is sent; never both.
  - minLength: `1`

## Example request

```json
{
  "content": "Prefers an aisle seat on long flights.",
  "travelerId": "TRV01JD4Q9W0Y5X3M2K8B7N6P4R1T"
}
```

## Code samples

### JavaScript SDK

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

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

await nicer.crm.notes.create({
  "content": "Prefers an aisle seat on long flights.",
  "travelerId": "TRV01JD4Q9W0Y5X3M2K8B7N6P4R1T"
});
```

### Nicer CLI

```bash
nicer crm notes create --company "$NICER_COMPANY" --input - <<'JSON'
{
  "content": "Prefers an aisle seat on long flights.",
  "travelerId": "TRV01JD4Q9W0Y5X3M2K8B7N6P4R1T"
}
JSON
```

### cURL

```bash
curl --request POST \
  --url https://api.nicer.travel/crm/notes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: string' \
  --header 'X-Nicer-CRM-Contract: resource' \
  --header 'x-nicer-company: string' \
  --data '
{
  "content": "Prefers an aisle seat on long flights.",
  "travelerId": "TRV01JD4Q9W0Y5X3M2K8B7N6P4R1T"
}
'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/crm/notes';
const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Idempotency-Key': 'string',
    'x-nicer-company': 'string',
    'X-Nicer-CRM-Contract': 'resource',
    Authorization: 'Bearer <token>'
  },
  body: JSON.stringify({
    content: 'Prefers an aisle seat on long flights.',
    travelerId: 'TRV01JD4Q9W0Y5X3M2K8B7N6P4R1T'
  })
};

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/notes"

payload = {
    "content": "Prefers an aisle seat on long flights.",
    "travelerId": "TRV01JD4Q9W0Y5X3M2K8B7N6P4R1T"
}
headers = {
    "Content-Type": "application/json",
    "Idempotency-Key": "string",
    "x-nicer-company": "string",
    "X-Nicer-CRM-Contract": "resource",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "companyName": "string",
  "content": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "isPinned": true,
  "kind": "CALL",
  "lastModifiedBy": "string",
  "noteId": "string",
  "travelerId": "string",
  "travelersTripId": "string",
  "updatedAt": "2019-08-24T14:15:22Z"
}
```

- `companyName` (`crm.notes.create.response.200.companyName`; string, required) — The agency the note belongs to.
- `content` (`crm.notes.create.response.200.content`; string, required) — The text, in the format of the editor that wrote it.
- `createdAt` (`crm.notes.create.response.200.createdAt`; string, required) — When the note was written.
  - 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))$`
- `createdBy` (`crm.notes.create.response.200.createdBy`; string, required) — The user id of who wrote the note.
- `isPinned` (`crm.notes.create.response.200.isPinned`; boolean, required) — Whether the note is pinned: pinned notes lead the traveler's overview.
- `kind` (`crm.notes.create.response.200.kind`; string, required) — What the note records.
  - one of `"CALL"`, `"EMAIL"`, `"MEETING"`, `"MESSAGE"`, `"NOTE"`
- `lastModifiedBy` (`crm.notes.create.response.200.lastModifiedBy`; string, required) — The user id of who changed the note last.
- `noteId` (`crm.notes.create.response.200.noteId`; string, required) — The note's id: what updateNote and deleteNote take.
- `travelerId` (`crm.notes.create.response.200.travelerId`; any of, required) — The traveler the note is about; null for a note about a trip. A note is about one traveler or one trip.
  - any of the following: `TravelerId`, `null`
- `travelersTripId` (`crm.notes.create.response.200.travelersTripId`; any of, required) — The trip (TT…) the note is about; null for a note about a traveler.
  - any of the following: `string`, `null`
- `updatedAt` (`crm.notes.create.response.200.updatedAt`; string, required) — When the note last changed.
  - 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))$`

### 400

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

#### Example

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

- `errorCode` (`crm.notes.create.response.400.errorCode`; string, required)
- `errorMessage` (`crm.notes.create.response.400.errorMessage`; string, required)

### 401

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

#### Example

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

- `errorCode` (`crm.notes.create.response.401.errorCode`; string, required)
- `errorMessage` (`crm.notes.create.response.401.errorMessage`; string, required)

### 403

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

#### Example

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

- `errorCode` (`crm.notes.create.response.403.errorCode`; string, required)
- `errorMessage` (`crm.notes.create.response.403.errorMessage`; string, required)


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