Social API reference

Social API · Connections

post/v1/communities/{community_id}/connectionsAuth

Request a connection (mutual follow). Runs the standard follow path: a private destination yields `pending` (accept via the accept route); a public destination connects immediately — the reverse edge is created in the same call. Idempotent; refused on blocks (409) and self-connection (422) exactly like a follow.

Path parameters

community_id*string · uuid

Id of the community.

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

src_actor_id*string · uuid

Requesting actor UUID.

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

dst_actor_id*string · uuid

Actor being invited to connect.

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

Response · 201 `pending` (request created / already open) or `connected` (both edges in place).

status*object

'pending' — a connection request now awaits the destination's accept. 'connected' — both follow edges exist.

created*boolean

False when the call was an idempotent replay.

Example

Request

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

{
  "src_actor_id": "aaaaaaaa-0000-0000-0000-000000000001",
  "dst_actor_id": "aaaaaaaa-0000-0000-0000-000000000002"
}

Response

{
  "status": {},
  "created": false
}