Junk
  • 16 Jun 2022
  • 1 Minute to read
  • Dark
    Light

Junk

  • Dark
    Light

Article summary

Junk

Ticket junk email.

Junk JSON Format

Junk is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idguidId of the junk message.
timedatetimeTime when receiving the junk message.
isReadByAgentboolWhether the junk message is read by agent or not.
sentByIdguidId of contact or visitor.
sentByTypestringType of the sender. Allowed values are "contact", "visitor", "chatbot", "channelAccount", "system", "agent".
typestringType of the junk. Allowed values are "text", "html", "video", "audio", "image", "file", "location", "quickReply", "webView".
metadataobjectMessage metadata, Json format.
channelIdstringId of the channel.
bodystringContent of the junk.
attachmentsattachments[]Reference to JunkAttachment.

JunkAttachment JSON Format:

NameTypeDescription
idguidId of the attachment.
junkIdguidId of the junk ticket which the attachment belongs to.
fileKeystringUnique key in file service.
namestringName of the attachment.
sizeintegerSize of the attachment.
typestringType of the attachment. Allowed values are "video", "audio", "image", "file".
urlstringDownload URL of the attachment.

Get the list of Junk

GET ticketing/junks

  • Parameters:

NameTypeinRequiredDescription
timestringquerynoFilter by time.
includestringquerynoAllowed values are "ticketingJunkAttachment", "sentBy".
  • Response:

An array of Junk

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/junks \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "junks": [
      {
          "id": "0a5b1872-37c6-4599-92a6-ec00eb208450",
          "time": "2021-04-28T01:16:05.013Z",
          "isReadByAgent": false,
          "sentById": "c1679e57-7b10-4343-a987-ae3c846c2227",
          "sentByType": "contact",
          "type": "html",
          "metadata": {
              "channel": {
                  "channelAccount": "6de84bfc-d1c1-eb11-aacf-06c7a219a2ac",
                  "isFromChannelToPlatform": true,
                  "accountName": "test@163.com"
              },
              "source": {
                  "authorId": "test@163.com",
                  "messageUrl": "",
                  "name": "test@163.com",
                  "contactIdentityId": "a07ff412-ace2-4e42-baea-de94bf26869a",
                  "originalParentId": "",
                  "conversationId": ""
              },
              "decoration": {
                  "email": {
                      "from": "test@163.com",
                      "to": "\"agent\" 

Was this article helpful?

What's Next