---
title: "Update a Note with revision conflict protection"
method: PATCH
path: "/api/notes/{id}"
tags: ["Notes"]
---

# Update a Note with revision conflict protection

`PATCH /api/notes/{id}`

## Request

- Base URL: `https://keep.md`
- URL: `https://keep.md/api/notes/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `keep.session_token`

Update a Note with revision conflict protection.

## Headers

- `Keep-API-Version` string

## Request body

- object
  - `title` string
  - `bodyMarkdown` string
  - `properties` object: Custom Note metadata. First-class tags, Project, repository, kind, and state use their top-level fields.
  - `tags` string[]: Omit on update to preserve current tags. Send an empty array to remove every tag.
  - `project` string, nullable: Omit on update to preserve the current Project. Send null to clear it.
  - `repository` string, nullable: Omit on update to preserve the current repository. Send null to clear it.
  - `kind` string, nullable: Omit on update to preserve the current kind. Send null to clear it.
  - `state` string, nullable: Omit on update to preserve the current state. Send null to clear it.
  - `expectedRevision` integer, required: Required for replacements and metadata changes. Optional on append to pin the write to a known revision.
  - `clientRequestId` string
  - `changeSummary` string
  - `model` string

## Response `200`

Updated Note

- NoteWriteReceipt
  - `note` object, required
    - `id` string, required
    - `title` string, required
    - `currentRevision` integer, required
  - `revision` object, required
    - `revisionNumber` integer, required
    - `operation` 'created' | 'edited' | 'appended' | 'archived' | 'restored', required
  - `replayed` boolean, required
  - `metadataDiff` NoteMetadataDiff, required: Only the first-class metadata fields changed by this write.
    - `tags` object
      - `added` string[], required
      - `removed` string[], required
    - `project` NoteMetadataValueDiff
      - `before` string, nullable, required
      - `after` string, nullable, required
    - `kind` NoteMetadataValueDiff
      - `before` string, nullable, required
      - `after` string, nullable, required
    - `state` NoteMetadataValueDiff
      - `before` string, nullable, required
      - `after` string, nullable, required
  - `webUrl` string, uri, required

## Other responses

- `400`: Invalid request
- `401`: Authentication required
- `403`: The credential lacks access or the plan does not include the feature
- `404`: Resource not found
- `409`: The request conflicts with the current resource state

---

[API](https://skmtc.dev/keep/apis/keep-api.md) · [All operations](https://skmtc.dev/keep/apis/keep-api/llms.txt) · [OpenAPI document](https://skmtc.dev/keep/apis/keep-api/revisions/a338a455bd0f?raw)
