> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Affinity: V2 Notes Note ID Post

> Update a single Note. Affinity V2 Notes Note Id Post reference includes SDK V2 and CLI requests, input constraints, response fields, and Deepline cost.

Update a single Note.

<Info>
  Tool ID: `affinity_v2_notes_note_id_post`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'affinity_v2_notes_note_id_post',
  {
    "noteId": 123
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute affinity_v2_notes_note_id_post --input '{
  "noteId": 123
}' --json
```

## Example response

The static output schema is not detailed enough to generate a reliable example. Use `deepline tools get affinity_v2_notes_note_id_post --json` for the complete live contract.

## Input reference

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 See the live schema below for the complete notes.

| Name                    | Type      | Required | Default | Details                                                                                                                       |
| ----------------------- | --------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `payload.noteId`        | `integer` | Yes      | —       | The id of the Note to update Format: `int32`. Minimum: 1. Maximum: 2147483647.                                                |
| `payload.content`       | `object`  | No       | —       | The note's body content. Only `html` is supported on write; supply rendered HTML limited to the allowed tags listed below.    |
| `payload.persons`       | `array`   | No       | —       | Persons attached to the note. Each item references a Person by id. Only valid for root notes. Maximum items: 100.             |
| `payload.companies`     | `array`   | No       | —       | Companies attached to the note. Each item references a Company by id. Only valid for root notes. Maximum items: 100.          |
| `payload.opportunities` | `array`   | No       | —       | Opportunities attached to the note. Each item references an Opportunity by id. Only valid for root notes. Maximum items: 100. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "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.",
    "properties": {
      "noteId": {
        "type": "integer",
        "description": "The id of the Note to update",
        "minimum": 1,
        "maximum": 2147483647,
        "format": "int32"
      },
      "content": {
        "type": "object",
        "description": "The note's body content. Only `html` is supported on write; supply rendered HTML limited to the allowed tags listed below.",
        "properties": {
          "html": {
            "type": "string",
            "description": "The HTML content of the note. **Allowed tags (with no attributes other than those explicitly noted):** ` `, ` `, ` `, ` `, ` `, ` `, ` `, ` `, ` ` (no attributes), ` ` (only `href` with `http`, `https`, or `mailto` URL schemes). **Restricted (any of these will cause the request to fail):** inline `style` attributes, `class` attributes, and the `img`, `script`, `iframe`, `style`, `blockquote`, `hr`, `s`, `pre`, `code`, `font` tags. **Mentions:** mention spans (` `) 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 ` ` element before the note is saved. **Valid examples:** ` Quick recap of the call. `, ` Top action items: Send pricing by Friday Follow up with Jane ` **Invalid examples (will cause the request to fail):** ` Hi ` (inline style), ` ` (image tag), ` John ` (mention span)"
          }
        },
        "required": [
          "html"
        ],
        "additionalProperties": false
      },
      "persons": {
        "type": "array",
        "description": "Persons attached to the note. Each item references a Person by id. Only valid for root notes.",
        "maxItems": 100,
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The persons's unique identifier",
              "minimum": 1,
              "maximum": 9007199254740991,
              "format": "int64"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        }
      },
      "companies": {
        "type": "array",
        "description": "Companies attached to the note. Each item references a Company by id. Only valid for root notes.",
        "maxItems": 100,
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The company's unique identifier",
              "minimum": 1,
              "maximum": 9007199254740991,
              "format": "int64"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        }
      },
      "opportunities": {
        "type": "array",
        "description": "Opportunities attached to the note. Each item references an Opportunity by id. Only valid for root notes.",
        "maxItems": 100,
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The opportunity's unique identifier",
              "minimum": 1,
              "maximum": 9007199254740991,
              "format": "int64"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "noteId"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name          | Type      | Required | Default | Details |
| ------------- | --------- | -------- | ------- | ------- |
| `result.data` | `unknown` | Yes      | —       | —       |
| `result.meta` | `object`  | No       | —       | —       |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "data": {},
      "meta": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Affinity provider guide](/docs/providers/affinity/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
