# Add or Update Lead Note

## Add or Update note which belongs to lead

<mark style="color:green;">`POST`</mark> `[PlatformAddress]/api/1.0/crm?action=addOrUpdateLeadNote`

#### Path Parameters

| Name   | Type    | Description                                         |
| ------ | ------- | --------------------------------------------------- |
| id     | integer | The unique id of the note                           |
| leadId | integer | The unique id of the lead to which the note belongs |
| note   | string  | The description of the note.                        |

{% tabs %}
{% tab title="200 " %}

```
{
  "success": true,
  "id": 755
}
```

{% endtab %}
{% endtabs %}

## Example Request

### Add Note

```javascript
{
  "leadId": 10,
  "note": "test note",
}
```

### Update Note

```javascript
{
  "id": 3269,
  "leadId": 10,
  "note": "test note",
}
```

## Returns

| Property | Description                               |
| -------- | ----------------------------------------- |
| success  | Whether or not the note was added/updated |
| id       | The unique id of the note                 |

## Throws

| Code                 | Description                         |
| -------------------- | ----------------------------------- |
| Specific Code: 24441 | The lead/opportunity does not exist |
| Specific Code: 24434 | The note does not exist             |
| Specific Code: 24435 | An error has occured                |
| Specific Code: 24436 | The request contains invalid        |
| Specific Code: 24437 | Invalid Data                        |
