---
title: "Create Note"
method: POST
path: "/notes"
tags: ["Notes"]
---

# Create Note

`POST /notes`

## Request

- Base URL: `https://api.upflow.io/v1`
- URL: `https://api.upflow.io/v1/notes`
- Auth: API key in header `X-Api-Key` and API key in header `X-Api-Secret`

This endpoint can be used to create a new note.

## Request body

- union: Attributes required to create a note. Either customerId or invoiceId must be provided.
  - CustomerNoteCreation: Common attributes for note creation.
    - `body` RichTextDocument, required: A document in Rich Text JSON format. In the UI, it is rendered with [Slate.js](https://docs.slatejs.org/). The document is a nested tree structure composed of the following node types: **Element nodes (blocks)** Block-level elements that structure the document content. - `type` (string): The element type. Supported values: `"paragraph"`. - `children` (array): An array of child nodes, which can be text nodes or inline element nodes. **Text nodes (leaves)** The lowest-level nodes containing the actual text content. Adjacent text segments with different formatting are represented as separate text nodes. - `text` (string): The text content. - `bold` (boolean, optional): Bold formatting. - `italic` (boolean, optional): Italic formatting. - `underline` (boolean, optional): Underline formatting. **Link nodes (inline elements)** Inline elements that wrap text nodes to create hyperlinks. - `type` (string): Always `"link"`. - `url` (string): The link URL. - `children` (array): An array of text nodes representing the link text. **Mention nodes (inline elements)** Inline elements that reference a user. - `type` (string): Always `"mention"`. - `member` (object): The referenced member. - `id` (string, uuid): The member's unique identifier. - `displayName` (string): The display name of the member. - `email` (string): The email address of the member.
    - `customerId` string, uuid, required: The ID of the customer to associate with this note.
  - InvoiceNoteCreation: Common attributes for note creation.
    - `body` RichTextDocument, required: A document in Rich Text JSON format. In the UI, it is rendered with [Slate.js](https://docs.slatejs.org/). The document is a nested tree structure composed of the following node types: **Element nodes (blocks)** Block-level elements that structure the document content. - `type` (string): The element type. Supported values: `"paragraph"`. - `children` (array): An array of child nodes, which can be text nodes or inline element nodes. **Text nodes (leaves)** The lowest-level nodes containing the actual text content. Adjacent text segments with different formatting are represented as separate text nodes. - `text` (string): The text content. - `bold` (boolean, optional): Bold formatting. - `italic` (boolean, optional): Italic formatting. - `underline` (boolean, optional): Underline formatting. **Link nodes (inline elements)** Inline elements that wrap text nodes to create hyperlinks. - `type` (string): Always `"link"`. - `url` (string): The link URL. - `children` (array): An array of text nodes representing the link text. **Mention nodes (inline elements)** Inline elements that reference a user. - `type` (string): Always `"mention"`. - `member` (object): The referenced member. - `id` (string, uuid): The member's unique identifier. - `displayName` (string): The display name of the member. - `email` (string): The email address of the member.
    - `invoiceId` string, uuid, required: The ID of the invoice to associate with this note.

## Response `201`

Note Created

- Note: Represents a note.
  - `id` string, uuid, required: The Note ID.
  - `createdAt` string, date-time, required: The date at which the note was created (ISO 8601 format).
  - `updatedAt` string, date-time, required: The date at which the note was last updated (ISO 8601 format).
  - `modifiedAt` string, date-time, nullable: The date of the last user edit to the note contents (ISO 8601 format).
  - `customer` CustomerLite, required: Minimal customer information.
    - `id` string, uuid, required: The Customer ID.
    - `externalId` string: An external ID that uniquely references the customer.
    - `companyName` string, required: Customer name.
    - `accountingRef` string: (Deprecated) Customer accounting reference (used in accounting tool). Use a custom field instead.
  - `user` UserLite: Minimal user information.
    - `id` string, uuid, required: The User ID.
    - `firstName` string: The user's first name.
    - `lastName` string: The user's last name.
    - `email` string, email, required: The user's email address.
  - `invoice` InvoiceReference: Reference to an invoice, identifiable by ID, external ID, or custom ID.
    - `id` string, uuid: Invoice ID.
    - `externalId` string: Invoice external ID.
    - `customId` string: Invoice custom ID.
  - `body` RichTextDocument, required: A document in Rich Text JSON format. In the UI, it is rendered with [Slate.js](https://docs.slatejs.org/). The document is a nested tree structure composed of the following node types: **Element nodes (blocks)** Block-level elements that structure the document content. - `type` (string): The element type. Supported values: `"paragraph"`. - `children` (array): An array of child nodes, which can be text nodes or inline element nodes. **Text nodes (leaves)** The lowest-level nodes containing the actual text content. Adjacent text segments with different formatting are represented as separate text nodes. - `text` (string): The text content. - `bold` (boolean, optional): Bold formatting. - `italic` (boolean, optional): Italic formatting. - `underline` (boolean, optional): Underline formatting. **Link nodes (inline elements)** Inline elements that wrap text nodes to create hyperlinks. - `type` (string): Always `"link"`. - `url` (string): The link URL. - `children` (array): An array of text nodes representing the link text. **Mention nodes (inline elements)** Inline elements that reference a user. - `type` (string): Always `"mention"`. - `member` (object): The referenced member. - `id` (string, uuid): The member's unique identifier. - `displayName` (string): The display name of the member. - `email` (string): The email address of the member.
  - `medium` 'UI' | 'API': The medium through which the note was created.
  - `attachments` NoteAttachment[]: Array of files attached to this note.
    - `id` string, uuid, required: The Attachment ID.
    - `mimeType` string, required: The MIME type of the attached file.
    - `fileName` string, required: The name of the attached file.
    - `createdAt` string, date-time, required: The date at which the attachment was created (ISO 8601 format).
    - `fileUrl` string, uri, required: The URL to download the attached file. Valid for 10 hours.

---

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