Skip to main content
PATCH
Update a message

Authorizations

Authorization
string
header
required

A project API key, created in the dashboard.

Path Parameters

conversation
string
required

ID of the conversation.

message
string
required

ID of the message.

Body

application/json
rating
enum<string> | null
required

null clears the rating.

Available options:
positive,
negative,
null

Response

The updated message.

object
any
required
id
string
required
conversation_id
string
required
author
object
required

Who sent the message.

type
enum<string>
required

buttons, carousel, form, booking, csat_survey, end_chat, email_prompt, contact_card, and action messages have details in data. action messages record what an AI agent's actions did, such as HTTP requests and integrations, and a chatbot's handoffs to the team. Only the team sees them. carousel and contact_card messages come from chatbots. A chatbot's image, video, audio, and document messages include the file's url in data. Other types come from other channels and only have text. Files of any type are in attachments.

Available options:
text,
buttons,
carousel,
form,
booking,
csat_survey,
end_chat,
email_prompt,
action,
contact_card,
attachment,
image,
video,
audio,
document,
sticker,
other
text
string | null
required

The message text, in Markdown. AI replies don't include inline citation markers; their sources are in data. null for messages with only data.

data
object
required

Details of the message, depending on its type. text messages from the agent include their sources. null for other text messages and for an AI agent's media messages.

attachments
object[]
required

Files sent with the message, in order. A caption is the message's text.

is_note
boolean
required

Whether the message is an internal note, which the user never sees.

sent_by_website
boolean
required

Whether the website sent this user message with window.Chatling.sendMessage(), rather than the user typing it.

is_hidden
boolean
required

Whether the website sent this message with hidden: true. The AI agent receives hidden messages, but the user never sees them.

rating
enum<string> | null
required

The rating of an AI-written answer, given by the user in the widget or set with Update a message. Always null for other messages.

Available options:
positive,
negative,
null
created_at
string<date-time> | null
required