---
title: "Update a single Note"
method: POST
path: "/v2/notes/{noteId}"
tags: ["Notes"]
---

# Update a single Note

`POST /v2/notes/{noteId}`

Make an update to an existing note's body content or its entity associations.

You can only update notes you have write access to. You can update any type of note including
AI Notetaker notes (`ai-notetaker`, `ai-notetaker-reply`), but a note's type itself cannot be
changed.

All body properties are optional: only the properties supplied are updated, and other
properties are left unchanged. For each of `persons`, `companies`, and `opportunities`, you
may:

- omit the field to leave existing associations unchanged
- send an empty array (`[]`) to clear all associations of that kind
- send a non-empty array to replace the existing set with the supplied list.

Reply notes (`user-reply`, `ai-notetaker-reply`) have no entity associations, so only
`content` can be updated for replies.

Updating `content` is subject to the same HTML restrictions as creation; submitting restricted
HTML will cause the request to fail. See the request examples below.

The content of notes that contain @mentions cannot be updated through this endpoint;
attempting to do so returns `400 Bad Request`.

Returns `204 No Content` on success, regardless of whether any properties actually changed.

## Path parameters

- `noteId` integer, required

## Request body

- NotesNoteToBeUpdated — Request body for updating an existing note. All properties are optional: only those explicitly provided are updated, and other properties are left unchanged. The properties that may be updated depend on the existing note's type: - Root notes (`entities`, `interaction`, `ai-notetaker`) may update `content` and the entity association arrays (`persons`, `companies`, `opportunities`). - Reply notes (`user-reply`, `ai-notetaker-reply`) may update `content` only; attaching `persons`, `companies`, or `opportunities` to a reply note is rejected. For each of `persons`, `companies`, and `opportunities`, you may: - omit the field to leave existing associations unchanged - send an empty array (`[]`) to clear all associations of that kind - send a non-empty array to replace the existing set with the supplied list. Any note the caller has write access to can be updated, including AI Notetaker notes. A note's type itself cannot be changed. The content of notes that contain @mentions cannot be updated.
  - `content` NotesContentToBeSaved — The note's body content. Only `html` is supported on write; supply rendered HTML limited to the allowed tags listed below.
    - `html` string, required — The HTML content of the note. **Allowed tags (with no attributes other than those explicitly noted):** `<p>`, `<br>`, `<strong>`, `<em>`, `<u>`, `<ol>`, `<ul>`, `<li>`, `<span>` (no attributes), `<a>` (only `href` with `http`, `https`, or `mailto` URL schemes). **Restricted (any of these will cause the request to fail):** inline `style` attributes, `class` attributes, `<img>`, `<script>`, `<iframe>`, `<style>`, `<blockquote>`, `<hr>`, `<s>`, `<pre>`, `<code>`, `<font>`. **Mentions:** mention spans (`<span data-type="note-mention" ...>`) are also restricted. Mentions cannot be created or modified through this endpoint. **Anchor tag normalization:** For security, the server appends `rel="noopener noreferrer"` and `target="_blank"` to every `<a>` element before the note is saved. **Valid examples:** `<p>Quick recap of the call.</p>`, `<p>Top action items:</p><ul><li><strong>Send pricing</strong> by Friday</li><li>Follow up with <a href="mailto:jane@acme.co">Jane</a></li></ul>` **Invalid examples (will cause the request to fail):** `<p style="color:red">Hi</p>` (inline style), `<p><img src="https://example.com/x.png"></p>` (image tag), `<p><span data-type="note-mention" data-note-mention-type="person" data-note-mention-person-id="1">John</span></p>` (mention span)
  - `persons` PersonReference[] — Persons attached to the note. Each item references a Person by id. Only valid for root notes.
    - `id` integer, required — The persons's unique identifier
  - `companies` CompanyReference[] — Companies attached to the note. Each item references a Company by id. Only valid for root notes.
    - `id` integer, required — The company's unique identifier
  - `opportunities` OpportunityReference[] — Opportunities attached to the note. Each item references an Opportunity by id. Only valid for root notes.
    - `id` integer, required — The opportunity's unique identifier

## Response `204`

No Content

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `404` — Not Found
- `default` — Errors

---

[API](https://skmtc.net/affinity/apis/affinity-api-v2.md) · [All operations](https://skmtc.net/affinity/apis/affinity-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/affinity/affinity-api-v2/revisions/4c2891c31b7f/schema)
