--- title: "Banned IP" slug: "server-api-livechat-banned-ip" updated: 2022-06-16T05:45:37Z published: 2022-06-16T05:45:37Z canonical: "developer.comm100.com/server-api-livechat-banned-ip" --- > ## 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 IP ## Banned IP You need the Manage Ban List permission to manage Banned Ip. - `Banned IPs` - Banned IPs Manage - `GET livechat/bannedIps` - [Get the list of Banned IPs](/docs/server-api-livechat-banned-ip#get-the-list-of-banned-ips) - `GET livechat/bannedIps/{id}` - [Get a single Banned IP](/docs/server-api-livechat-banned-ip#get-a-single-banned-ip) - `POST livechat/bannedIps` - [Create a new Banned IP](/docs/server-api-livechat-banned-ip#create-a-new-banned-ip) - `PUT livechat/bannedIps/{id}` - [Update the Banned IP](/docs/server-api-livechat-banned-ip#update-the-banned-ip) - `DELETE livechat/bannedIps/{id}` - [Remove the Banned IP](/docs/server-api-livechat-banned-ip#remove-the-banned-ip) ### Banned IP JSON Format Banned IP is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the banned IP. | | `ipRangeFrom` | string | Beginning of the banned IP range. | | `ipRangeTo` | string | End of the banned IP range. | | `comment` | string | Comment of the banned IP. | | `lastUpdatedTime` | timestamp | Last updated time of the banned IP. | | `createdTime` | datetime | Created time of the ban. | | `agentId` | guid | Id of the agent. | ### Get the list of Banned IPs `GET livechat/bannedIps` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed value is "agent". | - #### Response: An array of [Banned IP](/docs/server-api-livechat-banned-ip#banned-ip-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/livechat/bannedIps \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "bannedIps": [ { "id": "7ba1f316-2ae2-49fc-ab65-0114a636c4ca", "ipRangeFrom": "192.168.2.127", "ipRangeTo": "192.168.2.127", "comment": "This comment is used as an example.", "lastUpdatedTime": "2021-04-12T02:50:25.64Z", "createdTime": "2021-04-12T02:40:25.64Z", "agentId": "AF63BFD4-3C20-4D16-833D-C9F9671589CD" } ], "nextPage": null, "previousPage": null, "total": 1 } ``` ### Get a single Banned IP `GET livechat/bannedIps/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed value is "agent". | - #### Response: [Banned IP](/docs/server-api-livechat-banned-ip#banned-ip-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/livechat/bannedIps/7ba1f316-2ae2-49fc-ab65-0114a636c4ca \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "id": "7ba1f316-2ae2-49fc-ab65-0114a636c4ca", "ipRangeFrom": "192.168.2.127", "ipRangeTo": "192.168.2.127", "comment": "This comment is used as an example.", "lastUpdatedTime": "2021-04-12T02:50:25.64Z", "createdTime": "2021-04-12T02:40:25.64Z", "agentId": "AF63BFD4-3C20-4D16-833D-C9F9671589CD" } ``` ### Create a new Banned IP `POST livechat/bannedIps` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `ipRangeFrom` | string | body | yes | Beginning of the banned IP range. | | `ipRangeTo` | string | body | yes | End of the banned IP range. | | `comment` | string | body | no | Comment of the banned IP. | | `agentId` | guid | body | no | Id of the agent. | - #### Response: [Banned IP](/docs/server-api-livechat-banned-ip#banned-ip-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/livechat/bannedIps \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"ipRangeFrom":"192.168.2.127","ipRangeTo":"192.168.2.127","comment":"This comment is used as an example.","agentId":"AF63BFD4-3C20-4D16-833D-C9F9671589CD"}' ``` Response: HTTP/1.1 201 Created ``` { "id": "7ba1f316-2ae2-49fc-ab65-0114a636c4ca", "ipRangeFrom": "192.168.2.127", "ipRangeTo": "192.168.2.127", "comment": "This comment is used as an example.", "lastUpdatedTime": "2021-04-12T02:50:25.64Z", "createdTime": "2021-04-12T02:40:25.64Z", "agentId": "AF63BFD4-3C20-4D16-833D-C9F9671589CD" } ``` ### Update the Banned IP `PUT livechat/bannedIps/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `ipRangeFrom` | string | body | yes | Beginning of the banned IP range. | | `ipRangeTo` | string | body | yes | End of the banned IP range. | | `comment` | string | body | no | Comment of the banned IP. | | `agentId` | guid | body | no | Id of the agent. | - #### Response: [Banned IP](/docs/server-api-livechat-banned-ip#banned-ip-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/livechat/bannedIps/7ba1f316-2ae2-49fc-ab65-0114a636c4ca \ -X 'PUT' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"ipRangeFrom":"192.168.2.127","ipRangeTo":"192.168.2.127","comment":"This comment is used as an example.","agentId":"AF63BFD4-3C20-4D16-833D-C9F9671589CD"}' ``` Response: HTTP/1.1 200 OK ``` { "id": "7ba1f316-2ae2-49fc-ab65-0114a636c4ca", "ipRangeFrom": "192.168.2.127", "ipRangeTo": "192.168.2.127", "comment": "This comment is used as an example.", "lastUpdatedTime": "2021-04-12T02:50:25.64Z", "createdTime": "2021-04-12T02:40:25.64Z", "agentId": "AF63BFD4-3C20-4D16-833D-C9F9671589CD" } ``` ### Remove the Banned IP `DELETE livechat/bannedIps/{id}` - #### Parameters: No Parameters - #### Response: No Content - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/livechat/bannedIps/7ba1f316-2ae2-49fc-ab65-0114a636c4ca \ -X 'DELETE' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 204 No Content