> ## 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 Post

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

Create a Note.

<Info>
  Tool ID: `affinity_v2_notes_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_post',
  {
    "type": "entities",
    "content": {
      "html": "example"
    }
  },
);

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

### CLI

```bash theme={null}
deepline tools execute affinity_v2_notes_post --input '{
  "type": "entities",
  "content": {
    "html": "example"
  }
}' --json
```

## Example response

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

## Input reference

Request body for creating a note. The `type` field selects between three variants: - `entities`: a note attached directly to one or more Persons, Companies, and/or Opportunities. - `interaction`: a note attached to a meeting, call, or chat message. May optionally also be associated with additional entities. - `user-reply`: a reply to an existing root note. Replies have no entity associations or interaction attachment of their own. Additional notes: - By default a note is authored by the calling user. To attribute it to another member of your organization, set `creator` to reference that person by id. The referenced person must be an active internal person in your organization. - By default a note's creation time is the time of the request. To backfill a historical note, set `createdAt` to the time the note should be recorded as created. - For enterprise customers, the visibility follows See the live schema below for the complete notes.

| Name                    | Type                                          | Required | Default | Details                                                                                                                                                                          |
| ----------------------- | --------------------------------------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.type`          | `"entities" \| "interaction" \| "user-reply"` | Yes      | —       | —                                                                                                                                                                                |
| `payload.content`       | `object`                                      | Yes      | —       | The note's body content. Only `html` is supported on write; supply rendered HTML limited to the allowed tags listed below.                                                       |
| `payload.creator`       | `object`                                      | No       | —       | —                                                                                                                                                                                |
| `payload.createdAt`     | `string`                                      | No       | —       | The time to record as when the note was created. Set this to backfill historical notes with their original date. Defaults to the current time when omitted. Format: `date-time`. |
| `payload.persons`       | `array`                                       | No       | —       | —                                                                                                                                                                                |
| `payload.companies`     | `array`                                       | No       | —       | —                                                                                                                                                                                |
| `payload.opportunities` | `array`                                       | No       | —       | —                                                                                                                                                                                |
| `payload.interaction`   | `object`                                      | No       | —       | A reference to the existing interaction that an interaction note will be attached to. Notes can be attached to a meeting, call, or chat message.                                 |
| `payload.parent`        | `object`                                      | No       | —       | A reference to an existing note by its id.                                                                                                                                       |

<Info>
  This input schema is too large to embed without slowing the page. Get the complete live contract with `deepline tools get affinity_v2_notes_post --json`.
</Info>

## Output reference

