# 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                        |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.ivvy.com/crm/add-or-update-lead-note.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
