Documentation

Posts

Create, schedule, inspect, and delete posts. Fetch analytics and comments per delivery.

Create a post

POST /api/v1/posts with one or more connected account IDs. unifeed enqueues publishing via QStash (or runs in-process in local dev without QStash).

POST /api/v1/posts

{
  "tenant_id": "ws_abc123",
  "accounts": ["acct_instagram", "acct_facebook"],
  "containers": [{
    "content": "Caption text",
    "media": [{ "url": "https://cdn.example.com/image.jpg" }]
  }],
  "scheduledAt": "2026-06-15T14:00:00.000Z"
}

→ { "success": true, "post": { "id": "cm8abc123...", "status": "queued" } }

Post status

GET /api/v1/posts/:id returns the unifeed post, delivery rows, and per-platform platformPostId when published.

Delivery statuses: pending, publishing, published, failed, scheduled.

Analytics

GET /api/v1/posts/:id/analytics returns metrics per connected account and aggregated totals (likes, comments, shares, impressions, reach).

Instagram and Facebook use platform-specific insight APIs. Metrics may be unavailable immediately after publish or for certain post types.

Comments

GET /api/v1/posts/:id/replies lists comments across deliveries.

POST /api/v1/posts/:id/replies with content and account_username to reply as a connected account.

POST /api/v1/posts/:id/replies

{
  "content": "Thanks for your support!",
  "account_username": "yourbrand"
}

Cancel

DELETE /api/v1/posts/:id cancels pending or scheduled deliveries. Already-published platform posts are not deleted from the network.