Create a message

Create a message and either:

  • not send it if the attribute sent_datetime is filled. If you import a message that was already sent, make sure to set this value.
  • send it to the recipients if the attribute sent_datetime is empty.
  • add it to the ticket as an internal note if you specified this channel. Internal notes are not sent to your customers.

When a message is created, it does not mean that this one has been sent because the creation and sending process are decoupled. Messages are basically sent asynchronously. Once a message has been sent, Gorgias will automatically update the message to fill the time when it was sent (sent_datetime).

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
integer
required

The ID of the ticket to create a message in.

Query Params
string
enum

Policy applied on external actions associated with the message if they failed. Three actions are possible:

  • force: bypass the failed action and try to execute the remaining one and to send the message
  • retry: retry the failed action
  • cancel: delete the TicketMessage
Allowed:
Body Params
actions

Actions associated with the message

attachments

Attachments associated with the message

HTML version of the body of the message

Text version of the body of the message

enum
required

Channel used to send the message

When the message was created

When the message was deleted

length ≤ 255

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.

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

boolean
required

Whether the message was sent by your company

headers

Headers of the message

ID of the Integration used to send the message

last_sending_error

Details of the last error encountered when Gorgias attempted to send the message

macros

Macros used to compose the message

mention_ids

List of User IDs to mention along with the internal note.

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

meta

Metadata associated with the ticket.You can use this field to store structured information (key-value data) about the ticket.

When the message was seen by their recipient

boolean
Defaults to true

Whether the message is public. Only internal notes are private.

receiver

Primary receiver of the message. It can be a user or a customer. Optional when the source type is "internal-note".

sender

Person who sent the message. It can be a user or a customer.

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

source

Information used to route the message. It contains the names and the addresses of the sender and receivers.

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

signature stripped from the body of the message

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

Subject of the message

string
enum
required

How the message has been received or sent from Gorgias

Response

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json