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
array

Actions associated with the message

actions
attachments
array of objects

Attachments associated with the message

attachments
string

HTML version of the body of the message

string

Text version of the body of the message

legacy channel slug | string
required

Channel used to send the message

date-time

When the message was created

date-time

When the message was deleted

string
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.

date-time

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

boolean
required

Whether the message was sent by your company

headers
object

Headers of the message

integer

ID of the Integration used to send the message

last_sending_error
object

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

macros
array of objects

Macros used to compose the message

macros
string

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...

meta
object

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

date-time

When the message was seen by its recipient

boolean
Defaults to true

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

date-time

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

source
object

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

string

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

string

Signature stripped from the body of the message

string

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

string

Subject of the message

string
enum
Defaults to api

How the message has been received or sent from Gorgias

boolean
Defaults to false

Whether the message was created by a historical import.

mention_ids
array of integers

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

mention ids
receiver
object

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

sender
object

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

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