Documentation

Moderator Role API

This guide explains how to assign a moderator role to a user in a specific chat room using backend-to-backend communication.

Endpoint

https://chatbackend.watchers.io/user/external/moder

Request Parameters

ParameterDescription
decryptedUserIdThe unencrypted ID of the user
roomIdThe ID of the existing chat room

Required Headers

ParameterDescription
x-api-keyYour public API key used for the project
AuthorizationBearer token what you can get from the back office (Admin panel / Settings / Bearer tokens) for back-to-back integrations

Example Request (cURL)

curl --location 'https://chatbackend.watchers.io/user/external/moder' \
--header 'x-api-key: {API KEY}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {TOKEN}' \
--data '{
  "decryptedUserId": "{unencrypted user id}",
  "roomId": "{existing room id}"
}'

Example Success Response

HTTP/1.1 201 Created
true