| Name                                                    | Type                                                                                    | Required | Default | Details                                                 |
| ------------------------------------------------------- | --------------------------------------------------------------------------------------- | -------- | ------- | ------------------------------------------------------- |
| `result.data`                                           | `object`                                                                                | Yes      | —       | —                                                       |
| `result.data.id`                                        | `integer`                                                                               | Yes      | —       | Format: `int32`. Minimum: 1. Maximum: 2147483647.       |
| `result.data.content`                                   | `object`                                                                                | Yes      | —       | —                                                       |
| `result.data.content.html`                              | `string \| null`                                                                        | Yes      | —       | —                                                       |
| `result.data.creator`                                   | `object`                                                                                | Yes      | —       | —                                                       |
| `result.data.creator.id`                                | `integer`                                                                               | Yes      | —       | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.creator.firstName`                         | `string \| null`                                                                        | Yes      | —       | —                                                       |
| `result.data.creator.lastName`                          | `string \| null`                                                                        | Yes      | —       | —                                                       |
| `result.data.creator.primaryEmailAddress`               | `string \| null`                                                                        | Yes      | —       | Format: `email`.                                        |
| `result.data.creator.type`                              | `"internal" \| "collaborator" \| "external"`                                            | Yes      | —       | Allowed: `internal`, `collaborator`, `external`.        |
| `result.data.mentions`                                  | `array`                                                                                 | Yes      | —       | Maximum items: 100.                                     |
| `result.data.mentions[].id`                             | `integer`                                                                               | Yes      | —       | Format: `int32`. Minimum: 1. Maximum: 2147483647.       |
| `result.data.mentions[].type`                           | `"person"`                                                                              | Yes      | —       | —                                                       |
| `result.data.mentions[].person`                         | `object`                                                                                | Yes      | —       | —                                                       |
| `result.data.mentions[].person.id`                      | `integer`                                                                               | Yes      | —       | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.mentions[].person.firstName`               | `string \| null`                                                                        | Yes      | —       | —                                                       |
| `result.data.mentions[].person.lastName`                | `string \| null`                                                                        | Yes      | —       | —                                                       |
| `result.data.mentions[].person.primaryEmailAddress`     | `string \| null`                                                                        | Yes      | —       | Format: `email`.                                        |
| `result.data.mentions[].person.type`                    | `"internal" \| "collaborator" \| "external"`                                            | Yes      | —       | Allowed: `internal`, `collaborator`, `external`.        |
| `result.data.createdAt`                                 | `string`                                                                                | Yes      | —       | Format: `date-time`.                                    |
| `result.data.updatedAt`                                 | `string \| null`                                                                        | Yes      | —       | Format: `date-time`.                                    |
| `result.data.repliesCount`                              | `integer`                                                                               | No       | —       | Format: `int32`. Minimum: 0. Maximum: 2147483647.       |
| `result.data.opportunitiesPreview`                      | `object`                                                                                | No       | —       | —                                                       |
| `result.data.opportunitiesPreview.data`                 | `array`                                                                                 | No       | —       | Maximum items: 100.                                     |
| `result.data.opportunitiesPreview.data[].id`            | `integer`                                                                               | Yes      | —       | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.opportunitiesPreview.data[].name`          | `string`                                                                                | Yes      | —       | —                                                       |
| `result.data.opportunitiesPreview.data[].listId`        | `integer`                                                                               | Yes      | —       | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.opportunitiesPreview.data[].listName`      | `string`                                                                                | Yes      | —       | —                                                       |
| `result.data.opportunitiesPreview.data[].isRestricted`  | `boolean`                                                                               | Yes      | —       | —                                                       |
| `result.data.opportunitiesPreview.data[].isRedacted`    | `boolean`                                                                               | Yes      | —       | —                                                       |
| `result.data.opportunitiesPreview.totalCount`           | `integer`                                                                               | No       | —       | Format: `int64`. Minimum: 0. Maximum: 9007199254740991. |
| `result.data.personsPreview`                            | `object`                                                                                | No       | —       | —                                                       |
| `result.data.personsPreview.data`                       | `array`                                                                                 | No       | —       | Maximum items: 100.                                     |
| `result.data.personsPreview.data[].id`                  | `integer`                                                                               | Yes      | —       | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.personsPreview.data[].firstName`           | `string \| null`                                                                        | Yes      | —       | —                                                       |
| `result.data.personsPreview.data[].lastName`            | `string \| null`                                                                        | Yes      | —       | —                                                       |
| `result.data.personsPreview.data[].primaryEmailAddress` | `string \| null`                                                                        | Yes      | —       | Format: `email`.                                        |
| `result.data.personsPreview.data[].type`                | `"internal" \| "collaborator" \| "external"`                                            | Yes      | —       | Allowed: `internal`, `collaborator`, `external`.        |
| `result.data.personsPreview.totalCount`                 | `integer`                                                                               | No       | —       | Format: `int64`. Minimum: 0. Maximum: 9007199254740991. |
| `result.data.companiesPreview`                          | `object`                                                                                | No       | —       | —                                                       |
| `result.data.companiesPreview.data`                     | `array`                                                                                 | No       | —       | Maximum items: 100.                                     |
| `result.data.companiesPreview.data[].id`                | `integer`                                                                               | Yes      | —       | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.companiesPreview.data[].name`              | `string`                                                                                | Yes      | —       | —                                                       |
| `result.data.companiesPreview.data[].domain`            | `string \| null`                                                                        | Yes      | —       | Format: `hostname`.                                     |
| `result.data.companiesPreview.totalCount`               | `integer`                                                                               | No       | —       | Format: `int64`. Minimum: 0. Maximum: 9007199254740991. |
| `result.data.type`                                      | `"entities" \| "interaction" \| "ai-notetaker" \| "user-reply" \| "ai-notetaker-reply"` | Yes      | —       | —                                                       |
| `result.data.interaction`                               | `object`                                                                                | No       | —       | —                                                       |
| `result.data.interaction.id`                            | `integer`                                                                               | Yes      | —       | —                                                       |
| `result.data.interaction.type`                          | `"meeting"`                                                                             | Yes      | —       | —                                                       |
| `result.data.transcriptId`                              | `integer`                                                                               | No       | —       | —                                                       |

The table shows the first 50 fields. Use the live contract below for every field.

<Info>
  This output schema is too large to embed without slowing the page. Get the complete live contract with `deepline tools get affinity_v2_notes_post --json`.
</Info>

## 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)
