---
title: "Update 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.

# Update a note

Path: Nicer API › Notes and tasks

`PUT /crm/notes/{noteId}`

URL: `https://api.nicer.travel/crm/notes/{noteId}`

Replaces a note's text, kind or pin. Errors: 400 ERROR_BODY_VALIDATION, 404 ERROR_ITEM_NOT_FOUND.

## Authentication

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

## Path parameters

- `noteId` (`crm.notes.update.path.noteId`; string, required)

## Header parameters

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

## Request body

_Required._

- `content` (`crm.notes.update.content`; string, optional) — The new text, which replaces the old one whole: 1 to 20,000 characters once trimmed.
  - maxLength: `20000` · minLength: `1`
- `isPinned` (`crm.notes.update.isPinned`; boolean, optional) — True pins the note to the traveler's overview, false unpins it.
- `kind` (`crm.notes.update.kind`; string, optional) — What the note records.
  - one of `"CALL"`, `"EMAIL"`, `"MEETING"`, `"MESSAGE"`, `"NOTE"`

## Example request

```json
{
  "content": "string",
  "isPinned": true,
  "kind": "CALL"
}
```

## 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.notes.update({
  "noteId": "string"
});
```

### Nicer CLI

```bash
nicer crm notes update --note-id 'string' --company "$NICER_COMPANY" --input - <<'JSON'
{}
JSON
```

### cURL

```bash
curl --request PUT \
  --url 'https://api.nicer.travel/crm/notes/<noteId>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Nicer-CRM-Contract: resource' \
  --header 'x-nicer-company: string' \
  --data '
{
  "content": "string",
  "isPinned": true,
  "kind": "CALL"
}
'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/crm/notes/<noteId>';
const options = {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
    'x-nicer-company': 'string',
    'X-Nicer-CRM-Contract': 'resource',
    Authorization: 'Bearer <token>'
  },
  body: JSON.stringify({content: 'string', isPinned: true, kind: 'CALL'})
};

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

payload = {
    "content": "string",
    "isPinned": True,
    "kind": "CALL"
}
headers = {
    "Content-Type": "application/json",
    "x-nicer-company": "string",
    "X-Nicer-CRM-Contract": "resource",
    "Authorization": "Bearer <token>"
}

response = requests.put(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.update.response.200.companyName`; string, required) — The agency the note belongs to.
- `content` (`crm.notes.update.response.200.content`; string, required) — The text, in the format of the editor that wrote it.
- `createdAt` (`crm.notes.update.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.update.response.200.createdBy`; string, required) — The user id of who wrote the note.
- `isPinned` (`crm.notes.update.response.200.isPinned`; boolean, required) — Whether the note is pinned: pinned notes lead the traveler's overview.
- `kind` (`crm.notes.update.response.200.kind`; string, required) — What the note records.
  - one of `"CALL"`, `"EMAIL"`, `"MEETING"`, `"MESSAGE"`, `"NOTE"`
- `lastModifiedBy` (`crm.notes.update.response.200.lastModifiedBy`; string, required) — The user id of who changed the note last.
- `noteId` (`crm.notes.update.response.200.noteId`; string, required) — The note's id: what updateNote and deleteNote take.
- `travelerId` (`crm.notes.update.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.update.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.update.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.update.response.400.errorCode`; string, required)
- `errorMessage` (`crm.notes.update.response.400.errorMessage`; string, required)

### 401

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

#### Example

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

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

### 403

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

#### Example

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

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


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