Assign moderators to discussions
Route each discussion to a specific moderator — the "Assigned to" of the moderation back-office — over the API.
Large communities split moderation by hand: one moderator owns a topic, another owns the rest. GraphComment records this as an assignment — a discussion (thread) is assigned to a specific moderator. It is exactly what the moderation back-office shows under "Assigned to", and you can drive it from your own tools over the API.
This guide covers assigning a moderator to a discussion and clearing that assignment. Every call is authenticated with the JWT of a member of the site's staff — owner, administrator or moderator.
The moderator must already belong to the siteYou can only assign someone who is already a moderator, administrator or the owner of the site. Add moderators first in the back-office, under Website settings → Moderators.
Authenticate
Log in a member of the site's staff (owner, administrator or moderator) to obtain a JWT, then send it on every call as Authorization: jwt <token>.
curl -X POST "https://api.graphcomment.com/api/users/login" \
-H "Content-Type: application/json" \
-d '{ "username": "[email protected]", "password": "••••••" }'
The scheme isjwt, notBearerGraphComment JWTs are sent as
Authorization: jwt <token>. ABearerprefix is a different mechanism and will be rejected.
Assign a moderator
You need the discussion's thread_id and the moderator's user id (manager_id).
curl -X PUT \
"https://api.graphcomment.com/api/thread/<thread_id>/manager/<manager_id>" \
-H "Authorization: jwt <token>"A 200 (empty body) means the discussion is now assigned to that moderator. A 403 means either you are not part of the site's staff (owner, administrator or moderator), or the target is not one of its staff members (manager not in website's moderators list).
Clear the assignment
curl -X DELETE \
"https://api.graphcomment.com/api/thread/<thread_id>/manager" \
-H "Authorization: jwt <token>"The discussion goes back to Everybody (unassigned).
Next steps
- API reference: Assign a moderator · Clear the assignment
- Single Sign-On
Updated 6 days ago
