Banned Visitor
  • 21 Jun 2022
  • 2 Minutes to read
  • Dark
    Light

Banned Visitor

  • Dark
    Light

Article Summary

Banned Visitor

You need the Manage Ban List to manage Banned Visitors.

Banned Visitor JSON Format

Banned Visitor is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idguidId of the ban.
commentstringComment of the ban.
visitorIdguidId of the visitor.
lastUpdatedTimetimestampLast updated time of the ban.
createdTimedatetimeCreated time of the ban.
agentIdguidId of the agent.

Get the list of Banned Visitors

GET livechat/bannedVisitors

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed value is "agent".
  • Response:

An array of Banned Visitor

  • 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:

NameTypeinRequiredDescription
includestringquerynoAllowed value is "agent".
  • Response:

Banned Visitor

  • 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:

NameTypeinRequiredDescription
commentstringbodynoComment of the ban.
visitorIdguidbodyyesId of the visitor.
agentIdguidbodynoId of the agent.
  • Response:

Banned Visitor

  • 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:

NameTypeinRequiredDescription
commentstringbodynoComment of the ban.
visitorIdguidbodyyesId of the visitor.
agentIdguidbodynoId of the agent.
  • Response:

Banned Visitor

  • 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


Was this article helpful?

What's Next