Social API reference

Social API · Edges

post/v1/communities/{community_id}/follows/batchAuth

Bulk follow creation (max 200 per call) — the graph-import lane. Each item runs the exact single-follow path (block checks, counters, idempotency), so a blocked pair fails ITS item with a 409 in `error` while the rest of the batch proceeds. `201` even with failures — inspect per-item results. Set `suppress_notifications: true` when importing an existing graph.

Path parameters

community_id*string

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

Request body

follows*array

Follow edges to create, in order. 1–200 items; each item follows the single-follow body exactly.

suppress_notificationsboolean

Import lane: when `true`, the per-item `edge.follow.created` fan-out (follow notifications AND webhooks) is skipped for this batch. Follower/following counters still update. Use when importing an existing graph so long-standing followers don't get "X followed you" notifications.

Example: true

Response · 201 Per-item results, request order. `succeeded` + `failed` summarise the batch.

data*array

One result per input item, same order.

succeeded*number

Count of successful items.

Example: 4999

failed*number

Count of failed items.

Example: 1

Example

Request

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

{
  "follows": [
    {
      "actor_id": "aaaaaaaa-0000-0000-0000-000000000001",
      "dst_actor_id": "aaaaaaaa-0000-0000-0000-000000000002",
      "payload": {}
    }
  ],
  "suppress_notifications": true
}

Response

{
  "data": [
    {
      "index": 0,
      "success": true,
      "edge": {},
      "created": true,
      "error": {}
    }
  ],
  "succeeded": 4999,
  "failed": 1
}