Source: https://leadping.ai/docs/api-reference/events/updates-an-internal-note-authored-by-the-current-user

# Updates an internal note authored by the current user.

The event table row.

## Endpoint

```http
PUT https://api.leadping.ai/events/conversations/{conversationId}/notes/{eventId}
```

## Request examples

### cURL

```bash
curl --request PUT \
  --url https://api.leadping.ai/events/conversations/{conversationId}/notes/{eventId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "text": "<string>"
}'
```

### Python

```python
import requests

url = "https://api.leadping.ai/events/conversations/{conversationId}/notes/{eventId}"

payload = { "text": "<string>" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://api.leadping.ai/events/conversations/{conversationId}/notes/{eventId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n  \"text\": \"<string>\"\n}", false);
var response = await client.PutAsync(request);

Console.WriteLine("{0}", response.Content);
```

### Java

```java
HttpResponse<String> response = Unirest.put("https://api.leadping.ai/events/conversations/{conversationId}/notes/{eventId}")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"text\": \"<string>\"\n}")
  .asString();
```

### JavaScript

```javascript
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({text: '<string>'})
};

fetch('https://api.leadping.ai/events/conversations/{conversationId}/notes/{eventId}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Go

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.leadping.ai/events/conversations/{conversationId}/notes/{eventId}"

	payload := strings.NewReader("{\n  \"text\": \"<string>\"\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### PHP

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.leadping.ai/events/conversations/{conversationId}/notes/{eventId}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => json_encode([
    'text' => '<string>'
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

## Authorizations

### Authorization

- **Type:** `string`
- **Location:** Header
- **Required:** Yes
- **Description:** Authorization header using the Bearer scheme. Accepted values are Leadping user JWT access tokens and WorkOS organization API keys beginning with `sk_`.

## Path parameters

### `conversationId`

- **Type:** `string`
- **Required:** Yes
- **Description:** The conversation identifier.

### `eventId`

- **Type:** `string`
- **Required:** Yes
- **Description:** The note event identifier.

## Request body

**Content types:**

- `application/json`
- `application/*+json`

The replacement note content.

Defines the input used for create note.

### `text`

- **Type:** `string`
- **Required:** Yes
- **Description:** Plain-text note content to add to the conversation timeline.

Example request body:

```json
{
  "text": "<string>"
}
```

## Response

### `200` — Success

The request completed successfully.

Content type: `application/json`

Summarizes event timeline data in paginated and searchable results.

Example response:

```json
{
  "canEditNote": true,
  "noteEdited": true,
  "tags": [
    {
      "id": "<string>",
      "name": "<string>",
      "normalizedName": "<string>",
      "color": "<string>"
    }
  ],
  "durationSeconds": 123,
  "voicemailUrl": "<string>",
  "isDemo": true,
  "id": "<string>",
  "eventType": "<string>",
  "eventCategory": "<string>",
  "timelineType": "Message",
  "timelineCategory": "<string>",
  "description": "<string>",
  "conversationId": "<string>",
  "leadId": "<string>",
  "relatedEntityType": "<string>",
  "relatedEntityId": "<string>",
  "automationRunId": "<string>",
  "summary": "<string>",
  "media": [
    {
      "fileId": "<string>",
      "url": "<string>",
      "contentType": "<string>",
      "size": 123,
      "sha256": "<string>",
      "fileName": "<string>"
    }
  ],
  "direction": "<string>",
  "status": "Pending",
  "statusReason": "<string>",
  "trafficType": "RealLead",
  "fromPhoneNumberId": "<string>",
  "outboundPhoneNumberId": "<string>",
  "fromPhoneNumber": "<string>",
  "toPhoneNumber": "<string>",
  "selectionReason": "NearestLocation",
  "wasManuallyOverridden": true,
  "campaignId": "<string>",
  "sourceId": "<string>",
  "complianceAction": "<string>",
  "billingStatus": "<string>",
  "billableAmount": 123,
  "errorCode": "<string>",
  "retryCount": 123,
  "queuedAt": "2023-11-07T05:31:56Z",
  "sendingStartedAt": "2023-11-07T05:31:56Z",
  "sentAt": "2023-11-07T05:31:56Z",
  "deliveredAt": "2023-11-07T05:31:56Z",
  "receivedAt": "2023-11-07T05:31:56Z",
  "failedAt": "2023-11-07T05:31:56Z",
  "undeliverableAt": "2023-11-07T05:31:56Z",
  "blockedAt": "2023-11-07T05:31:56Z",
  "nextRetryAt": "2023-11-07T05:31:56Z",
  "scheduledFor": "2023-11-07T05:31:56Z",
  "scheduledReason": "<string>",
  "canceledAt": "2023-11-07T05:31:56Z",
  "cancelReason": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "createdBy": "<string>",
  "actorUserId": "<string>",
  "actorLeadId": "<string>",
  "actorDisplayName": "<string>",
  "actorEmail": "jsmith@example.com"
}
```

### Response properties

| Property | Type | Description |
|---|---|---|
| `canEditNote` | `boolean` | Whether the current user authored this editable note. |
| `noteEdited` | `boolean` | Whether the note has been edited. |
| `tags` | `object[]` | Tags affected by this event, including their display colors. |
| `durationSeconds` | `null \| integer<int32>` | Confirmed call talk time in seconds, when available. |
| `voicemailUrl` | `null \| string<uri>` | Playable recording URL for voicemail events. |
| `isDemo` | `boolean` | Whether this record belongs to demo data. |
| `id` | `string` | Unique Leadping identifier for this event timeline table row. |
| `eventType` | `string` | Event type used to classify this timeline, SMS, call, or automation event. |
| `eventCategory` | `null \| string` | High-level category used to group this Leadping event. |
| `timelineType` | `enum<string>` | Classifies the kind of activity displayed in a lead or conversation event timeline. |
| `timelineCategory` | `string` | Timeline category used to group events for display and filtering. |
| `description` | `string` | Human-readable description that explains this event timeline table row to API users. |
| `conversationId` | `null \| string` | Conversation ID that links this event timeline table row to the Leadping inbox thread. |
| `leadId` | `null \| string` | Lead ID associated with this timeline event. |
| `relatedEntityType` | `null \| string` | Related entity type connected to this event or notification. |
| `relatedEntityId` | `null \| string` | Related entity ID connected to this event or notification. |
| `automationRunId` | `null \| string` | Automation run ID opened from this automation event. |
| `summary` | `null \| string` | Short human-readable summary of this event timeline table row for lists, timelines, and notifications. |
| `media` | `object[]` | Media attached to an MMS timeline event. |
| `direction` | `null \| string` | Communication direction for this event timeline table row, such as inbound or outbound. |
| `status` | `null \| enum<string>` | Provides the customer-facing outcome shown for an item in a lead or conversation timeline. |
| `statusReason` | `null \| string` | Human-readable reason explaining the current status of this event timeline table row. |
| `trafficType` | `null \| enum<string>` | Classifies messaging traffic by conversational, informational, marketing, or other compliance-relevant purpose. |
| `fromPhoneNumberId` | `null \| string` | Sender phone number ID used for this outbound SMS or call. |
| `outboundPhoneNumberId` | `null \| string` | Phone number ID selected for outbound delivery. |
| `fromPhoneNumber` | `null \| string` | Sender phone number used for this communication. |
| `toPhoneNumber` | `null \| string` | Recipient phone number used for this communication. |
| `selectionReason` | `null \| enum<string>` | Explains why Leadping selected, rejected, or substituted an outgoing caller or messaging number. |
| `wasManuallyOverridden` | `boolean` | Indicates whether a user manually overrode Leadping's automatic number selection for this event timeline table row. |
| `campaignId` | `null \| string` | Messaging campaign identifier associated with this event timeline table row. |
| `sourceId` | `null \| string` | Lead source ID used for event attribution. |
| `complianceAction` | `null \| string` | Compliance action applied to this message, lead, or sender. |
| `billingStatus` | `null \| string` | Billing state for this communication, charge, or transaction. |
| `billableAmount` | `null \| number<double>` | Monetary amount billed for this Leadping communication or transaction. |
| `errorCode` | `null \| string` | Machine-readable error code returned while processing this event timeline table row. |
| `retryCount` | `integer<int32>` | Number of retry attempts already made for this event timeline table row. |
| `queuedAt` | `null \| string<date-time>` | UTC timestamp when Leadping queued this event timeline table row for processing. |
| `sendingStartedAt` | `null \| string<date-time>` | UTC timestamp when Leadping began sending this message. |
| `sentAt` | `null \| string<date-time>` | UTC timestamp when Leadping sent this message to the provider. |
| `deliveredAt` | `null \| string<date-time>` | UTC timestamp when the provider confirmed delivery. |
| `receivedAt` | `null \| string<date-time>` | UTC timestamp when Leadping received this inbound event or message. |
| `failedAt` | `null \| string<date-time>` | UTC timestamp when processing failed for this event timeline table row. |
| `undeliverableAt` | `null \| string<date-time>` | UTC timestamp when the provider marked the message undeliverable. |
| `blockedAt` | `null \| string<date-time>` | UTC timestamp when Leadping blocked this communication. |
| `nextRetryAt` | `null \| string<date-time>` | UTC timestamp when Leadping will retry this event timeline table row. |
| `scheduledFor` | `null \| string<date-time>` | UTC timestamp when the related delivery or workflow action is scheduled to run. |
| `scheduledReason` | `null \| string` | Reason Leadping scheduled this delivery for a later time. |
| `canceledAt` | `null \| string<date-time>` | UTC timestamp when this delivery or workflow was canceled. |
| `cancelReason` | `null \| string` | Reason this delivery, run, or request was canceled. |
| `createdAt` | `string<date-time>` | UTC timestamp when this event timeline table row was created. |
| `createdBy` | `string` | Display name or identifier for the person or system that created this event timeline table row. |
| `actorUserId` | `null \| string` | User ID for the person or system that created this event timeline table row. |
| `actorLeadId` | `null \| string` | The lead who performed this action. |
| `actorDisplayName` | `null \| string` | Display name for the person or system that created this event timeline table row. |
| `actorEmail` | `null \| string<email>` | Email address for the person who created this event timeline table row. |

#### `tags` item properties

| Property | Type | Description |
|---|---|---|
| `id` | `string` | Unique Leadping identifier for this tag summary. |
| `name` | `string` | Display name for this tag summary in the Leadping API. |
| `normalizedName` | `string` | Normalized name used for case-insensitive tag matching and deduplication. |
| `color` | `null \| string` | Hex color used to display this tag or status in Leadping clients. |

#### `media` item properties

| Property | Type | Description |
|---|---|---|
| `fileId` | `null \| string` | The durable Media record containing this attachment's scanned bytes. |
| `url` | `string<uri>` | URL from which the media attachment can be retrieved. |
| `contentType` | `null \| string` | MIME content type of the media attachment. |
| `size` | `null \| integer<int64>` | Size of the media attachment in bytes. |
| `sha256` | `null \| string` | SHA-256 digest of the media content, when available. |
| `fileName` | `null \| string` | Original file name of the media attachment, when available. |

#### Enum values

`timelineType`:

- `Message`
- `Sms`
- `Mms`
- `Call`
- `Voicemail`
- `Note`
- `LeadStatusChange`
- `LeadCreated`
- `Appointment`
- `LeadUpdated`
- `Notification`
- `Payment`
- `Warmup`

`status`:

- `Pending`
- `InProgress`
- `Completed`
- `Cancelled`
- `Scheduled`
- `Queued`
- `Sending`
- `Sent`
- `Received`
- `Delivered`
- `Undeliverable`
- `Opted out`
- `Blocked`
- `Initiated`
- `Ringing`
- `Active`
- `Ended`
- `Missed`
- `Voicemail`
- `Failed`
- `Canceled`

`trafficType`:

- `RealLead`
- `Warmup`
- `Test`
- `SystemInternal`
- `FailedAttempt`

`selectionReason`:

- `NearestLocation`
- `StickyConversation`
- `LeadAssigned`
- `CampaignOrSource`
- `Preferred`
- `LocalArea`
- `HealthyPool`
- `FallbackDefault`
- `ManualOverride`

### `400` — Bad Request

The request contains invalid values or fails validation.

```json
{
  "type": "about:blank",
  "title": "Bad Request",
  "status": 400,
  "detail": "The request could not be completed."
}
```

### `401` — Unauthorized

Authentication credentials are missing or invalid.

Response header:

- `WWW-Authenticate`: Bearer authentication challenge returned when credentials are missing or invalid.

```json
{
  "type": "about:blank",
  "title": "Unauthorized",
  "status": 401,
  "detail": "The request could not be completed."
}
```

### `403` — Forbidden

The caller does not have permission to perform this operation.

```json
{
  "type": "about:blank",
  "title": "Forbidden",
  "status": 403,
  "detail": "The request could not be completed."
}
```

### `415` — Request Failed

The request content type is not supported.

```json
{
  "type": "about:blank",
  "title": "Request Failed",
  "status": 415,
  "detail": "The request could not be completed."
}
```

### `429` — Too Many Requests

The API rate limit for this account or client has been exceeded.

Response header:

- `Retry-After`: Number of seconds to wait before retrying the request.

```json
{
  "type": "about:blank",
  "title": "Too Many Requests",
  "status": 429,
  "detail": "The request could not be completed."
}
```

## Related endpoints

- Previous: [Add a note to a conversation](https://leadping.ai/docs/api-reference/events/add-a-note-to-a-conversation)
- Next: [List current-user lead SMS event history](https://leadping.ai/docs/api-reference/smsevents/list-current-user-lead-sms-event-history)
