--- title: "Banned Visitor" slug: "server-api-livechat-banned-visitor" updated: 2022-06-21T10:08:15Z published: 2022-06-21T10:08:15Z canonical: "developer.comm100.com/server-api-livechat-banned-visitor" --- > ## 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. # Banned Visitor ## Banned Visitor You need the Manage Ban List to manage Banned Visitors. - `Banned Visitors` - Banned Visitors Manage - `GET livechat/bannedVisitors` - [Get the list of Banned Visitors](/docs/server-api-livechat-banned-visitor#get-the-list-of-banned-visitors) - `GET livechat/bannedVisitors/{id}` - [Get a single Banned Visitor](/docs/server-api-livechat-banned-visitor#get-a-single-banned-visitor) - `POST livechat/bannedVisitors` - [Create a new Banned Visitor](/docs/server-api-livechat-banned-visitor#create-a-new-banned-visitor) - `PUT livechat/bannedVisitors/{id}` - [Update the Banned Visitor](/docs/server-api-livechat-banned-visitor#update-the-banned-visitor) - `DELETE livechat/bannedVisitors/{id}` - [Remove the Banned Visitor](/docs/server-api-livechat-banned-visitor#remove-the-banned-visitor) ### Banned Visitor JSON Format Banned Visitor is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the ban. | | `comment` | string | Comment of the ban. | | `visitorId` | guid | Id of the visitor. | | `lastUpdatedTime` | timestamp | Last updated time of the ban. | | `createdTime` | datetime | Created time of the ban. | | `agentId` | guid | Id of the agent. | ### Get the list of Banned Visitors `GET livechat/bannedVisitors` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed value is "agent". | - #### Response: An array of [Banned Visitor](/docs/server-api-livechat-banned-visitor#banned-visitor-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/livechat/bannedVisitors \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "bannedVisitors": [ { "id": "66AE5329-7C46-EB11-8100-00155D081D0B", "comment": "This visitor is a hacker.", "visitorId": "6CAE5329-7C46-EB11-8100-00155D081D0B", "lastUpdatedTime": "2021-04-07T07:26:40.867Z", "createdTime": "2021-04-12T02:40:25.64Z", "agentId": "66578086-4FBB-4098-80F2-8B0BCBA7DD33" } ], "nextPage": null, "previousPage": null, "total": 1 } ``` ### Get a single Banned Visitor `GET livechat/bannedVisitors/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed value is "agent". | - #### Response: [Banned Visitor](/docs/server-api-livechat-banned-visitor#banned-visitor-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/livechat/bannedVisitors/66AE5329-7C46-EB11-8100-00155D081D0B \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "id": "66AE5329-7C46-EB11-8100-00155D081D0B", "comment": "This visitor is a hacker.", "visitorId": "6CAE5329-7C46-EB11-8100-00155D081D0B", "lastUpdatedTime": "2021-04-07T07:26:40.867Z", "createdTime": "2021-04-12T02:40:25.64Z", "agentId": "66578086-4FBB-4098-80F2-8B0BCBA7DD33" } ``` ### Create a new Banned Visitor `POST livechat/bannedVisitors` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `comment` | string | body | no | Comment of the ban. | | `visitorId` | guid | body | yes | Id of the visitor. | | `agentId` | guid | body | no | Id of the agent. | - #### Response: [Banned Visitor](/docs/server-api-livechat-banned-visitor#banned-visitor-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/livechat/bannedVisitors \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"comment":"This visitor is a hacker.","visitorId":"6CAE5329-7C46-EB11-8100-00155D081D0B","agentId":"66578086-4FBB-4098-80F2-8B0BCBA7DD33"}' ``` Response: HTTP/1.1 201 Created ``` { "id": "66AE5329-7C46-EB11-8100-00155D081D0B", "comment": "This visitor is a hacker.", "visitorId": "6CAE5329-7C46-EB11-8100-00155D081D0B", "lastUpdatedTime": "2021-04-07T07:26:40.867Z", "createdTime": "2021-04-12T02:40:25.64Z", "agentId": "66578086-4FBB-4098-80F2-8B0BCBA7DD33" } ``` ### Update the Banned Visitor `PUT livechat/bannedVisitors/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `comment` | string | body | no | Comment of the ban. | | `visitorId` | guid | body | yes | Id of the visitor. | | `agentId` | guid | body | no | Id of the agent. | - #### Response: [Banned Visitor](/docs/server-api-livechat-banned-visitor#banned-visitor-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/livechat/bannedVisitors/66AE5329-7C46-EB11-8100-00155D081D0B \ -X 'PUT' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"comment":"This visitor is a hacker.","visitorId":"6CAE5329-7C46-EB11-8100-00155D081D0B","agentId":"66578086-4FBB-4098-80F2-8B0BCBA7DD33"}' ``` Response: HTTP/1.1 200 OK ``` { "id": "66AE5329-7C46-EB11-8100-00155D081D0B", "comment": "This visitor is a hacker.", "visitorId": "6CAE5329-7C46-EB11-8100-00155D081D0B", "lastUpdatedTime": "2021-04-07T07:26:40.867Z", "createdTime": "2021-04-12T02:40:25.64Z", "agentId": "66578086-4FBB-4098-80F2-8B0BCBA7DD33" } ``` ### Remove the Banned Visitor `DELETE livechat/bannedVisitors/{id}` - #### Parameters: No Parameters - #### Response: No Content - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/livechat/bannedVisitors/66AE5329-7C46-EB11-8100-00155D081D0B \ -X 'DELETE' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 204 No Content