Reactions & Moderation
Reactions, bookmarks, content reporting, and community bans
Reactions & Moderation
Reaction Types
Each tenant defines its own reaction types (emoji palette).
// Get available reaction types
const { docs: types } = await client.community.getReactionTypes()
// [{ id, title, slug, emoji }, ...]React to Threads
// Add reaction (pass the reaction type ID)
await client.community.addReaction({
threadId: 'thread-id',
type: reactionType.id,
})
// Remove reaction (pass the reaction type slug)
await client.community.removeReaction({
threadId: 'thread-id',
type: reactionType.slug,
})addReaction accepts the reaction type ID, while removeReaction accepts the reaction type slug. Keep both values available when implementing toggle behavior.
// Get reaction summary
const summary = await client.community.getReactionSummary({
threadId: 'thread-id',
})
// summary.counts → { 'thumbs-up': 3, 'heart': 1 }
// summary.total → 4
// summary.userReactions → ['thumbs-up'] (if authenticated)React to Comments
await client.community.addCommentReaction({
commentId: 'comment-id',
type: reactionType.id,
})
await client.community.removeCommentReaction({
commentId: 'comment-id',
type: reactionType.slug,
})One reaction per customer per target per type. Duplicate reactions return 409 Conflict.
Bookmarks
Save threads for later access.
// Bookmark a thread
await client.community.addBookmark({ threadId: 'thread-id' })
// Remove bookmark
await client.community.removeBookmark({ threadId: 'thread-id' })
// List my bookmarks
const { docs: bookmarks } = await client.community.getMyBookmarks({
page: 1,
limit: 10,
})Reporting Content
Customers can report threads or comments for moderation.
// Report a thread
await client.community.reportThread({
threadId: 'thread-id',
reason: 'spam', // 'spam' | 'harassment' | 'inappropriate' | 'off-topic' | 'other'
reasonDetail: 'This is promotional spam', // optional, max 500 chars
})
// Report a comment
await client.community.reportComment({
commentId: 'comment-id',
reason: 'harassment',
})One report per customer per target. When a thread or comment reaches 5 reports, it is automatically hidden from public view.
Community Bans (Admin)
Admins can ban customers from community participation using ServerClient. See SDK Setup for creating a server client.
// Ban a customer
await serverClient.community.banCustomer({
customerId: 'customer-id',
isPermanent: false,
bannedUntil: '2026-12-31T23:59:59Z', // temporary ban
reason: 'Repeated harassment',
})
// Unban
await serverClient.community.unbanCustomer({
customerId: 'customer-id',
})Banned customers receive a 403 error when attempting to create threads or comments.
Collection Reference
For detailed field specifications, see Community Collections.