younifyd
Menu

List Ticket Messages

List messages of a ticket

GET/api/tickets/{ticket_id}/messages

Use it in a workflow

  1. Add a step and choose the Gorgias connector.
  2. Pick the List Ticket Messages action (under Ticket Messages).
  3. Fill in the fields below, then reference the result from later steps as {{listTicketMessages.response.data}}.

Request

Path parameters

ticket_idintegerrequired

The ID of the ticket to get the messages from.

Response

Returns 200 with an object. Read it in later steps with {{listTicketMessages.response.data.<field>}}.

objectstring
uristring
dataarray<object>
idintegerrequired

ID of the message.

uristringrequired

URI of the message.

message_idstringrequired

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_idintegerrequired

The ID of the ticket the message is associated with.

external_idstringrequired

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.

Default true

channeloneOfrequired

The channel used to send the message.

viastringrequired

One ofaircallapichatcontact_formemailfacebookfacebook-mentionfacebook-messengerfacebook-recommendationsformgorgias_chathelp-centerhelpdeskinstagraminstagram-ad-commentinstagram-commentinstagram-direct-messageinstagram-mentioninternal-noteoffline_capturephoneruleself_serviceshopifysmstwiliotwittertwitter-direct-messagewhatsappyotpoyotpo-reviewzendesk

sourceobjectrequired6 fields
senderobjectrequired6 fields
auth_customer_identityobjectrequired2 fields
integration_idintegerrequired

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

intentsarray<object>required3 fields
rule_idintegerrequired

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

from_agentbooleanrequired

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

receiverobjectrequired6 fields
subjectstringrequired

The subject of the message.

body_textstringrequired

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

body_htmlstringrequired

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

stripped_textstringrequired

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

stripped_htmlstringrequired

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

stripped_signaturestringrequired
attachmentsarray<object>required6 fields

A list of files attached to the message.

macrosarray<object>1 fields

A list of macros.

actionsarray<object>required

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

headersobject

Message headers. Used for email messages.

importedbooleanrequired

Whether the message was created by a historical import.

metaanyrequired

Metadata associated with the message. You can use this field to store structured information (key-value data) about the message. Reserved keys: - `current_page`: The page from where the user is currently chatting. - `relevant_content_indexes`: Indexes containing relevant text of the message. - `is_quick_reply`: Whether the message is a "quick reply". - `campaigns`: ID of the chat campaign the message is replying to. - `campaigns_id`: ID of the chat campaign that sent this message. - `self_service_flow`: An object containing metadata of the self-service flow associated to the message.

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.

last_sending_errorobjectrequired1 fields
is_retriablebooleanrequired

It determines if the message can be retried or not.

replied_byobject7 fields
replied_toobject7 fields
metaobject
prev_cursorstringrequired
next_cursorstringrequired
total_resourcesintegerrequired
json
{
  "object": "string",
  "uri": "string",
  "data": [
    {
      "id": 0,
      "uri": "string",
      "message_id": "string",
      "ticket_id": 0,
      "external_id": "string",
      "channel": null,
      "via": "aircall",
      "source": {
        "type": "string",
        "to": [
          {
            "name": "string",
            "address": "string"
          }
        ],
        "cc": [
          {
            "name": "string",
            "address": "string"
          }
        ],
        "bcc": [
          {
            "name": "string",
            "address": "string"
          }
        ],
        "from": {
          "name": "string",
          "address": "string"
        },
        "extra": null
      },
      "sender": {
        "id": 0,
        "email": "string",
        "name": "string",
        "firstname": "string",
        "lastname": "string",
        "meta": null
      },
      "auth_customer_identity": {
        "service": {
          "id": "string",
          "name": "string"
        },
        "identifier": "string"
      },
      "integration_id": 0,
      "intents": [
        {
          "name": "string",
          "rejected": false,
          "is_user_feedback": false
        }
      ]
    }
  ],
  "meta": {
    "prev_cursor": "string",
    "next_cursor": "string",
    "total_resources": 0
  }
}

Need more? See the Gorgias guide for connection setup and behaviour shared by every action.