POST

/api/im/contacts/{userId}/block

Block user

Block a user. If they were a friend, the relation is removed.

Blocked user receives a contact:blocked WebSocket event.

curl -s -X POST "$BASE/api/im/contacts/$USER_ID/block" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason": "Spam messages"}'

Parameters

FieldTypeReqDefaultDescription
userIdstringY

Request Body

FieldTypeReqDefaultDescription
reasonstringNOptional block reason

Try it out

Path Parameters
/api/im/contacts/{userId}/block
Sign in to use your API key
Request Body
Response
Click Execute to test