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 settings on 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

KeyTypeDefaultBoundsConsuming feature
ranking.weights.recencynumber1.0≥ 0, finiteRanked feed — exponential recency decay weight.
ranking.weights.engagementnumber0.6≥ 0, finiteRanked feed — log-scaled comments + reactions signal weight.
ranking.weights.follow_biasnumber0.4≥ 0, finiteRanked feed — follow-graph bias weight.
ranking.weights.self_boostnumber0.2≥ 0, finiteRanked feed — boost that keeps the viewer's own posts visible.
ranking.half_life_hoursnumber24> 0, finiteRanked feed — hours for a post to lose half its recency score.
ranking.candidate_window_daysnumber30> 0, finiteRanked feed — posts older than this many days are not scored at all.
max_comment_depthinteger30–10 (floored)Comments — maximum thread depth; replying past the cap returns 409. 0 means flat comments.
auto_hide_flag_thresholdinteger30–1000 (floored)Moderation — distinct-reporter count at which a flagged post/comment is auto-hidden.
edit_window_minutesnumber30> 0, finitePosts — minutes after publication during which the body/title can still be edited (EDIT_WINDOW_EXPIRED afterwards). Drafts edit freely.
max_group_conversation_sizeinteger502–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 on GET /actors/:actorId/feed (default order=ranked), GET /discover-feed, and GET /lists/:listId/feed?order=ranked. Each knob falls back independently, so you can override just half_life_hours and keep default weights. See tutorial stage 6 for tuning guidance.
  • max_comment_depth — depth is computed from parent_id at create time; 0 disables 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/:id body/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.