Post
/api/v1/omnichannel/contacts.block
Use this endpoint to block an Omnichannel on a specific channel. Permission required: block-livechat-contact
Header parameters
X-Auth-Token
stringRequired
The authToken of the authenticated user.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired
The userId of the authenticated user.
ExamplerbAXPnMktTFbNpwtJ
Body parameters
Example 1
{
"visitor": {
"visitorId": "68f0d2c201e202fefed83672",
"source": {
"type": "widget"
}
}
}object
visitor
object Required
The visitor object contains the details of the contact that you want to block.
visitorId
string Required
Enter the visitor ID of the contact that you want to block. To get the visitor ID, you can use the Search Omnichannel Contacts endpoint.
Example68f0d2c201e202fefed83672
source
object Required
The source object contains the channels from which you want to block the contact. To get the room types, you can use the View Omnichannel Room Sources endpoint.
type
string Required
Enter the type of channel from which you want to block the contact.
Examplewidget
Responses
200
OK
Success
{
"success": true
}object
success
boolean
400
Bad Request
Example 1
{
"success": false,
"error": "must have required property 'visitor' [invalid-params]",
"errorType": "invalid-params"
}Example 2
{
"success": false,
"error": "error-contact-not-found"
}object
success
boolean
error
string
errorType
string
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}object
status
string
message
string