Social API reference

Social API · Collections

post/v1/communities/{community_id}/collections/{collection_id}/itemsAuth

Add a post to a collection (owner only). Idempotent per (collection, post).

Path parameters

community_id*string

Social community UUID.

collection_id*string · uuid

Id of the collection.

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_idstring · uuid

The acting actor; must be the collection owner. Send it, or the deprecated `caller_actor_id`; one of the two is required.

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

caller_actor_idstring · uuid

Deprecated alias of `actor_id`; send `actor_id`.

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

post_id*string · uuid

The post to add.

Example: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"

positionnumber

Curator ordering position.

Response · 201 Item added (or already present).

collection_id*string · uuid

Id of the collection.

Example: "99999999-0000-0000-0000-000000000001"

post_id*string · uuid

Id of the post in the collection.

Example: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"

community_id*string · uuid

Id of the community.

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

position*number

Owner-defined ordering position.

Example: 0

added_at*string · date-time

When the post was added.

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

Example

Request

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

{
  "actor_id": "aaaaaaaa-0000-0000-0000-000000000001",
  "caller_actor_id": "aaaaaaaa-0000-0000-0000-000000000001",
  "post_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
  "position": 0
}

Response

{
  "collection_id": "99999999-0000-0000-0000-000000000001",
  "post_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
  "community_id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
  "position": 0,
  "added_at": "2026-05-01T12:00:00.000Z"
}