---
updatedAt: 2026-05-27T14:34:06.000Z
agentTools:
  projectIndex: https://developers.gorgias.com/llms.txt
---

# List messages of a ticket

List all messages of a ticket, ordered by their sending date, with the oldest messages first.<br> <span style={{color: 'red'}}>This endpoint has been deprecated.</span> Use [list messages](/reference/list-messages) endpoint instead.


# OpenAPI definition

```json
{
  "security": [
    {
      "basicAuth": []
    }
  ],
  "info": {
    "description": "The Gorgias REST API. Please go to https://developers.gorgias.com for more details.",
    "title": "Gorgias REST API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://{domain}.gorgias.com",
      "variables": {
        "domain": {
          "default": "your-domain"
        }
      }
    }
  ],
  "x-readme": {
    "proxy-enabled": false
  },
  "paths": {
    "/api/tickets/{ticket_id}/messages": {
      "get": {
        "summary": "List messages of a ticket",
        "operationId": "list-ticket-messages",
        "deprecated": true,
        "description": "List all messages of a ticket, ordered by their sending date, with the oldest messages first.<br> <span style={{color: 'red'}}>This endpoint has been deprecated.</span> Use [list messages](/reference/list-messages) endpoint instead.\n",
        "parameters": [
          {
            "in": "path",
            "name": "ticket_id",
            "schema": {
              "type": "integer"
            },
            "required": true,
            "description": "The ID of the ticket to get the messages from."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of messages.",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "object": {
                      "title": "object",
                      "type": "string"
                    },
                    "uri": {
                      "title": "uri",
                      "type": "string"
                    },
                    "data": {
                      "items": {
                        "$ref": "#/components/schemas/TicketMessage"
                      },
                      "title": "data",
                      "type": "array"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CursorPaginationMeta"
                    }
                  },
                  "required": [
                    "object",
                    "uri",
                    "data",
                    "meta"
                  ],
                  "title": "paginated data",
                  "type": "object"
                }
              }
            }
          },
          "301": {
            "description": "Ticket was merged into another one."
          }
        },
        "tags": [
          "Ticket Messages"
        ]
      }
    }
  },
  "tags": [
    {
      "name": "Ticket Messages"
    }
  ],
  "openapi": "3.1.0",
  "components": {
    "schemas": {
      "LegacyChannelSlug": {
        "enum": [
          "aircall",
          "api",
          "chat",
          "contact_form",
          "email",
          "facebook",
          "facebook-mention",
          "facebook-messenger",
          "facebook-recommendations",
          "help-center",
          "instagram-ad-comment",
          "instagram-comment",
          "instagram-direct-message",
          "instagram-mention",
          "internal-note",
          "phone",
          "sms",
          "twitter",
          "twitter-direct-message",
          "whatsapp",
          "yotpo-review"
        ],
        "title": "legacy channel slug",
        "type": "string"
      },
      "TicketVia": {
        "enum": [
          "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"
        ],
        "title": "ticket via",
        "type": "string"
      },
      "CursorPaginationMeta": {
        "additionalProperties": false,
        "properties": {
          "prev_cursor": {
            "title": "prev  cursor",
            "type": "string"
          },
          "next_cursor": {
            "title": "next  cursor",
            "type": "string"
          },
          "total_resources": {
            "title": "total  resources",
            "type": "integer"
          }
        },
        "required": [
          "prev_cursor",
          "next_cursor",
          "total_resources"
        ],
        "title": "cursor pagination meta",
        "type": "object"
      },
      "TicketMessage": {
        "additionalProperties": false,
        "description": "A ticket-message represents a message (an email, an SMS, a Facebook comment, chat message, etc..) under a normalized format.\nThere are 3 types of messages:\n  - Outgoing messages: messages sent by your company (by rules or support agents) to your customers.\n  - Incoming messages: messages sent by your [customers](#the-customer-object) to your company.\n  - Internal notes: internal messages sent between support agents ([users](#the-user-object)). Internal notes are not sent/shared with your customers.\n\nA ticket-message is associated with only one ticket.",
        "properties": {
          "id": {
            "description": "ID of the message.",
            "examples": [
              924712
            ],
            "title": "id",
            "type": "integer"
          },
          "uri": {
            "description": "URI of the message.",
            "title": "uri",
            "type": "string"
          },
          "message_id": {
            "description": "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...",
            "examples": [
              "<123345676453.2445.234@web>"
            ],
            "title": "message  id",
            "type": "string"
          },
          "ticket_id": {
            "description": "The ID of the ticket the message is associated with.",
            "examples": [
              12
            ],
            "title": "ticket  id",
            "type": "integer"
          },
          "external_id": {
            "description": "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.",
            "examples": [
              "MSG-78545"
            ],
            "title": "external  id",
            "type": "string"
          },
          "public": {
            "default": true,
            "description": "Whether the message was sent/receive by a customer. Internal notes are not public.",
            "examples": [
              true
            ],
            "title": "public",
            "type": "boolean"
          },
          "channel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LegacyChannelSlug"
              },
              {
                "type": "string"
              }
            ],
            "description": "The channel used to send the message.",
            "examples": [
              "email"
            ],
            "title": "channel"
          },
          "via": {
            "$ref": "#/components/schemas/TicketVia",
            "description": "How the message has been received, or sent from Gorgias.",
            "examples": [
              "api"
            ]
          },
          "source": {
            "description": "Information used to route the message. It contains the names and the addresses of the sender and receivers.",
            "examples": [
              {
                "from": {
                  "address": "sender@gorgias.io",
                  "id": 7,
                  "name": "Sender Doe"
                },
                "to": [
                  {
                    "address": "receiver@gorgias.io",
                    "id": 8,
                    "name": "Receiver Doe"
                  }
                ],
                "type": "email"
              }
            ],
            "$ref": "#/components/schemas/TicketMessageSource"
          },
          "sender": {
            "$ref": "#/components/schemas/TicketMessageUserOrCustomer",
            "description": "The person who sent the message. It can be a user or a customer.",
            "examples": [
              {
                "id": 93
              }
            ]
          },
          "auth_customer_identity": {
            "description": "Identity of the authenticated customer, if any, in the context of a message sent on a channel that does not require authentication such as email, SMS or Gorgias chat.This attribute is used to differentiate messages sent by unauthenticated and authenticated customers.",
            "$ref": "#/components/schemas/TicketMessageAuthCustomerIdentity"
          },
          "integration_id": {
            "description": "ID of the integration that either received or sent the message.",
            "examples": [
              28643
            ],
            "title": "integration  id",
            "type": "integer"
          },
          "intents": {
            "items": {
              "$ref": "#/components/schemas/TicketMessageIntent"
            },
            "title": "intents",
            "type": "array"
          },
          "rule_id": {
            "description": "ID of the rule which sent the message, if any.",
            "examples": [
              89465
            ],
            "title": "rule  id",
            "type": "integer"
          },
          "from_agent": {
            "description": "Whether the message was sent by your company to a customer, or the opposite.",
            "examples": [
              true
            ],
            "title": "from  agent",
            "type": "boolean"
          },
          "receiver": {
            "description": "The primary receiver of the message. It can be a user or a customer. Optional when the source type is \"internal-note\".",
            "examples": [
              {
                "id": 8
              }
            ],
            "$ref": "#/components/schemas/TicketMessageUserOrCustomer"
          },
          "subject": {
            "description": "The subject of the message.",
            "examples": [
              "Re:Refund request"
            ],
            "title": "subject",
            "type": "string"
          },
          "body_text": {
            "description": "The full text version of the body of the message, if any.",
            "examples": [
              "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        "
            ],
            "title": "body  text",
            "type": "string"
          },
          "body_html": {
            "description": "The full HTML version of the body of the message, if any.",
            "examples": [
              "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            "
            ],
            "title": "body  html",
            "type": "string"
          },
          "body_url": {
            "description": "The URL to download the archived body of the email message. Empty until the body is archived, 30 days after it was sent or received. Only applies to email messages that have stripped bodies.",
            "title": "body  url",
            "type": "string"
          },
          "stripped_text": {
            "description": "The text version of the body of the message without email signatures and previous replies.",
            "examples": [
              null
            ],
            "title": "stripped  text",
            "type": "string"
          },
          "stripped_html": {
            "description": "The HTML version of the body of the message without email signatures and previous replies.",
            "examples": [
              null
            ],
            "title": "stripped  html",
            "type": "string"
          },
          "stripped_signature": {
            "title": "stripped  signature",
            "type": "string"
          },
          "attachments": {
            "description": "A list of files attached to the message.",
            "examples": [
              []
            ],
            "title": "attachments",
            "items": {
              "$ref": "#/components/schemas/TicketMessageAttachment"
            },
            "type": "array"
          },
          "macros": {
            "description": "A list of macros.",
            "examples": [
              []
            ],
            "title": "macros",
            "items": {
              "$ref": "#/components/schemas/TicketMessageMacro"
            },
            "type": "array"
          },
          "actions": {
            "description": "A list of actions executed before the message was sent. These actions are set by macros.",
            "examples": [
              []
            ],
            "title": "actions",
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "headers": {
            "description": "Message headers. Used for email messages.",
            "examples": [
              {
                "My-Header": "foo"
              }
            ],
            "title": "headers",
            "type": "object"
          },
          "imported": {
            "description": "Whether the message was created by a historical import.",
            "examples": [
              false
            ],
            "title": "imported",
            "type": "boolean"
          },
          "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",
            "examples": [
              {}
            ],
            "title": "meta"
          },
          "created_datetime": {
            "description": "When the message was created.",
            "examples": [
              "2020-01-27T10:42:21.468912"
            ],
            "format": "date-time",
            "title": "created  datetime",
            "type": "string"
          },
          "processed_datetime": {
            "description": "When the message was processed by Gorgias. Differs from `created_datetime` which refers to the external service.",
            "examples": [
              "2020-01-27T10:42:21.468912"
            ],
            "title": "processed  datetime",
            "format": "date-time",
            "type": "string"
          },
          "deleted_datetime": {
            "description": "When the message was deleted.",
            "examples": [
              "2020-01-27T10:42:21.468912"
            ],
            "title": "deleted  datetime",
            "format": "date-time",
            "type": "string"
          },
          "sent_datetime": {
            "description": "When the message was sent. If omitted, the message will be sent by Gorgias.",
            "title": "sent  datetime",
            "format": "date-time",
            "type": "string"
          },
          "failed_datetime": {
            "description": "When the message failed to be sent. Messages that couldn't be sent can be resend.",
            "examples": [
              null
            ],
            "title": "failed  datetime",
            "format": "date-time",
            "type": "string"
          },
          "opened_datetime": {
            "description": "When the message was opened by the primary receiver.",
            "examples": [
              "2019-07-05T15:22:46.472436"
            ],
            "title": "opened  datetime",
            "format": "date-time",
            "type": "string"
          },
          "last_sending_error": {
            "description": "Details of the last error encountered when Gorgias attempted to send the message.",
            "examples": [
              null
            ],
            "$ref": "#/components/schemas/TicketMessageSendingError"
          },
          "is_retriable": {
            "description": "It determines if the message can be retried or not.",
            "title": "is  retriable",
            "type": "boolean"
          },
          "replied_by": {
            "description": "The message designated as a response to the current message. This field is temporary and only provided to the web app.",
            "title": "replied  by",
            "$ref": "#/components/schemas/TicketMessageRepliedByOrTo"
          },
          "replied_to": {
            "description": "The message designated as replied by the current message. This field is temporary and only provided to the web app.",
            "title": "replied  to",
            "$ref": "#/components/schemas/TicketMessageRepliedByOrTo"
          }
        },
        "required": [
          "id",
          "uri",
          "message_id",
          "ticket_id",
          "external_id",
          "channel",
          "via",
          "source",
          "sender",
          "auth_customer_identity",
          "integration_id",
          "intents",
          "rule_id",
          "from_agent",
          "receiver",
          "subject",
          "body_text",
          "body_html",
          "body_url",
          "stripped_text",
          "stripped_html",
          "stripped_signature",
          "attachments",
          "actions",
          "imported",
          "meta",
          "created_datetime",
          "processed_datetime",
          "sent_datetime",
          "failed_datetime",
          "opened_datetime",
          "last_sending_error",
          "is_retriable"
        ],
        "title": "ticket message",
        "type": "object"
      },
      "TicketMessageAttachment": {
        "properties": {
          "url": {
            "description": "The URL to access to the attached file.",
            "examples": [
              "https://gorgias.io/attachments/file.pdf"
            ],
            "title": "url",
            "type": "string"
          },
          "name": {
            "description": "The name of the file.",
            "examples": [
              "file.pdf"
            ],
            "title": "name",
            "type": "string"
          },
          "size": {
            "description": "The size of the file, in bytes.",
            "examples": [
              784554
            ],
            "title": "size",
            "type": "integer"
          },
          "content_type": {
            "description": "The MIME type of the file.",
            "examples": [
              "application/pdf"
            ],
            "title": "content  type",
            "type": "string"
          },
          "public": {
            "description": "Whether or not the attachment can be accessed.",
            "examples": [
              true
            ],
            "title": "public",
            "type": "boolean"
          },
          "extra": {
            "description": "Extra information for custom content type attachment",
            "examples": [
              {}
            ],
            "title": "extra"
          }
        },
        "required": [
          "url",
          "content_type"
        ],
        "title": "ticket message attachment",
        "type": "object"
      },
      "TicketMessageAuthCustomerIdentity": {
        "additionalProperties": false,
        "properties": {
          "service": {
            "$ref": "#/components/schemas/TicketMessageAuthCustomerIdentityService",
            "description": "The service/channel used to authenticate the customer. E.g.: email, phone, shopify"
          },
          "identifier": {
            "description": "The ID of the customer related to the service. E.g.: email address, phone number, Shopify customer ID, etc.",
            "title": "identifier",
            "type": "string"
          }
        },
        "required": [
          "service",
          "identifier"
        ],
        "title": "ticket message auth customer identity",
        "type": "object"
      },
      "TicketMessageAuthCustomerIdentityService": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "The ID of the service the identity belongs to.",
            "title": "id",
            "type": "string"
          },
          "name": {
            "description": "The name of the service the identity belongs to.",
            "title": "name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "ticket message auth customer identity service",
        "type": "object"
      },
      "TicketMessageIntent": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "description": "The intention the message probably has, example: discount/request",
            "examples": [
              "discount/request"
            ],
            "title": "name",
            "type": "string"
          },
          "rejected": {
            "description": "Whether or not the intent was rejected",
            "title": "rejected",
            "type": "boolean"
          },
          "is_user_feedback": {
            "description": "Whether or not the intent comes from a user feedback",
            "title": "is  user  feedback",
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "rejected",
          "is_user_feedback"
        ],
        "title": "ticket message intent",
        "type": "object"
      },
      "TicketMessageMacro": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "exclusiveMinimum": 0,
            "title": "id",
            "type": "integer"
          }
        },
        "required": [
          "id"
        ],
        "title": "ticket message macro",
        "type": "object"
      },
      "TicketMessageRepliedByOrTo": {
        "additionalProperties": false,
        "properties": {
          "integration_id": {
            "description": "ID of the integration which created the message.",
            "examples": [
              28643
            ],
            "title": "integration  id",
            "type": "integer"
          },
          "message_id": {
            "description": "ID of the message in Gorgias.",
            "examples": [
              1234
            ],
            "title": "message  id",
            "type": "string"
          },
          "created_datetime": {
            "description": "When the message was created.",
            "examples": [
              "2020-01-27T10:42:21.468912"
            ],
            "format": "date-time",
            "title": "created  datetime",
            "type": "string"
          },
          "body_text": {
            "description": "The full text version of the body of the message, if any.",
            "examples": [
              "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        "
            ],
            "title": "body  text",
            "type": "string"
          },
          "source": {
            "description": "Information used to route the message. It contains the names and the addresses of the sender and receivers.",
            "examples": [
              {
                "from": {
                  "address": "sender@gorgias.io",
                  "id": 7,
                  "name": "Sender Doe"
                },
                "to": [
                  {
                    "address": "receiver@gorgias.io",
                    "id": 8,
                    "name": "Receiver Doe"
                  }
                ],
                "type": "email"
              }
            ],
            "$ref": "#/components/schemas/TicketMessageSource"
          },
          "customer": {
            "description": "The customer who sent the message.",
            "examples": [
              {
                "id": 93
              }
            ],
            "$ref": "#/components/schemas/TicketMessageUserOrCustomer"
          },
          "user": {
            "description": "The agent who sent the message.",
            "examples": [
              {
                "id": 95
              }
            ],
            "$ref": "#/components/schemas/TicketMessageUserOrCustomer"
          }
        },
        "required": [
          "integration_id",
          "message_id",
          "created_datetime",
          "body_text",
          "source",
          "customer",
          "user"
        ],
        "title": "ticket message replied by or to",
        "type": "object"
      },
      "TicketMessageSendingError": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "title": "error",
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "title": "ticket message sending error",
        "type": "object"
      },
      "TicketMessageSourceAddress": {
        "properties": {
          "name": {
            "title": "name",
            "type": "string"
          },
          "address": {
            "title": "address",
            "type": "string"
          }
        },
        "title": "ticket message source address",
        "type": "object"
      },
      "TicketMessageSource": {
        "properties": {
          "type": {
            "description": "Describes a more detailed channel information of how the message was sent/received. Either the slug of a non-legacy channel or one of aircall,api,app,chat,chat-contact-form,chat-offline-capture,contact-form,email,facebook-comment,facebook-message,facebook-messenger,facebook-post,facebook-mention-post,facebook-mention-comment,facebook,facebook-review,facebook-review-comment,form,help-center,helpdesk,instagram-ad-comment,instagram-ad-media,instagram-comment,instagram-mention-comment,instagram-media,instagram-mention-media,instagram,instagram-direct-message,internal-note,ottspott-call,phone,rule,self_service,shopify,sms,system-message,twilio,yotpo-review,yotpo-review-public-comment,yotpo-review-private-comment,twitter-tweet,twitter-quoted-tweet,twitter-mention-tweet,twitter-direct-message,help-center-contact-form,whatsapp-message.",
            "title": "type",
            "type": "string"
          },
          "to": {
            "description": "A list of To addresses. To and From are usually present for most channel types.",
            "title": "to",
            "items": {
              "$ref": "#/components/schemas/TicketMessageSourceAddress"
            },
            "type": "array"
          },
          "cc": {
            "description": "A list of CC addresses. Only present in an email context.",
            "title": "cc",
            "items": {
              "$ref": "#/components/schemas/TicketMessageSourceAddress"
            },
            "type": "array"
          },
          "bcc": {
            "description": "A list of BCC addresses. Only present in an email context.",
            "title": "bcc",
            "items": {
              "$ref": "#/components/schemas/TicketMessageSourceAddress"
            },
            "type": "array"
          },
          "from": {
            "description": "A single From address. To and From are usually present for most channel types.",
            "$ref": "#/components/schemas/TicketMessageSourceAddress"
          },
          "extra": {
            "title": "extra"
          }
        },
        "required": [
          "type"
        ],
        "title": "ticket message source",
        "type": "object"
      },
      "TicketMessageUserOrCustomer": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "id",
            "type": "integer"
          },
          "email": {
            "title": "email",
            "type": "string"
          },
          "name": {
            "title": "name",
            "type": "string"
          },
          "firstname": {
            "title": "firstname",
            "type": "string"
          },
          "lastname": {
            "title": "lastname",
            "type": "string"
          },
          "meta": {
            "title": "meta"
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "firstname",
          "lastname",
          "meta"
        ],
        "title": "ticket message user or customer",
        "type": "object"
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "The username will be the email address of your Gorgias account and the password will be your API key."
      }
    }
  }
}
```