Block a chatroom for an ambassador
Headers
-
The id of the target brand
Path parameters
-
The chatroom id
-
The ambassador id
Body
-
Block value , (true: blocked, false: unblocked)
PATCH /chat/chatrooms/{chatroom}/ambassadors/{ambassador}/block
curl \
-X PATCH https://domain.tld/api/v2/chat/chatrooms/{chatroom}/ambassadors/{ambassador}/block \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "X-Popsell-Brand: 3" \
-d '{"is_blocked":true}'
Request examples
# Headers
X-Popsell-Brand: 3
# Payload
{
"is_blocked": true
}
Response examples (200)
{
"message": "chatroom 12 blocked successfully for ambassador 3"
}
Response examples (401)
{
"message": "Unauthorized."
}
Response examples (422)
{
"message": "field is required! (and 3 more error)",
"errors": {
"field": [
"Error message details here"
],
"additionalProperty1": [
"Error message details here"
],
"additionalProperty2": [
"Error message details here"
]
}
}