v1

latestOpenAPI 3.1.02026-07-24111290748.0 KB
Ticket Messages

Retrieve a message

get/api/tickets/{ticket_id}/messages/{id}

Path parameters

ticket_idinteger required

The ID of the ticket associated with the message.

idinteger required

The ID of the message to retrieve.

Response

The requested message.

idinteger required

ID of the message.

uristring required

URI of the message.

message_idstring required

ID of the message on the service that sent the message.It can be the ID of an email, a Messenger message, a Facebook comment, etc...

ticket_idinteger required

The ID of the ticket the message is associated with.

external_idstring required

ID of the message in a foreign system (Aircall, Zendesk, etc...). This field is not used by Gorgias, feel free to set it as you wish.

publicboolean

Whether the message was sent/receive by a customer. Internal notes are not public.

via'aircall' | 'api' | 'chat' | 'contact_form' | 'email' | 'facebook' | 'facebook-mention' | 'facebook-messenger' | 'facebook-recommendations' | 'form' | 'gorgias_chat' | 'help-center' | 'helpdesk' | 'instagram' | 'instagram-ad-comment' | 'instagram-comment' | 'instagram-direct-message' | 'instagram-mention' | 'internal-note' | 'offline_capture' | 'phone' | 'rule' | 'self_service' | 'shopify' | 'sms' | 'twilio' | 'twitter' | 'twitter-direct-message' | 'whatsapp' | 'yotpo' | 'yotpo-review' | 'zendesk' required
integration_idinteger required

ID of the integration that either received or sent the message.

rule_idinteger required

ID of the rule which sent the message, if any.

from_agentboolean required

Whether the message was sent by your company to a customer, or the opposite.

subjectstring required

The subject of the message.

body_textstring required

The full text version of the body of the message, if any.

body_htmlstring required

The full HTML version of the body of the message, if any.

stripped_textstring required

The text version of the body of the message without email signatures and previous replies.

stripped_htmlstring required

The HTML version of the body of the message without email signatures and previous replies.

stripped_signaturestring required
actionsobject[] required

A list of actions executed before the message was sent. These actions are set by macros.

headersobject

Message headers. Used for email messages.

importedboolean required

Whether the message was created by a historical import.

{"stackTrail":"components:schemas:TicketMessage:properties:meta","oasType":"schema","type":"unknown","title":"meta","description":"Metadata associated with the message.\n\nYou can use this field to store structured information (key-value data) about the message.\n\nReserved keys:\n\n- `current_page`: The page from where the user is currently chatting.\n- `relevant_content_indexes`: Indexes containing relevant text of the message.\n- `is_quick_reply`: Whether the message is a \"quick reply\".\n- `campaigns`: ID of the chat campaign the message is replying to.\n- `campaigns_id`: ID of the chat campaign that sent this message.\n- `self_service_flow`: An object containing metadata of the self-service flow associated to the message.\n","example":{}}
created_datetimestring date-time required

When the message was created.

processed_datetimestring date-time required

When the message was processed by Gorgias. Differs from created_datetime which refers to the external service.

deleted_datetimestring date-time

When the message was deleted.

sent_datetimestring date-time required

When the message was sent. If omitted, the message will be sent by Gorgias.

failed_datetimestring date-time required

When the message failed to be sent. Messages that couldn't be sent can be resend.

opened_datetimestring date-time required

When the message was opened by the primary receiver.

is_retriableboolean required

It determines if the message can be retried or not.

Example response

{
  "id": 924712,
  "message_id": "<123345676453.2445.234@web>",
  "ticket_id": 12,
  "external_id": "MSG-78545",
  "public": true,
  "integration_id": 28643,
  "intents": [
    {
      "name": "discount/request"
    }
  ],
  "rule_id": 89465,
  "from_agent": true,
  "subject": "Re:Refund request",
  "body_text": "Hello,\n\n        I can't place an order on your site, it says: I don't have enough credit.\n        How can I add some credits?\n\n        Cheers,\n        John Doe\n        ",
  "body_html": "Hello,<br><br>\n\n            I can't place an order on your site, it says: I don't have enough credit.<br>\n            How can I add some credits?<br><br>\n\n            Cheers,<br>\n            John Doe\n            ",
  "attachments": [],
  "macros": [],
  "actions": [],
  "headers": {
    "My-Header": "foo"
  },
  "meta": {},
  "created_datetime": "2020-01-27T10:42:21.468912",
  "processed_datetime": "2020-01-27T10:42:21.468912",
  "deleted_datetime": "2020-01-27T10:42:21.468912",
  "opened_datetime": "2019-07-05T15:22:46.472436",
  "replied_by": {
    "integration_id": 28643,
    "created_datetime": "2020-01-27T10:42:21.468912",
    "body_text": "Hello,\n\n        I can't place an order on your site, it says: I don't have enough credit.\n        How can I add some credits?\n\n        Cheers,\n        John Doe\n        "
  },
  "replied_to": {
    "integration_id": 28643,
    "created_datetime": "2020-01-27T10:42:21.468912",
    "body_text": "Hello,\n\n        I can't place an order on your site, it says: I don't have enough credit.\n        How can I add some credits?\n\n        Cheers,\n        John Doe\n        "
  }
}