Junk
- 16 Jun 2022
- 1 Minute to read
- Print
- DarkLight
Junk
- Updated on 16 Jun 2022
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Junk
Ticket junk email.
Junk
- Junk ManageGET ticketing/junks
- Get the list of JunkGET ticketing/junks/{id}
- Get a single JunkPOST ticketing/junks
- Create a new JunkPOST ticketing/junks/{id}:notJunk
- Set the junk as a normal message.POST ticketing/junks/{id}:read
- Set the junk as read.POST ticketing/junks/{id}:unread
- Set the junk as unread.PUT ticketing/junks/{id}
- Update the JunkDELETE ticketing/junks/{id}
- Remove the Junk
Junk JSON Format
Junk is represented as simple flat JSON objects with the following keys:
Name | Type | Description |
---|---|---|
id | guid | Id of the junk message. |
time | datetime | Time when receiving the junk message. |
isReadByAgent | bool | Whether the junk message is read by agent or not. |
sentById | guid | Id of contact or visitor. |
sentByType | string | Type of the sender. Allowed values are "contact", "visitor", "chatbot", "channelAccount", "system", "agent". |
type | string | Type of the junk. Allowed values are "text", "html", "video", "audio", "image", "file", "location", "quickReply", "webView". |
metadata | object | Message metadata, Json format. |
channelId | string | Id of the channel. |
body | string | Content of the junk. |
attachments | attachments[] | Reference to JunkAttachment. |
JunkAttachment JSON Format:
Name | Type | Description |
---|---|---|
id | guid | Id of the attachment. |
junkId | guid | Id of the junk ticket which the attachment belongs to. |
fileKey | string | Unique key in file service. |
name | string | Name of the attachment. |
size | integer | Size of the attachment. |
type | string | Type of the attachment. Allowed values are "video", "audio", "image", "file". |
url | string | Download URL of the attachment. |
Get the list of Junk
GET ticketing/junks
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
time | string | query | no | Filter by time. |
include | string | query | no | Allowed 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?