---
title: "Create a note"
method: POST
path: "/v1/notes"
tags: ["Notes"]
---

# Create a note

`POST /v1/notes`

Create a note in a case.

## Request body

- NoteCreate
  - `case_id` string, uuid, required — Case id where the note is created
  - `content` string, required — You can format with a subset of html: - Allowed tags are `p`, `b`, `i`, `em`, `strong`, `a` with attributes `href`, `target` and `rel`, `li`, `ul`, `span` with attributes `data-type`, `data-id` and `data-label`, `br` and `hr`. - Invalid tag or attribute will be stripped out. - URL will be transformed into link. `target` and `rel` will be automatically set. - Line break `\n` will be replaced by `<br />`. - A `<p>` will be added if the content doesn't start with a `<p>` or a `<ul>` tag - You can mention an user with `<span data-type="mention" data-id="user:d86b5c10-db43-4021-86b2-6c27df7819b0"></span>`. `data-label` and inner text will be automatically set and the user will receive a notification. - Ignoring html tag, the content must be at most `3000`

## Response `201`

Note has been created in the case

**ℹ️ Click to see full payload**

- Note
  - `id` string, uuid, required
  - `case_id` string, uuid, required — Note's case id
  - `content` string, required — HTML content
  - `comments` NoteComment[], required — Maximum of 50 comments per note.
    - `id` string, uuid, required
    - `note_id` string, uuid, required — Comment's note id
    - `content` string, required — HTML content
    - `author` NestedUser, required
      - `id` string, uuid, required
      - `first_name` string, required
      - `last_name` string, required
      - `email` string, email, required
    - `author_type` 'user' | 'api', required
    - `created_at` string, date-time, required — Creation date Date time in format [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) (`yyyy-MM-ddTHH:mm:ss.S+X` eg `2023-01-31T13:30:00.000Z`)
    - `updated_at` string, date-time, required — Update date Date time in format [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) (`yyyy-MM-ddTHH:mm:ss.S+X` eg `2023-01-31T13:30:00.000Z`)
  - `author` NestedUser, required
    - `id` string, uuid, required
    - `first_name` string, required
    - `last_name` string, required
    - `email` string, email, required
  - `author_type` 'user' | 'api', required
  - `created_at` string, date-time, required — Creation date Date time in format [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) (`yyyy-MM-ddTHH:mm:ss.S+X` eg `2023-01-31T13:30:00.000Z`)
  - `updated_at` string, date-time, required — Update date Date time in format [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) (`yyyy-MM-ddTHH:mm:ss.S+X` eg `2023-01-31T13:30:00.000Z`)

## Other responses

- `400` — The request is either malformed or contain invalid parameters. - Make sure the identifier specified in the URL is a valid UUID - Make sure the body payload matches the expected schema - Maximum items reached (default: 25). Contact us at support@dotfile.com if you need more items.
- `404` — No case can be found.

---

[API](https://skmtc.dev/dotfile/apis/api-specifications.md) · [All operations](https://skmtc.dev/dotfile/apis/api-specifications/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dotfile/api-specifications/revisions/36393567057b/schema)
