Social API reference

Social API · Edges

post/v1/communities/{community_id}/restrictsAuth

Restrict another actor (Instagram-style). One-directional. Restricted actors can still see content, but new comments by them are pre-moderated as `pending_approval` until the post-author approves.

Path parameters

community_id*string

Social community UUID. Must belong to the PAK's workspace.

Headers

Idempotency-Keystring

Opaque client-generated string (1-256 chars, `[A-Za-z0-9._:-]`) that makes a retry safe: within 24 h a repeat with the same key and body returns the original response with `Idempotent-Replay: true` instead of running again. Same key with a different body is `409 IDEMPOTENCY_KEY_REUSE`.

Request body

actor_id*string · uuid

Acting social actor UUID (the one performing the follow / mute / block / restrict). Standardized name (task 008 / G11).

Example: "aaaaaaaa-0000-0000-0000-000000000001"

dst_actor_id*string · uuid

Destination social actor UUID (the one being followed / muted / blocked / restricted).

Example: "aaaaaaaa-0000-0000-0000-000000000002"

payloadobject

Optional free-form payload stored on the edge (e.g. mute reason).

Response · 201 Restrict edge created (or returned via idempotent retry).

edge*object
id*string · uuid

Edge UUID.

Example: "eeeeeeee-0000-0000-0000-000000000001"

community_id*string · uuid

Owning community UUID.

Example: "cccccccc-cccc-cccc-cccc-cccccccccccc"

kind*object

Edge kind. The actor-edge routes emit exactly these four; post reactions and bookmarks have their own response shapes.

Example: "follow"

src_actor_id*string · uuid

Source actor UUID.

Example: "aaaaaaaa-0000-0000-0000-000000000001"

dst_actor_id*string · uuid

Destination actor UUID (for actor edges).

Example: "aaaaaaaa-0000-0000-0000-000000000002"

dst_post_id*string · uuid

Destination post UUID (for reaction / save edges).

Example: null

payload*object

Free-form payload stored on the edge (e.g. mute reason).

Example: {}

created_at*string · date-time

ISO timestamp the edge was created.

Example: "2026-05-01T12:00:00.000Z"

created*boolean

`true` if the edge was created on this call; `false` on idempotent retry of an existing edge.

Example: true

Example

Request

POST https://social.productcraft.co/v1/communities/{community_id}/restricts
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "actor_id": "aaaaaaaa-0000-0000-0000-000000000001",
  "dst_actor_id": "aaaaaaaa-0000-0000-0000-000000000002",
  "payload": {}
}

Response

{
  "edge": {
    "id": "eeeeeeee-0000-0000-0000-000000000001",
    "community_id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
    "kind": "follow",
    "src_actor_id": "aaaaaaaa-0000-0000-0000-000000000001",
    "dst_actor_id": "aaaaaaaa-0000-0000-0000-000000000002",
    "dst_post_id": null,
    "payload": {},
    "created_at": "2026-05-01T12:00:00.000Z"
  },
  "created": true
}