--- title: "Channel Account" slug: "server-api-ticketing-channel-account" updated: 2022-06-16T07:16:33Z published: 2022-06-16T07:16:33Z canonical: "developer.comm100.com/server-api-ticketing-channel-account" --- > ## 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. # Channel Account ## Channel Account Accounts integrated to the channel apps i.e., multiple email accounts can be integrated to the Email channel. - `Channel Accounts` - Channel Accounts Manage - `GET ticketing/channelAccounts` - [Get the list of Channel Accounts](/docs/server-api-ticketing-channel-account#get-the-list-of-channel-accounts) - `GET ticketing/channelAccounts/{id}` - [Get a single Channel Account](/docs/server-api-ticketing-channel-account#get-a-single-channel-account) - `POST ticketing/channelAccounts` - [Create a new Channel Account](/docs/server-api-ticketing-channel-account#create-a-new-channel-account) - `POST ticketing/channelAccounts/{id}:disableBot` - [DisableBot the Channel Account](/docs/server-api-ticketing-channel-account#disablebot-the-channel-account) - `POST ticketing/channelAccounts/{id}:enableBot` - [EnableBot the Channel Account](/docs/server-api-ticketing-channel-account#enablebot-the-channel-account) - `PUT ticketing/channelAccounts/{id}` - [Update the Channel Account](/docs/server-api-ticketing-channel-account#update-the-channel-account) - `DELETE ticketing/channelAccounts/{id}` - [Remove the Channel Account](/docs/server-api-ticketing-channel-account#remove-the-channel-account) ### Channel Account JSON Format Channel Account is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `appId` | string | Id of the channel app which the channel account belongs to. Allowed values are "Email","Facebook","Facebook","Twitter","WeChat","WeChat","WhatsApp" exc. | | `originalAccountId` | string | Id of the channel account in original channel. | | `name` | string | Name of the channel account. | | `id` | guid | Id of channel account. | | `isEnabled` | bool | Whether this channel account is enabled or not. | | `avatarUrl` | string | Avatar URL of the channel account. | | `screenName` | string | Display name. | | `isBotEnabled` | bool | Whether this channel account supports bot or not. | | `chatbotId` | guid | Id of chat bot. | | `percentageToBotWhenOnline` | integer | Percentage of routing to bot when there are agents online. | | `percentageToBotWhenOffline` | integer | Percentage of routing to bot when all agents are offline. | | `isDefault` | bool | Whether the account is set as default email account or not. | | `createdTime` | datetime | Time when the channel account is created. | ### Get the list of Channel Accounts `GET ticketing/channelAccounts` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed value is "chatbot". | - #### Response: An array of [Channel Account](/docs/server-api-ticketing-channel-account#channel-account-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/channelAccounts \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` [ { "appId": "WeChat", "originalAccountId": "gh_be13d263test", "name": "Comm100", "id": "59c749f4-af8e-eb11-aacf-06c7a219a2ac", "isEnabled": true, "avatarUrl": "http://wx.qlogo.cn/mmopen/vsACyXq1DBiadwp2qnDRDuGbq5304PQsicgV39VfG3LRiaUZhy8AcF90icxIQGicbFHhpjLChoKhPxDNMnWXiaibdibPGFNSc6qImCM9/test", "screenName": "Comm100", "isBotEnabled": false, "chatbotId": "980cce41-58ae-43b2-8de8-37eea94da4a4", "percentageToBotWhenOnline": 0, "percentageToBotWhenOffline": 0, "isDefault": false, "createdTime": "2021-01-27T03:13:04.866Z" } ] ``` ### Get a single Channel Account `GET ticketing/channelAccounts/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed value is "chatbot". | - #### Response: [Channel Account](/docs/server-api-ticketing-channel-account#channel-account-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/channelAccounts/59c749f4-af8e-eb11-aacf-06c7a219a2ac \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "appId": "WeChat", "originalAccountId": "gh_be13d263test", "name": "Comm100", "id": "59c749f4-af8e-eb11-aacf-06c7a219a2ac", "isEnabled": true, "avatarUrl": "http://wx.qlogo.cn/mmopen/vsACyXq1DBiadwp2qnDRDuGbq5304PQsicgV39VfG3LRiaUZhy8AcF90icxIQGicbFHhpjLChoKhPxDNMnWXiaibdibPGFNSc6qImCM9/test", "screenName": "Comm100", "isBotEnabled": false, "chatbotId": "980cce41-58ae-43b2-8de8-37eea94da4a4", "percentageToBotWhenOnline": 0, "percentageToBotWhenOffline": 0, "isDefault": false, "createdTime": "2021-01-27T03:13:04.866Z" } ``` ### Create a new Channel Account `POST ticketing/channelAccounts` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `appId` | string | body | yes | Id of the channel app which the channel account belongs to. Allowed values are "Email","Facebook","Facebook","Twitter","WeChat","WeChat","WhatsApp" exc. | | `originalAccountId` | string | body | yes | Id of the channel account in original channel. | | `name` | string | body | yes | Name of the channel account. | | `isEnabled` | bool | body | yes | Whether this channel account is enabled or not. | | `avatarUrl` | string | body | no | Avatar URL of the channel account. | | `screenName` | string | body | yes | Display name. | | `isBotEnabled` | bool | body | yes | Whether this channel account supports bot or not. | | `chatbotId` | guid | body | no | Id of chat bot. | | `percentageToBotWhenOnline` | integer | body | yes | Percentage of routing to bot when there are agents online. | | `percentageToBotWhenOffline` | integer | body | yes | Percentage of routing to bot when all agents are offline. | | `isDefault` | bool | body | yes | Whether the account is set as default email account or not. | | `channelIdentity` | string | body | no | Identity metadata of channel account. | | `accountExtInfo` | string | body | no | | | `filter` | string | body | no | | | `createdTime` | datetime | body | no | Time when the channel account is created. | | `emailAccountInfo` | string | body | no | Email info. | - #### Response: [Channel Account](/docs/server-api-ticketing-channel-account#channel-account-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/channelAccounts \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"appId":"WeChat","originalAccountId":"gh_be13d263test","name":"Comm100","isEnabled":true,"avatarUrl":"http://wx.qlogo.cn/mmopen/vsACyXq1DBiadwp2qnDRDuGbq5304PQsicgV39VfG3LRiaUZhy8AcF90icxIQGicbFHhpjLChoKhPxDNMnWXiaibdibPGFNSc6qImCM9/test","screenName":"Comm100","isBotEnabled":false,"chatbotId":"980cce41-58ae-43b2-8de8-37eea94da4a4","percentageToBotWhenOnline":0,"percentageToBotWhenOffline":0,"isDefault":false,"channelIdentity":"{\"UserName\":null,\"Pwd\":null,\"AccountToken\":null,\"AccountSecret\":null,\"AccountTokenExp\":null,\"WebhookId\":null,\"AccountSid\":null,\"AuthToken\":null,\"PhoneNumberSid\":null,\"WeChatAppId\":\"test appid\",\"AccessToken\":\"test token\",\"RefreshToken\":\"test token2\",\"AccessTokenExp\":\"2021-04-22T05:11:58.6757145Z\",\"PageId\":null,\"PageAccessToken\":null}","accountExtInfo":"","filter":"[{\"ChannelId\":\"WeChat\",\"FilterName\":\"WeChat\",\"Enable\":true}]","createdTime":"2021-01-27T03:13:04.866Z","emailAccountInfo":"{\"Type\":0,\"UserName\":null,\"Password\":null,\"SenderName\":null,\"ServerAddress\":null,\"Port\":0,\"IfSSL\":false,\"ServerURL\":null,\"IfSmtpRequiredAuthentication\":false,\"SmtpServerAddress\":null,\"SmtpPort\":0,\"SmtpUserName\":null,\"SmtpPassword\":null,\"SmtpEncrytedConnectionType\":0,\"IfPollSuccess\":false,\"LastPollTime\":\"0001-01-01T00:00:00\",\"FailReason\":null,\"FirstPollStatus\":0}"}' ``` Response: HTTP/1.1 201 Created ``` { "appId": "WeChat", "originalAccountId": "gh_be13d263test", "name": "Comm100", "id": "59c749f4-af8e-eb11-aacf-06c7a219a2ac", "isEnabled": true, "avatarUrl": "http://wx.qlogo.cn/mmopen/vsACyXq1DBiadwp2qnDRDuGbq5304PQsicgV39VfG3LRiaUZhy8AcF90icxIQGicbFHhpjLChoKhPxDNMnWXiaibdibPGFNSc6qImCM9/test", "screenName": "Comm100", "isBotEnabled": false, "chatbotId": "980cce41-58ae-43b2-8de8-37eea94da4a4", "percentageToBotWhenOnline": 0, "percentageToBotWhenOffline": 0, "isDefault": false, "createdTime": "2021-01-27T03:13:04.866Z" } ``` ### DisableBot the Channel Account `POST ticketing/channelAccounts/{id}:disableBot` - #### Parameters: No Parameters - #### Response: [Channel Account](/docs/server-api-ticketing-channel-account#channel-account-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/channelAccounts/59c749f4-af8e-eb11-aacf-06c7a219a2ac:disableBot \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "appId": "WeChat", "originalAccountId": "gh_be13d263test", "name": "Comm100", "id": "59c749f4-af8e-eb11-aacf-06c7a219a2ac", "isEnabled": true, "avatarUrl": "http://wx.qlogo.cn/mmopen/vsACyXq1DBiadwp2qnDRDuGbq5304PQsicgV39VfG3LRiaUZhy8AcF90icxIQGicbFHhpjLChoKhPxDNMnWXiaibdibPGFNSc6qImCM9/test", "screenName": "Comm100", "isBotEnabled": false, "chatbotId": "980cce41-58ae-43b2-8de8-37eea94da4a4", "percentageToBotWhenOnline": 0, "percentageToBotWhenOffline": 0, "isDefault": false, "createdTime": "2021-01-27T03:13:04.866Z" } ``` ### EnableBot the Channel Account `POST ticketing/channelAccounts/{id}:enableBot` - #### Parameters: No Parameters - #### Response: [Channel Account](/docs/server-api-ticketing-channel-account#channel-account-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/channelAccounts/59c749f4-af8e-eb11-aacf-06c7a219a2ac:enableBot \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "appId": "WeChat", "originalAccountId": "gh_be13d263test", "name": "Comm100", "id": "59c749f4-af8e-eb11-aacf-06c7a219a2ac", "isEnabled": true, "avatarUrl": "http://wx.qlogo.cn/mmopen/vsACyXq1DBiadwp2qnDRDuGbq5304PQsicgV39VfG3LRiaUZhy8AcF90icxIQGicbFHhpjLChoKhPxDNMnWXiaibdibPGFNSc6qImCM9/test", "screenName": "Comm100", "isBotEnabled": true, "chatbotId": "980cce41-58ae-43b2-8de8-37eea94da4a4", "percentageToBotWhenOnline": 0, "percentageToBotWhenOffline": 0, "isDefault": false, "createdTime": "2021-01-27T03:13:04.866Z" } ``` ### Update the Channel Account `PUT ticketing/channelAccounts/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `appId` | string | body | yes | Id of the channel app which the channel account belongs to. Allowed values are "Email","Facebook","Facebook","Twitter","WeChat","WeChat","WhatsApp" exc. | | `originalAccountId` | string | body | yes | Id of the channel account in original channel. | | `name` | string | body | yes | Name of the channel account. | | `isEnabled` | bool | body | yes | Whether this channel account is enabled or not. | | `avatarUrl` | string | body | no | Avatar URL of the channel account. | | `screenName` | string | body | yes | Display name. | | `isBotEnabled` | bool | body | yes | Whether this channel account supports bot or not. | | `chatbotId` | guid | body | no | Id of chat bot. | | `percentageToBotWhenOnline` | integer | body | yes | Percentage of routing to bot when there are agents online. | | `percentageToBotWhenOffline` | integer | body | yes | Percentage of routing to bot when all agents are offline. | | `isDefault` | bool | body | yes | Whether the account is set as default email account or not. | | `channelIdentity` | string | body | no | Identity metadata of channel account. | | `accountExtInfo` | string | body | no | | | `filter` | string | body | no | | | `createdTime` | datetime | body | no | Time when the channel account is created. | | `emailAccountInfo` | string | body | no | Email info. | - #### Response: [Channel Account](/docs/server-api-ticketing-channel-account#channel-account-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/channelAccounts/59c749f4-af8e-eb11-aacf-06c7a219a2ac \ -X 'PUT' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"appId":"WeChat","originalAccountId":"gh_be13d263test","name":"Comm100","isEnabled":true,"avatarUrl":"http://wx.qlogo.cn/mmopen/vsACyXq1DBiadwp2qnDRDuGbq5304PQsicgV39VfG3LRiaUZhy8AcF90icxIQGicbFHhpjLChoKhPxDNMnWXiaibdibPGFNSc6qImCM9/test","screenName":"Comm100","isBotEnabled":false,"chatbotId":"980cce41-58ae-43b2-8de8-37eea94da4a4","percentageToBotWhenOnline":0,"percentageToBotWhenOffline":0,"isDefault":false,"channelIdentity":"{\"UserName\":null,\"Pwd\":null,\"AccountToken\":null,\"AccountSecret\":null,\"AccountTokenExp\":null,\"WebhookId\":null,\"AccountSid\":null,\"AuthToken\":null,\"PhoneNumberSid\":null,\"WeChatAppId\":\"test appid\",\"AccessToken\":\"test token\",\"RefreshToken\":\"test token2\",\"AccessTokenExp\":\"2021-04-22T05:11:58.6757145Z\",\"PageId\":null,\"PageAccessToken\":null}","accountExtInfo":"","filter":"[{\"ChannelId\":\"WeChat\",\"FilterName\":\"WeChat\",\"Enable\":true}]","createdTime":"2021-01-27T03:13:04.866Z","emailAccountInfo":"{\"Type\":0,\"UserName\":null,\"Password\":null,\"SenderName\":null,\"ServerAddress\":null,\"Port\":0,\"IfSSL\":false,\"ServerURL\":null,\"IfSmtpRequiredAuthentication\":false,\"SmtpServerAddress\":null,\"SmtpPort\":0,\"SmtpUserName\":null,\"SmtpPassword\":null,\"SmtpEncrytedConnectionType\":0,\"IfPollSuccess\":false,\"LastPollTime\":\"0001-01-01T00:00:00\",\"FailReason\":null,\"FirstPollStatus\":0}"}' ``` Response: HTTP/1.1 200 OK ``` { "appId": "WeChat", "originalAccountId": "gh_be13d263test", "name": "Comm100", "id": "59c749f4-af8e-eb11-aacf-06c7a219a2ac", "isEnabled": true, "avatarUrl": "http://wx.qlogo.cn/mmopen/vsACyXq1DBiadwp2qnDRDuGbq5304PQsicgV39VfG3LRiaUZhy8AcF90icxIQGicbFHhpjLChoKhPxDNMnWXiaibdibPGFNSc6qImCM9/test", "screenName": "Comm100", "isBotEnabled": false, "chatbotId": "980cce41-58ae-43b2-8de8-37eea94da4a4", "percentageToBotWhenOnline": 0, "percentageToBotWhenOffline": 0, "isDefault": false, "createdTime": "2021-01-27T03:13:04.866Z" } ``` ### Remove the Channel Account `DELETE ticketing/channelAccounts/{id}` - #### Parameters: No Parameters - #### Response: No Content - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/channelAccounts/59c749f4-af8e-eb11-aacf-06c7a219a2ac \ -X 'DELETE' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 204 No Content