younifyd
Menu

Get Ticket Message

Retrieve a message

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

Use it in a workflow

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

Request

Path parameters

ticket_idintegerrequired

The ID of the ticket associated with the message.

idintegerrequired

The ID of the message to retrieve.

Response

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

idinteger

ID of the message.

uristring

URI of the message.

message_idstring

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

The ID of the ticket the message is associated with.

external_idstring

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

channeloneOf

The channel used to send the message.

viastring

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

sourceobject
typestringrequired

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.

toarray<object>2 fields

A list of To addresses. To and From are usually present for most channel types.

ccarray<object>2 fields

A list of CC addresses. Only present in an email context.

bccarray<object>2 fields

A list of BCC addresses. Only present in an email context.

fromobject2 fields
extraany
senderobject
idintegerrequired
emailstringrequired
namestringrequired
firstnamestringrequired
lastnamestringrequired
metaanyrequired
auth_customer_identityobject
serviceobjectrequired2 fields
identifierstringrequired

The ID of the customer related to the service. E.g.: email address, phone number, Shopify customer ID, etc.

integration_idinteger

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

intentsarray<object>
namestringrequired

The intention the message probably has, example: discount/request

rejectedbooleanrequired

Whether or not the intent was rejected

is_user_feedbackbooleanrequired

Whether or not the intent comes from a user feedback

rule_idinteger

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

from_agentboolean

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

receiverobject
idintegerrequired
emailstringrequired
namestringrequired
firstnamestringrequired
lastnamestringrequired
metaanyrequired
subjectstring

The subject of the message.

body_textstring

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

body_htmlstring

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

stripped_textstring

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

stripped_htmlstring

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

stripped_signaturestring
attachmentsarray<object>

A list of files attached to the message.

urlstringrequired

The URL to access to the attached file.

namestring

The name of the file.

sizeinteger

The size of the file, in bytes.

content_typestringrequired

The MIME type of the file.

publicboolean

Whether or not the attachment can be accessed.

extraany

Extra information for custom content type attachment

macrosarray<object>

A list of macros.

idintegerrequired
actionsarray<object>

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

headersobject

Message headers. Used for email messages.

importedboolean

Whether the message was created by a historical import.

metaany

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)

When the message was created.

processed_datetimestring (date-time)

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)

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

failed_datetimestring (date-time)

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

opened_datetimestring (date-time)

When the message was opened by the primary receiver.

last_sending_errorobject
errorstringrequired
is_retriableboolean

It determines if the message can be retried or not.

replied_byobject
integration_idintegerrequired

ID of the integration which created the message.

message_idstringrequired

ID of the message in Gorgias.

created_datetimestring (date-time)required

When the message was created.

body_textstringrequired

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

sourceobjectrequired6 fields
customerobjectrequired6 fields
userobjectrequired6 fields
replied_toobject
integration_idintegerrequired

ID of the integration which created the message.

message_idstringrequired

ID of the message in Gorgias.

created_datetimestring (date-time)required

When the message was created.

body_textstringrequired

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

sourceobjectrequired6 fields
customerobjectrequired6 fields
userobjectrequired6 fields
json
{
  "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
    }
  ]
}

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

Get Ticket Message — Gorgias — Documentation