Skip to main content
PUT
Update OpenAiChatMessage
Updates an existing OpenAiChatMessage record. You must include the Id of the record to update along with all required fields.

Authentication

This endpoint requires OAuth2 authentication. Include a valid bearer token in the Authorization header. The authenticated user must be a full unrestricted administrator or have the OpenAiChatMessage-Edit role.

Enums

Request Body

Required Fields

integer
required
The Id of the OpenAiChatMessage record to update.
integer
required
ID of the location that owns this message, inherited from its conversation..
integer
required
What this message was, beyond its role: Operator for ordinary AI or operator turns; OutboundCoworkerMessage and OutboundHelpDesk for AI replies delivered as a customer message or a help desk ticket; InboundCoworkerReply and InboundHelpDeskReply for the customer answering through those channels. Use it with the CoworkerMessage, HelpDeskMessage and HelpDeskComment links to show where a turn actually happened..
string
required
Message body. User and assistant turns hold the text shown to people, in Markdown or HTML depending on channel; Tool turns hold a serialised tool result, and the assistant turn that requests tools holds a JSON array of tool calls rather than prose..

Optional Fields

integer
ID of the platform user this message is attributed to. Set for messages exchanged inside an authenticated session; empty for anonymous web-chat and inbound email or WhatsApp contacts..
integer
ID of the conversation this message belongs to. Filter on it to read one conversation’s transcript in order..
integer
ID of the customer message this turn was delivered as or came from, when the AI replied over the CoworkerMessage channel..
integer
ID of the help desk ticket this turn created or belongs to, set when the conversation was escalated to the help desk..
integer
ID of the help desk comment this turn came from, set when the customer or an operator replied on the escalated ticket..

Code Examples

Response

200

integer
HTTP status code. 200 on success.
string
A human-readable message confirming the update.
object
Contains the Id of the updated record.
boolean
true if the openaichatmessage was updated successfully.
array
null on success.
Example Response

400

string
A summary of the validation error(s), in the format PropertyName: error message.
any
null on validation failure.
object[]
Array of validation errors.
boolean
false when the request fails validation.
Example Response