Skip to main content

Add a note to a conversation

Add an internal note to a conversation. Notes are only visible to your team in the live chat: they are never sent to the contact.

The note is written by the user who owns the API key, and the live chat labels it as sent via API. It doesn't mark the conversation as read for anybody.

Mentions​

Mention users of your account to let them know about the note: they get a notification and find the conversation under the Mentions filter of the live chat.

  1. List their UUIDs in mentions. Get them from List Account Users. You can only mention active users of your account who can open the conversation: admins, users the conversation's number is shared with, and users the conversation is assigned to, directly or through one of their teams.
  2. Write each UUID in text where the mention should go. The live chat shows the user's name there.

A mentioned UUID that doesn't appear in text is added at the beginning of the note.

Endpoint​

POST https://api.p.2chat.io/open/conversations/<session-key>/notes
  • <session-key> is the session_key of the conversation, e.g. WA-WAN8fd3442f-e111-4fed-9323-1824fd7546c9-14085550176. See where to get it.

Authentication​

Include your API key in the X-User-API-Key header. Learn more about authentication.

Body​

FieldTypeRequiredDescription
textstringYesThe note. Up to 2000 characters. Plain text: HTML is shown as typed.
mentionsarray of stringsNoUUIDs of the users to mention, up to 20. They must be able to open the conversation. See mentions.

Invocation​

curl --location --request POST 'https://api.p.2chat.io/open/conversations/WA-WAN8fd3442f-e111-4fed-9323-1824fd7546c9-14085550176/notes' \
--header 'X-User-API-Key: your_api_key_here' \
--header 'Content-Type: application/json' \
--data-raw '{
"text": "The customer asked for an invoice. USR4f1c8a73-2e91-4d6b-9c44-1a72bfe0d521 can you send it?",
"mentions": [
"USR4f1c8a73-2e91-4d6b-9c44-1a72bfe0d521"
]
}'

Response​

Success (HTTP 201 Created)​

{
"success": true,
"data": {
"uuid": "MSG1e9a6c34-77b2-4c0f-9a5e-3f2d8b6e1c90",
"session_key": "WA-WAN8fd3442f-e111-4fed-9323-1824fd7546c9-14085550176",
"text": "The customer asked for an invoice. USR4f1c8a73-2e91-4d6b-9c44-1a72bfe0d521 can you send it?",
"author": {
"uuid": "USRb2d7e6c0-5f3a-4811-87ce-c9d208a1f4e2",
"name": "Grace Hopper"
},
"mentions": [
{
"uuid": "USR4f1c8a73-2e91-4d6b-9c44-1a72bfe0d521",
"name": "Ada Lovelace"
}
],
"created_at": "2026-11-09T18:42:10Z"
}
}
FieldDescription
data.uuidUUID of the note
data.session_keyThe conversation the note was added to
data.textThe note as stored, with the mentioned UUIDs that weren't in text added at the beginning
data.authorThe user who owns the API key (uuid, name)
data.mentionsThe mentioned users (uuid, name)
data.created_atWhen the note was created, in UTC

Error​

{
"success": false,
"error": true,
"error_message": "Description of what went wrong"
}
HTTP statusWhen
400text is empty or longer than 2000 characters, there are more than 20 mentions, or a mentioned UUID isn't an active user of your account or can't open the conversation. The message lists those UUIDs
401The API key is missing or invalid
403The user who owns the API key can't open this conversation. See permissions
404There is no conversation with that session_key in your account
422text is missing from the body