Update Message
gorgias_update_messageUpdate a specific message within a Gorgias ticket by providing ticket ID, message ID, channel, sender type, and source. Use action parameter to force, retry, or cancel failed external actions.
Instructions
PUT /api/tickets/{ticket_id}/messages/{id} — Update an existing ticket message. channel, from_agent, and via are required. Returns 202 Accepted with the full updated TicketMessage object. Use the action query param to handle recovery from failed external actions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The ID of the message to update | |
| via | Yes | How the message was received or sent from Gorgias | |
| meta | No | Custom structured metadata | |
| action | No | Policy for failed external actions: 'force' bypasses and continues, 'retry' retries the failed action, 'cancel' deletes the message | |
| public | No | Whether the message is visible to customers. Set to false for internal notes. | |
| sender | No | The person who sent the message (user or customer). Object with id (integer) and/or email (string). Example: {"id": 93} | |
| source | No | Routing information for the message. Object with fields: type (string, e.g. 'email'), from ({address, name}), to ([{address, name}]), cc ([{address, name}]), bcc ([{address, name}]). Example: {"type": "email", "from": {"address": "sender@example.com", "name": "Sender Doe"}, "to": [{"address": "receiver@example.com", "name": "Receiver Doe"}]} | |
| channel | Yes | The channel used to send the message | |
| headers | No | Message headers as key-value pairs (primarily for email) | |
| subject | No | The subject line of the message | |
| receiver | No | The primary receiver of the message (user or customer). Optional for internal notes. Object with id (integer) and/or email (string). Example: {"id": 8} or {"email": "john@example.com"} | |
| body_html | No | The full HTML version of the message body | |
| body_text | No | The full plain-text version of the message body | |
| ticket_id | Yes | The ID of the ticket associated with the message | |
| from_agent | Yes | true if the message was sent by your company (agent), false if sent by a customer | |
| message_id | No | ID of the message on the originating service (email ID, Messenger message ID, etc.) | |
| attachments | No | List of file attachments. Each item: url (required), content_type (required), name (required), size (integer|null), public (boolean), extra (object). | |
| external_id | No | ID of the message in a foreign system (Aircall, Zendesk, etc.) | |
| mention_ids | No | List of User IDs to mention in an internal note | |
| sent_datetime | No | ISO 8601 datetime when the message was sent. If omitted, Gorgias manages the send lifecycle. | |
| integration_id | No | ID of the integration used to send the message | |
| failed_datetime | No | ISO 8601 datetime when the message failed to be sent |