---
type: api
title: Add or update a note
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-persistnoteroute
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-persistnoteroute
products:
  - Kibana
---

# Add or update a note

- Server: `https://{kibana_url}`

## Paths

- `PATCH` `/api/note`
- `PATCH` `/s/{space_id}/api/note`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v8/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v8/authentication#basicauth)

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Add a note to a Timeline or update an existing note.

## Request Body

`application/json`

The note to add or update, along with additional metadata.

- `note` ({}) — required
  - `created` (number) — optional — nullable
    The time the note was created, using a 13-digit Epoch timestamp.
  - `createdBy` (string) — optional — nullable
    The user who created the note.
  - `updated` (number) — optional — nullable
    The last time the note was updated, using a 13-digit Epoch timestamp
  - `updatedBy` (string) — optional — nullable
    The user who last updated the note
  - `eventId` (string) — optional — nullable
    The `_id` of the associated event for this note.
  - `note` (string) — optional — nullable
    The text of the note
  - `timelineId` (string) — required
    The `savedObjectId` of the Timeline that this note is associated with
- `noteId` (string) — optional — nullable
  The `savedObjectId` of the note
- `version` (string) — optional — nullable
  The version of the note

## Response

Indicates the note was successfully created.

`application/json`

- `data` (object)
  - `persistNote` ({})
    - `code` (number)
    - `message` (string)
    - `note` ({})
      - `created` (number) — nullable
        The time the note was created, using a 13-digit Epoch timestamp.
      - `createdBy` (string) — nullable
        The user who created the note.
      - `updated` (number) — nullable
        The last time the note was updated, using a 13-digit Epoch timestamp
      - `updatedBy` (string) — nullable
        The user who last updated the note
      - `eventId` (string) — nullable
        The `_id` of the associated event for this note.
      - `note` (string) — nullable
        The text of the note
      - `timelineId` (string)
        The `savedObjectId` of the Timeline that this note is associated with
      - `noteId` (string)
        The `savedObjectId` of the note
      - `version` (string)
        The version of the note
## Code Examples

#### Console

```console
PATCH /api/note
```

#### curl

```curl
curl -X PATCH "https://{kibana_url}/api/note"
```

