--- title: "Offline Message" slug: "server-api-livechat-offline-message" updated: 2022-07-28T09:24:42Z published: 2022-07-28T09:24:42Z canonical: "developer.comm100.com/server-api-livechat-offline-message" --- > ## 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. # Offline Message ## Offline Message You need the Delete Transcripts permission to delete Offline Messages. - `Offline Messages` - Offline Messages Manage - `GET livechat/offlineMessages/{id}` - [Get a single Offline Message](/docs/server-api-livechat-offline-message#get-a-single-offline-message) - `POST livechat/offlineMessages/{id}:AttachToTicket` - [Attach to Ticket](/docs/server-api-livechat-offline-message#attach-to-ticket) - `POST livechat/offlineMessages:search` - [Search Offline Messages](/docs/server-api-livechat-offline-message#search-offline-messages) - `PUT livechat/offlineMessages/{id}` - [Update the Offline Message](/docs/server-api-livechat-offline-message#update-the-offline-message) - `DELETE livechat/offlineMessages` - [Batch Delete Offline Messages](/docs/server-api-livechat-offline-message#batch-delete-offline-messages) - `DELETE livechat/offlineMessages/{id}` - [Remove the Offline Message](/docs/server-api-livechat-offline-message#remove-the-offline-message) ### Offline Message JSON Format Offline Message is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `id` | integer | Id of the offline message. | | `sessionId` | guid | Id of the session. | | `createdTime` | datetime | Created time of the offline message. | | `name` | string | Name of the visitor. | | `email` | string | Email of the visitor. | | `phone` | string | Phone of the visitor. | | `company` | string | Company of the visitor. | | `departmentId` | guid | DepartmentId of the offline message. | | `skillId` | guid | SkillId of the offline message. | | `agentId` | guid | Id of the agent. | | `ticketId` | integer | Id of the ticket to which this offline message is attached. | | `subject` | string | Subject of the offline message. | | `message` | string | Content of the offline message. | | `attachmentId` | guid | Id of the attachment. | | `requestingPageTitle` | string | Request page title of the offline message. | | `requestingPageURL` | string | Request page URL of the offline message. | | `source` | string | Allowed values are "chatButton", "autoInvitation", "manualInvitation", "bot", "queue". | | `autoInvitationId` | guid | Id of the auto invitation. | | `campaignId` | guid | Id of the campaign. | | `guid` | guid | Guid of the offline message. | | `attachmentFileName` | string | Attachment file name of the offline message. | | `visitorId` | guid | Id of the visitor. | | `contactIdentityId` | guid | Id of the contact identity. | ### Get a single Offline Message `GET livechat/offlineMessages/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `id` | int or guid | path | yes | Id of the offline message or Guid of the offline message. | | `include` | string | query | no | Available values for Include are: "agent", "autoInvitation", "campaign", "contactIdentity", "department", "offlineMessageFieldResult", "offlineMessageSegmentResult", "session", "skill", "visitor". | - #### Response: [Offline Message](/docs/server-api-livechat-offline-message#offline-message-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/livechat/offlineMessages/1148 \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "id": 1184, "guid": "51f85e96-ae39-46dc-9973-24c61438bf48", "sessionId": "cc14dd5f-a305-4303-b9f6-938ba594e72f", "visitorId": "728b10bf-cc90-4c26-bf7d-25d1e59d278c", "contactIdentityId": "00000000-0000-0000-0000-000000000000", "createdTime": "2021-03-23T07:39:54.005738Z", "name": "dsfaf", "email": "sdfaf@sfsfaf.com", "phone": "", "company": "", "departmentId": "00000000-0000-0000-0000-000000000000", "skillId": "00000000-0000-0000-0000-000000000000", "agentId": "00000000-0000-0000-0000-000000000000", "subject": "", "message": "sdfsdfsadfsafdsaf", "attachmentFileName": "db update.txt", "attachmentFileKey": "lsHBSpCIOMB99Y6fAK-id2V6x8jBIddlp9rySh6_C4x6z-ktmZDMT8TMxAaSfJJIUMCJTkX2WgofvwPHTqMGPwEnAr1GC6M7oKpS0pdGNZFVpvFDGbvjcaOAXmHAvyfoeLydKlz_GhdU2y018311Ur5FpqKXi6HpdeBLMVD8zfhA ", "requestingPageTitle": "Preview", "requestingPageURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=8afd6eb7-2b51-481f-bf5a-681743ffe3b1&siteId=10000&q=1616480015069", "source": "queue", "autoInvitationId": "00000000-0000-0000-0000-000000000000", "campaignId": "8afd6eb7-2b51-481f-bf5a-681743ffe3b1", "ticketId": 1845, "attachmentFileDownloadUrl": "https://api11.comm100.io/fileservice/v1/files/lsHBSpCIOMB99Y6fAK-id2V6x8jBIddlp9rySh6_C4x6z-ktmZDMT8TMxAaSfJJIUMCJTkX2WgofvwPHTqMGPwEnAr1GC6M7oKpS0pdGNZFVpvFDGbvjcaOAXmHAvyfoeLydKlz_GhdU2y018311Ur5FpqKXi6HpdeBLMVD8zfhA" } ``` ### Attach to Ticket `POST livechat/offlineMessages/{id}:AttachToTicket` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `targetId` | integer | body | yes | Id of the ticket to which this offline message is attached. | | `id` | int | path | yes | Id of the offline message. | | `utcOffset` | int | body | yes | UTC Offset of the user. | | `dateTimeFormat` | string | body | yes | Datetime format of the user. | - #### Response: No Content - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/livechat/offlineMessages/1:AttachToTicket \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"targetId":"2858","utcOffset":-420,"datetimeFormat":"YYYY/MM/DD HH:mm:ss"}' ``` Response: HTTP/1.1 200 OK ### Search Offline Messages `POST livechat/offlineMessages:search` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `filters` | array | body | yes | Filter array. Available items are: createdTime, departmentId, skillId, agent, campaignId, segmentId. \| name \| operator \| value \| \| --- \| --- \| --- \| \| createdTime \| is \| Selected time range, e.g., ["2021-04-01T00:00:00-07:00", "2021-05-13T00:00:00-07:00"]. \| \| departmentId \| is \| Selected department id, e.g., ["be60bd4a-850e-46ea-96eb-6dcd22893f0e"]. \| \| skillId \| is \| Selected skill id, e.g., ["6908B37E-A023-47DC-A24C-08246C2BF22A"]. \| \| agent \| is \| Selected agent id, e.g., ["0EE2B047-3B23-4170-8186-12F74B18D491"]. \| \| campaignId \| is \| Selected campaign id, e.g., ["e8bf0d25-eed6-4a46-a417-318e15019609"]. \| \| segmentId \| is \| Selected segment id, e.g., ["b25000d4-844b-4b1d-8a97-ad0300e99fd7"] \| | | name | operator | value | | createdTime | is | Selected time range, e.g., ["2021-04-01T00:00:00-07:00", "2021-05-13T00:00:00-07:00"]. | | departmentId | is | Selected department id, e.g., ["be60bd4a-850e-46ea-96eb-6dcd22893f0e"]. | | skillId | is | Selected skill id, e.g., ["6908B37E-A023-47DC-A24C-08246C2BF22A"]. | | agent | is | Selected agent id, e.g., ["0EE2B047-3B23-4170-8186-12F74B18D491"]. | | campaignId | is | Selected campaign id, e.g., ["e8bf0d25-eed6-4a46-a417-318e15019609"]. | | segmentId | is | Selected segment id, e.g., ["b25000d4-844b-4b1d-8a97-ad0300e99fd7"] | | `pageSize` | integer | query | no | Page size. The available value is from 10 to 500, and the default value is 50. | | `include` | string | query | no | Available values for Include are: "agent", "autoInvitation", "campaign", "contactIdentity", "department", "offlineMessageFieldResult", "offlineMessageSegmentResult", "session", "skill", "visitor". | | `pageIndex` | integer | query | no | Page index. | - #### Response: An array of [Offline Message](/docs/server-api-livechat-offline-message#offline-message-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/livechat/offlineMessages:search?pageIndex=1&pageSize=50 \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"filters":[{"name":"createdTime","operator":"is","value":["2021-03-23T00:00:00-07:00","2021-04-25T00:00:00-07:00"]}]}' ``` Response: HTTP/1.1 200 OK ``` { "total": 3, "pageCount": 1, "list": [ { "id": 1184, "guid": "51f85e96-ae39-46dc-9973-24c61438bf48", "sessionId": "cc14dd5f-a305-4303-b9f6-938ba594e72f", "visitorId": "728b10bf-cc90-4c26-bf7d-25d1e59d278c", "contactIdentityId": "00000000-0000-0000-0000-000000000000", "createdTime": "2021-03-23T07:39:54.005738Z", "name": "dsfaf", "email": "sdfaf@sfsfaf.com", "phone": "", "company": "", "departmentId": "00000000-0000-0000-0000-000000000000", "skillId": "00000000-0000-0000-0000-000000000000", "agentId": "00000000-0000-0000-0000-000000000000", "subject": "", "message": "sdfsdfsadfsafdsaf", "attachmentFileName": "db update.txt", "attachmentFileKey": "lsHBSpCIOMB99Y6fAK-id2V6x8jBIddlp9rySh6_C4x6z-ktmZDMT8TMxAaSfJJIUMCJTkX2WgofvwPHTqMGPwEnAr1GC6M7oKpS0pdGNZFVpvFDGbvjcaOAXmHAvyfoeLydKlz_GhdU2y018311Ur5FpqKXi6HpdeBLMVD8zfhA ", "requestingPageTitle": "Preview", "requestingPageURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=8afd6eb7-2b51-481f-bf5a-681743ffe3b1&siteId=10000&q=1616480015069", "source": "queue", "autoInvitationId": "00000000-0000-0000-0000-000000000000", "campaignId": "8afd6eb7-2b51-481f-bf5a-681743ffe3b1", "ticketId": 1845, "session": { "id": "cc14dd5f-a305-4303-b9f6-938ba594e72f", "visitorId": "728b10bf-cc90-4c26-bf7d-25d1e59d278c", "contactIdentityId": "00000000-0000-0000-0000-000000000000", "ip": "192.168.2.29", "referrerURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=8afd6eb7-2b51-481f-bf5a-681743ffe3b1&siteId=10000", "searchEngineId": "00000001-0000-0000-0000-000000000001", "keywords": "", "landingPageURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=8afd6eb7-2b51-481f-bf5a-681743ffe3b1&siteId=10000&q=1616480015069", "landingPageTitle": "", "startTime": "2021-03-23T07:35:12.3633333Z", "browser": "Google Chrome 81.0.4044.129", "operatorSystem": "Windows 8.1", "screenResolution": "2048x1152", "language": "en-US", "timeZone": "-480" } }, { "id": 1183, "guid": "2f29210e-f165-46e1-bff3-c4d8c795f12d", "sessionId": "cc14dd5f-a305-4303-b9f6-938ba594e72f", "visitorId": "728b10bf-cc90-4c26-bf7d-25d1e59d278c", "contactIdentityId": "00000000-0000-0000-0000-000000000000", "createdTime": "2021-03-23T07:36:01.6007445Z", "name": "dsfaf", "email": "sdfaf@sfsfaf.com", "phone": "", "company": "", "departmentId": "00000000-0000-0000-0000-000000000000", "skillId": "00000000-0000-0000-0000-000000000000", "agentId": "00000000-0000-0000-0000-000000000000", "subject": "", "message": "sdfsfsdfa", "attachmentFileName": "web.config", "attachmentFileKey": "0Ny4m48k_ytwouBVvs2At26OlUJQ1U8eaSaEX2yrCHSukfsCGL719gVS0ViTPn3XnMZrWcloOanOb2PvD70EZAlf1dhhax-CsPnZr01bVjs5bbehsGjV6q_20nu8cn-Y3N_DYFeUE_vgyDg3E-mLBMXaps5qsPvG-WNgJX8_SiDw ", "requestingPageTitle": "Preview", "requestingPageURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=8afd6eb7-2b51-481f-bf5a-681743ffe3b1&siteId=10000&q=1616480015069", "source": "queue", "autoInvitationId": "00000000-0000-0000-0000-000000000000", "campaignId": "8afd6eb7-2b51-481f-bf5a-681743ffe3b1", "ticketId": 1840, "session": { "id": "cc14dd5f-a305-4303-b9f6-938ba594e72f", "visitorId": "728b10bf-cc90-4c26-bf7d-25d1e59d278c", "contactIdentityId": "00000000-0000-0000-0000-000000000000", "ip": "192.168.2.29", "referrerURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=8afd6eb7-2b51-481f-bf5a-681743ffe3b1&siteId=10000", "searchEngineId": "00000001-0000-0000-0000-000000000001", "keywords": "", "landingPageURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=8afd6eb7-2b51-481f-bf5a-681743ffe3b1&siteId=10000&q=1616480015069", "landingPageTitle": "", "startTime": "2021-03-23T07:35:12.3633333Z", "browser": "Google Chrome 81.0.4044.129", "operatorSystem": "Windows 8.1", "screenResolution": "2048x1152", "language": "en-US", "timeZone": "-480" } }, { "id": 1182, "guid": "1713c9c5-fb2d-4c58-99c8-ec595b446d27", "sessionId": "321b75e9-8f61-4213-99fc-c2233148d719", "visitorId": "4d53ff8b-9aa6-491b-86ca-5f6fab18edcb", "contactIdentityId": "00000000-0000-0000-0000-000000000000", "createdTime": "2021-03-23T07:28:31.604738Z", "name": "dsfaf", "email": "sdfaf@sfsfaf.com", "phone": "", "company": "", "departmentId": "00000000-0000-0000-0000-000000000000", "skillId": "00000000-0000-0000-0000-000000000000", "agentId": "00000000-0000-0000-0000-000000000000", "subject": "", "message": "sdafsadf", "attachmentFileName": "", "attachmentFileKey": " ", "requestingPageTitle": "Preview", "requestingPageURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=8afd6eb7-2b51-481f-bf5a-681743ffe3b1&siteId=10000&q=1616480015069", "source": "queue", "autoInvitationId": "00000000-0000-0000-0000-000000000000", "campaignId": "8afd6eb7-2b51-481f-bf5a-681743ffe3b1", "ticketId": 1847, "session": { "id": "321b75e9-8f61-4213-99fc-c2233148d719", "visitorId": "4d53ff8b-9aa6-491b-86ca-5f6fab18edcb", "contactIdentityId": "00000000-0000-0000-0000-000000000000", "ip": "192.168.2.29", "referrerURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=8afd6eb7-2b51-481f-bf5a-681743ffe3b1&siteId=10000", "searchEngineId": "00000001-0000-0000-0000-000000000001", "keywords": "", "landingPageURL": "https://dash11.comm100.io/frontEnd/assets/livechat/previewpage/?campaignId=8afd6eb7-2b51-481f-bf5a-681743ffe3b1&siteId=10000&q=1616480015069", "landingPageTitle": "", "startTime": "2021-03-23T07:28:02.08Z", "browser": "Google Chrome 81.0.4044.129", "operatorSystem": "Windows 8.1", "screenResolution": "2048x1152", "language": "en-US", "timeZone": "-480" } } ], "pageIndex": 0, "pageSize": 50 } ``` ### Update the Offline Message `PUT livechat/offlineMessages/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `sessionId` | guid | body | no | Id of the session. | | `createdTime` | datetime | body | no | Created time of the offline message. | | `name` | string | body | no | Name of the visitor. | | `email` | string | body | no | Email of the visitor. | | `phone` | string | body | no | Phone of the visitor. | | `company` | string | body | no | Company of the visitor. | | `departmentId` | guid | body | no | DepartmentId of the offline message. | | `skillId` | guid | body | no | SkillId of the offline message. | | `agentId` | guid | body | no | Id of the agent. | | `ticketId` | integer | body | no | Id of the ticket to which this offline message is attached. | | `subject` | string | body | no | Subject of the offline message. | | `message` | string | body | no | Content of the offline message. | | `attachmentId` | guid | body | no | Id of the attachment. | | `requestingPageTitle` | string | body | no | Request page title of the offline message. | | `requestingPageURL` | string | body | no | Request page URL of the offline message. | | `source` | string | body | no | Allowed values are "chatButton", "autoInvitation", "manualInvitation", "bot", "queue". | | `autoInvitationId` | guid | body | no | Id of the auto invitation. | | `campaignId` | guid | body | no | Id of the campaign. | | `guid` | guid | body | no | Guid of the offline message. | | `attachmentFileName` | string | body | no | Attachment file name of the offline message. | | `visitorId` | guid | body | no | Id of the visitor. | | `contactIdentityId` | guid | body | no | Id of the contact identity. | - #### Response: [Offline Message](/docs/server-api-livechat-offline-message#offline-message-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/livechat/offlineMessages/1 \ -X 'PUT' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"sessionId":"CFB15329-7C46-EB11-8100-00155D081D0B","createdTime":"2021-04-28T09:15:01.71Z","name":"Jason","email":"jason@comm100.com","phone":"1234567890","company":"Comm1000","departmentId":"D0624110-6F9F-4DD5-A03C-A703AD1339FC","skillId":"6908B37E-A023-47DC-A24C-08246C2BF22A","agentId":"D6B15329-7C46-EB11-8100-00155D081D0B","ticketId":1,"subject":"test","message":"message content","attachmentId":"1c066608-71b8-4f07-90a7-6cc1306602dc","requestingPageTitle":"","requestingPageURL":"","source":"chatButton","autoInvitationId":"00000000-0000-0000-0000-000000000000","campaignId":"DFB15329-7C46-EB11-8100-00155D081D0B","guid":"C3B35329-7C46-EB11-8100-00155D081D0B","attachmentFileName":"","visitorId":"F0B35329-7C46-EB11-8100-00155D081D0B","contactIdentityId":"F1B35329-7C46-EB11-8100-00155D081D0B"}' ``` Response: HTTP/1.1 200 OK ``` { "id": 1, "sessionId": "CFB15329-7C46-EB11-8100-00155D081D0B", "createdTime": "2021-04-28T09:15:01.71Z", "name": "Jason", "email": "jason@comm100.com", "phone": "1234567890", "company": "Comm1000", "departmentId": "D0624110-6F9F-4DD5-A03C-A703AD1339FC", "skillId":"6908B37E-A023-47DC-A24C-08246C2BF22A", "agentId": "D6B15329-7C46-EB11-8100-00155D081D0B", "ticketId": 1, "subject": "test", "message": "message content", "attachmentId": "1c066608-71b8-4f07-90a7-6cc1306602dc", "requestingPageTitle": "", "requestingPageURL": "", "source": "chatButton", "autoInvitationId": "00000000-0000-0000-0000-000000000000", "campaignId": "DFB15329-7C46-EB11-8100-00155D081D0B", "guid": "C3B35329-7C46-EB11-8100-00155D081D0B", "attachmentFileName": "", "visitorId": "F0B35329-7C46-EB11-8100-00155D081D0B", "contactIdentityId": "F1B35329-7C46-EB11-8100-00155D081D0B" } ``` ### Batch Delete Offline Messages `DELETE livechat/offlineMessages` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `Request body` | json string | body | yes | Id array of the offline messages. | - #### Response: No Content - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/livechat/offlineMessages \ -X 'DELETE' \ -H 'Authorization: Bearer {access_token}' \ -D '[1184,1183]' ``` Response: HTTP/1.1 200 OK ### Remove the Offline Message `DELETE livechat/offlineMessages/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `id` | int | path | yes | Id of the offline message. | - #### Response: No Content - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/livechat/offlineMessages/1 \ -X 'DELETE' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 204 No Content