--- title: "Ticket Recycle Bin" slug: "server-api-ticketing-ticket-recycle-bin" updated: 2022-06-16T07:18:58Z published: 2022-06-16T07:18:58Z canonical: "developer.comm100.com/server-api-ticketing-ticket-recycle-bin" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.comm100.com/llms.txt > Use this file to discover all available pages before exploring further. # Ticket Recycle Bin ## Ticket Recycle Bin - `Ticket Recycle Bin` - Ticket Recycle Bin Manage - `GET ticketing/recycleBinTickets` - [Get the list of Ticket Recycle Bin](/docs/server-api-ticketing-ticket-recycle-bin#get-the-list-of-ticket-recycle-bin) - `GET ticketing/recycleBinTickets/{id}` - [Get a single Ticket Recycle Bin](/docs/server-api-ticketing-ticket-recycle-bin#get-a-single-ticket-recycle-bin) - `POST ticketing/recycleBinTickets/{id}:restore` - [Restore the Ticket Recycle Bin](/docs/server-api-ticketing-ticket-recycle-bin#restore-the-ticket-recycle-bin) ### Ticket Recycle Bin JSON Format Ticket Recycle Bin is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `id` | selfIncrementId | Id of the ticket. | | `subject` | string | Subject of the ticket. | | `originalConversationId` | string | Conversion Id in original channel. | | `assigneeId` | guid | Id of agent or chatbot that the ticket is assigned to. | | `departmentAssigneeId` | guid | Id of department that the ticket is assigned to. | | `channelId` | string | Id of the channel of the first message of the ticket. | | `channelAccountId` | guid | Id of the channel account of the first message of the ticket. | | `lastMessageId` | guid | Id of the last message of the ticket. | | `lastMessageChannelId` | string | Id of the channel of the last message of the ticket. | | `lastMessageChannelAccountId` | guid | Id of the channel account of the last message of the ticket. | | `contactOrVisitorId` | guid | Id of the contact or visitor that the ticket related to. | | `createdById` | guid | Id of role(contact, visitor, chatbot, channelAccount, system, agent) who created the ticket. | | `lastRepliedById` | guid | Id of role who last replied the ticket. | | `resolvedById` | guid | Id of role resolved the ticket. | | `assigneeType` | string | Type of the ticket assignee. Allowed values are "agent", "chatbot". | | `contactOrVisitorType` | string | Type of the ticket contact. Allowed values are "contact", "visitor", "chatbot", "channelAccount", "system", "agent". | | `status` | string | Status of the ticket. Allowed values are "new", "pendingInternal", "pendingExternal", "onHold", "resolved". | | `priority` | string | Priority of the ticket. Allowed values are "urgent", "high", "normal", "low". | | `createdByType` | string | Who created the ticket. Allowed values are "contact", "visitor", "chatbot", "channelAccount", "system", "agent". | | `lastRepliedByType` | string | Who replied the ticket recently. Allowed values are "contact", "visitor", "chatbot", "channelAccount", "system", "agent". | | `resolvedByType` | string | Who the ticket is resolved by. Allowed values are "contact", "visitor", "chatbot", "channelAccount", "system", "agent". | | `isReadByAgent` | bool | Whether the ticket is read by any agent or not. | | `isReadByContact` | bool | Whether the ticket is read by the contact or not. | | `ifHasDraft` | bool | Whether the ticket has draft or not. | | `mergedToTargetId` | integer | Id of the ticket that it was merged to. | | `totalReplies` | integer | Total number of messages, replied by agents, contacts or visitor. | | `createdTime` | datetime | Time when the ticket is created. | | `lastUpdatedTime` | timestamp | Last updated time of the ticket. | | `lastRepliedTime` | datetime | Last replied time of the ticket. | | `lastStatusChangedTime` | datetime | Last status changed time of the ticket. | | `resolvedTime` | datetime | Resloved time of the ticket. | | `isInRecycleBin` | bool | Whether the ticket is in recyle bin or not. | | `reopenedTime` | datetime | Time when the resolved ticket was reopened. | | `responseTimeSpan` | long | Total amount of time the status of the ticket was pending internal. | | `replyingAgent` | string | Allowed values are "noReply", "agentOnly", "botOnly", "agentAndBot". | | `responseCount` | long | Number of replies. | | `resolvedTimeSpan` | long | Total time it took to resolve the ticket. | | `firstResponseTimeSpan` | long | Time it took for the agent to send the first response after a ticket is created. | ### NoteMention JSON Format: | Name | Type | Description | | --- | --- | --- | | `isReadByAgent` | bool | Whether the mention has been read by agent or not. | | `noteId` | guid | Id of the note which the mention belongs to. | | `id` | guid | Id of the mention. | | `agentId` | guid | Id of the mentioned agent. | | `ticketId` | selfIncrementId | Id of the ticket which the note belongs to. | ### Get the list of Ticket Recycle Bin `GET ticketing/recycleBinTickets` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed values are "ticketingTag", "ticketingEventLog", "ticketingDraft", "ticketingMessage", "lastMessage", "assignee", "departmentAssignee", "createdBy", "lastRepliedBy", "contactOrVisitor". | - #### Response: An array of [Ticket Recycle Bin](/docs/server-api-ticketing-ticket-recycle-bin#ticket-recycle-bin-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/recycleBinTickets \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "recycleBinTickets": [ { "id": 11, "subject": "Chat Transcript with Michael", "originalConversationId": "110778970771178_202317311617343", "assigneeId": "1487fc9d-92e6-4487-a2e8-92e68d6892e6", "departmentAssigneeId": "91B032D9-0D07-4798-95F7-7EA482BC592C", "channelId": "F9B07E54-0D35-4F53-BA63-1194E4297291", "channelAccountId": "1487fc9d-92e6-4487-a2e8-92e68d6892e6", "lastMessageId": "1487fc9d-92e6-4487-a2e8-92e68d6892e6", "lastMessageChannelId": "E23B5D3C-4E7E-4131-9B3A-52B061BA7DE3", "lastMessageChannelAccountId": "1487fc9d-92e6-4487-a2e8-92e68d6892e6", "contactOrVisitorId": "E23B5D3C-4E7E-4131-9B3A-52B061BA7DE4", "createdById": "1487fc9d-92e6-4487-a2e8-92e68d6892e6", "lastRepliedById": "93AD44C8-CB30-40E1-8941-B693BAE74455", "resolvedById": "1487fc9d-92e6-4487-a2e8-92e68d6892e6", "assigneeType": "agent", "contactOrVisitorType": "contact", "status": "new", "priority": "normal", "createdByType": "contact", "lastRepliedByType": "agent", "resolvedByType": "agent", "isReadByAgent": false, "isReadByContact": false, "ifHasDraft": false, "mergedToTargetId": 89, "totalReplies": 4, "createdTime": "2021-05-12T08:10:53.48Z", "lastUpdatedTime": "2021-04-07T05:59:17.887Z", "lastRepliedTime": "2021-05-12T08:10:53.486Z", "lastStatusChangedTime": "2021-05-12T08:10:53.486Z", "resolvedTime": "2021-05-12T08:10:53.486Z", "isInRecycleBin": false, "reopenedTime": "2021-04-07T05:59:17.887Z", "responseTimeSpan": 50, "replyingAgent": "", "responseCount": 3, "resolvedTimeSpan": 2517872, "firstResponseTimeSpan": 127 } ], "nextPage": null, "previousPage": null, "total": 1 } ``` ### Get a single Ticket Recycle Bin `GET ticketing/recycleBinTickets/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed values are "ticketingTag", "ticketingEventLog", "ticketingDraft", "ticketingMessage", "lastMessage", "assignee", "departmentAssignee", "createdBy", "lastRepliedBy", "contactOrVisitor". | - #### Response: [Ticket Recycle Bin](/docs/server-api-ticketing-ticket-recycle-bin#ticket-recycle-bin-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/recycleBinTickets/11 \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "id": 11, "subject": "Chat Transcript with Michael", "originalConversationId": "110778970771178_202317311617343", "assigneeId": "1487fc9d-92e6-4487-a2e8-92e68d6892e6", "departmentAssigneeId": "91B032D9-0D07-4798-95F7-7EA482BC592C", "channelId": "F9B07E54-0D35-4F53-BA63-1194E4297291", "channelAccountId": "1487fc9d-92e6-4487-a2e8-92e68d6892e6", "lastMessageId": "1487fc9d-92e6-4487-a2e8-92e68d6892e6", "lastMessageChannelId": "E23B5D3C-4E7E-4131-9B3A-52B061BA7DE3", "lastMessageChannelAccountId": "1487fc9d-92e6-4487-a2e8-92e68d6892e6", "contactOrVisitorId": "E23B5D3C-4E7E-4131-9B3A-52B061BA7DE4", "createdById": "1487fc9d-92e6-4487-a2e8-92e68d6892e6", "lastRepliedById": "93AD44C8-CB30-40E1-8941-B693BAE74455", "resolvedById": "1487fc9d-92e6-4487-a2e8-92e68d6892e6", "assigneeType": "agent", "contactOrVisitorType": "contact", "status": "new", "priority": "normal", "createdByType": "contact", "lastRepliedByType": "agent", "resolvedByType": "agent", "isReadByAgent": false, "isReadByContact": false, "ifHasDraft": false, "mergedToTargetId": 89, "totalReplies": 4, "createdTime": "2021-05-12T08:10:53.48Z", "lastUpdatedTime": "2021-04-07T05:59:17.887Z", "lastRepliedTime": "2021-05-12T08:10:53.486Z", "lastStatusChangedTime": "2021-05-12T08:10:53.486Z", "resolvedTime": "2021-05-12T08:10:53.486Z", "isInRecycleBin": false, "reopenedTime": "2021-04-07T05:59:17.887Z", "responseTimeSpan": 50, "replyingAgent": "", "responseCount": 3, "resolvedTimeSpan": 2517872, "firstResponseTimeSpan": 127 } ``` ### Restore the Ticket Recycle Bin `POST ticketing/recycleBinTickets/{id}:restore` - #### Parameters: No Parameters - #### Response: [Ticket Recycle Bin](/docs/server-api-ticketing-ticket-recycle-bin#ticket-recycle-bin-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/recycleBinTickets/11:restore \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "id": 11, "subject": "Chat Transcript with Michael", "originalConversationId": "110778970771178_202317311617343", "assigneeId": "1487fc9d-92e6-4487-a2e8-92e68d6892e6", "departmentAssigneeId": "91B032D9-0D07-4798-95F7-7EA482BC592C", "channelId": "F9B07E54-0D35-4F53-BA63-1194E4297291", "channelAccountId": "1487fc9d-92e6-4487-a2e8-92e68d6892e6", "lastMessageId": "1487fc9d-92e6-4487-a2e8-92e68d6892e6", "lastMessageChannelId": "E23B5D3C-4E7E-4131-9B3A-52B061BA7DE3", "lastMessageChannelAccountId": "1487fc9d-92e6-4487-a2e8-92e68d6892e6", "contactOrVisitorId": "E23B5D3C-4E7E-4131-9B3A-52B061BA7DE4", "createdById": "1487fc9d-92e6-4487-a2e8-92e68d6892e6", "lastRepliedById": "93AD44C8-CB30-40E1-8941-B693BAE74455", "resolvedById": "1487fc9d-92e6-4487-a2e8-92e68d6892e6", "assigneeType": "agent", "contactOrVisitorType": "contact", "status": "new", "priority": "normal", "createdByType": "contact", "lastRepliedByType": "agent", "resolvedByType": "agent", "isReadByAgent": false, "isReadByContact": false, "ifHasDraft": false, "mergedToTargetId": 89, "totalReplies": 4, "createdTime": "2021-05-12T08:10:53.48Z", "lastUpdatedTime": "2021-04-07T05:59:17.887Z", "lastRepliedTime": "2021-05-12T08:10:53.486Z", "lastStatusChangedTime": "2021-05-12T08:10:53.486Z", "resolvedTime": "2021-05-12T08:10:53.486Z", "isInRecycleBin": false, "reopenedTime": "2021-04-07T05:59:17.887Z", "responseTimeSpan": 50, "replyingAgent": "", "responseCount": 3, "resolvedTimeSpan": 2517872, "firstResponseTimeSpan": 127 } ```