# Notes

### Notes#**create**

Creates a new note.&#x20;

```
POST /notes
```

You should pass a JSON with the following parameters ( **matter\_id** or **client\_id** is required):

* `matter_id string`
* `client_id string`
* `title string`
* `content string`

```
{
    "matter_id": "1",
    "title": "request photos",
    "content": "ask for the missing pictures"
}
```

**Response:**

```
{
    "id": 1,
    "content": "ask for the missing pictures",
    "category": "All Notes",
    "firm_id": 1,
    "matter_id": null,
    "assignee_id": null,
    "created_at": "2024-12-24",
    "updated_at": "2024-12-24T14:20:23.770Z",
    "created_by_id": 1,
    "client_id": 1,
    "created_by_migration": null,
    "title": "request photos",
    "date": "2024-12-24T14:20:23.769Z",
    "discarded_at": null,
    "starred": false,
    "author_name": null,
    "note_category_id": null,
    "client_name": "John Doe",
    "assignee_names": "@Jane Doe",
    "created_by_name": "Jane Doe",
    "assignee_user_ids": [
        1
    ],
    "note_category": {
        "id": null,
        "name": "All Notes",
        "firm_id": null,
        "created_at": null,
        "updated_at": null
    }
}
```

Returns a 201 created.&#x20;

### Notes#**update**

Updates a note.&#x20;

```
PUT /notes/:id
```

You should pass a JSON with the following parameters ( **matter\_id** or **client\_id** is required):

* `matter_id string`
* `client_id string`
* `title string`
* `content string`

```
{
    "matter_id": "1",
    "title": "updated title",
    "content": "updated content"
}
```

**Response:**

```
{
    "success": "Note updated successfully."
}
```

Returns a 200 OK.&#x20;

### Notes#destroy

Destroys an existing note.

```
DELETE /notes/:id
```

**Response:**

Returns a 200 OK.&#x20;



