Social guides
Reference
Community settings.
One JSON blob on the community row tunes ranking, comment depth, moderation auto-hide, the post edit window, and group-conversation size. Every key is optional — defaults work out of the box.
How it works
The settings blob
community.settings is a JSON object stored on the community and read at query time by the features below — no restart, no cache invalidation; a PATCH takes effect on the next request. Update it from the admin lane (PATCH /v1/workspaces/:ws/communities/:c). Two things to know about its semantics:
- Replace, not merge. Passing
settingson a PATCH replaces the whole blob. Read-modify-write if you only want to change one key. - Forgiving reads. A key that is missing, of the wrong type, or out of bounds falls back to its default at read time — it never errors. Unrecognized keys (including typos) are stored and returned unchanged but are not consumed by anything, so double-check spelling against the table below.
bash
curl -X PATCH -H "Authorization: Bearer pcft_live_..." \
-H "content-type: application/json" \
-d '{
"settings": {
"ranking": {
"weights": { "recency": 0.8, "engagement": 0.9 },
"half_life_hours": 12
},
"max_comment_depth": 5,
"auto_hide_flag_threshold": 2,
"edit_window_minutes": 60,
"max_group_conversation_size": 25
}
}' \
https://social.productcraft.co/v1/workspaces/<ws>/communities/<c>Reference
Supported keys
| Key | Type | Default | Bounds | Consuming feature |
|---|---|---|---|---|
ranking.weights.recency | number | 1.0 | ≥ 0, finite | Ranked feed — exponential recency decay weight. |
ranking.weights.engagement | number | 0.6 | ≥ 0, finite | Ranked feed — log-scaled comments + reactions signal weight. |
ranking.weights.follow_bias | number | 0.4 | ≥ 0, finite | Ranked feed — follow-graph bias weight. |
ranking.weights.self_boost | number | 0.2 | ≥ 0, finite | Ranked feed — boost that keeps the viewer's own posts visible. |
ranking.half_life_hours | number | 24 | > 0, finite | Ranked feed — hours for a post to lose half its recency score. |
ranking.candidate_window_days | number | 30 | > 0, finite | Ranked feed — posts older than this many days are not scored at all. |
max_comment_depth | integer | 3 | 0–10 (floored) | Comments — maximum thread depth; replying past the cap returns 409. 0 means flat comments. |
auto_hide_flag_threshold | integer | 3 | 0–1000 (floored) | Moderation — distinct-reporter count at which a flagged post/comment is auto-hidden. |
edit_window_minutes | number | 30 | > 0, finite | Posts — minutes after publication during which the body/title can still be edited (EDIT_WINDOW_EXPIRED afterwards). Drafts edit freely. |
max_group_conversation_size | integer | 50 | 2–200 (floored) | Conversations — maximum participants in a group chat; exceeding it returns 409 on create / member add. |
Details
Where each key bites
- Ranking — the six
ranking.*knobs drive the scored feed onGET /actors/:actorId/feed(defaultorder=ranked),GET /discover-feed, andGET /lists/:listId/feed?order=ranked. Each knob falls back independently, so you can override justhalf_life_hoursand keep default weights. See tutorial stage 6 for tuning guidance. - max_comment_depth — depth is computed from
parent_idat create time;0disables threading entirely. Covered in stage 4. - auto_hide_flag_threshold — counts distinct reporters on the same target; stage 9 walks the full flag pipeline.
- edit_window_minutes — enforced on
PATCH /posts/:idbody/title edits; see the edit history guide. - max_group_conversation_size — checked on group create and on every member add; see stage 10 · Messaging.
The same schema is embedded in the OpenAPI spec (the CommunitySettingsDto component on the API reference), so generated SDK types carry these keys too.