# Write a note

Source: https://amanucci.com/docs/developers/api/cases/writeNote

## POST /v1/entities/{entityId}/notes

Write a note

Write, revise or retire a note on one client's books, in the person's own words. In a firm hat it is the firm's note about the client (`audience` `firm` by default, or `shared`); in the owner's hat it is the owner's, always `shared`. A revision names the note it replaces; a retirement is a revision with no body. Kept as written: a new version, never an edit.

Operation ID: `writeNote`

### Parameters

```json
[
  {
    "schema": {
      "type": "string",
      "format": "uuid"
    },
    "required": true,
    "name": "entityId",
    "in": "path"
  }
]
```

### Request body

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/WriteNote"
      }
    }
  }
}
```

### Responses

#### 200 Duplicate-ok: this id already named this person's note, which is unchanged.

```json
{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/NoteReceipt"
    }
  }
}
```

#### 201 The note, kept.

```json
{
  "application/json": {
    "schema": {
      "$ref": "#/components/schemas/NoteReceipt"
    }
  }
}
```

#### 401 Dead or absent credential (`unauthenticated`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 403 Authenticated, present, and refused: a missing grant, a missing seat, or a missing step-up.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 404 Absent, or hidden from this asker — the two are indistinguishable (`not-found`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 422 The request did not satisfy the schema (`invalid-input`).

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 429 Too many requests on this door's bucket (`rate-limited`); refused before any handler ran, `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```

#### 503 Temporarily unavailable; `Retry-After` says when to come back.

```json
{
  "application/problem+json": {
    "schema": {
      "$ref": "#/components/schemas/Problem"
    }
  }
}
```
