Message

All the endpoints that can be called on the Message controller.

All of the endpoints require the MESSAGE_CREATE permission.

index

post

Creates a new message.

The ticket must already exist. It will clear the ticket's cache before processing this data.

Authorizations
Body
ticketIDnumberRequired

If you want to send a message in an already existing ticket.

typestring · min: 1Required

What channel to send the message in.

Pattern: ^([0-9]+|calllog|contactform)$
toAddressstringOptional

Nullable for contact forms and notes. Can be multiple email addresses split by a ','

Default: ""
ccInputstring · emailOptionalDefault: ""
bccInputstring · emailOptionalDefault: ""
respondMessageIDnumberOptional

Add this parameter if it is a reply to an existing message.

Default: 0
plaintextstringOptional

If this one is empty, it will use the value of the message parameter instead. Only relevant for emails.

Default: ""
messagestring · min: 5Required

The actual message.

forwardedFileIDsnumber[]Optional

If you want to forward existing files.

Default: []
sendAtstring · ^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})$Optional

A special parameter as it is a string that would be following the ISO date format.

userIDnumberOptional

The ID of the user who created this message.

Default: 0
submitStatusstring · enumOptionalPossible values:
Responses
200Success
post
POST /api/v2/message HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 195

{
  "ticketID": 1,
  "type": "text",
  "toAddress": "",
  "ccInput": "",
  "bccInput": "",
  "respondMessageID": 0,
  "plaintext": "",
  "message": "text",
  "forwardedFileIDs": [
    1
  ],
  "sendAt": "text",
  "userID": 0,
  "submitStatus": "open"
}
200Success

No content

chatbot

post

Creates a ticket and its accompanying message coming from a chatbot.

Authorizations
Body
brandIDnumberRequired
messagestring · min: 1Required
subjectstring · min: 1Required
fromstring · min: 1Required
Responses
200Success
post
POST /api/v2/message/chatbot HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 61

{
  "brandID": 1,
  "message": "text",
  "subject": "text",
  "from": "text"
}
200Success

No content