Get started

Quickstart

From a new API key to a published post in four requests. You need a Publishing Studio account with at least one connected social account.

  1. Create an API key

    In the studio, open Settings › Publishing API keys and create a key. Give it the scopes it needs — accounts:read and posts:write for this guide — an expiry date and, if you like, the account groups it is limited to. Copy the key; it starts with ps_.

    Terminal
    export PS_API_KEY="ps_…"
  2. Check it works

    Ask the API who you are. A 200 means the key is valid; 401 means it is wrong or expired.

    Request
    curl "https://dashboard.lifebliss.app/api/v1/identity" \
      -H "Authorization: Bearer $PS_API_KEY"
  3. Find your accounts

    List the accounts this key may publish to. Each one has an id — that is the accountId you publish with.

    Request
    curl "https://dashboard.lifebliss.app/api/v1/accounts" \
      -H "Authorization: Bearer $PS_API_KEY"
    Response · 200
    {
      "accounts": [
        {
          "id": "8f0c2a6e-…",
          "platform": "facebook",
          "label": "Facebook",
          "displayName": "Main Page",
          "status": "active",
          "needsReauth": false
        }
      ]
    }

    Publish to a whole group instead with groupIds; list them with GET/account-groups.

  4. Publish

    Send the post with an Idempotency-Key — any unique string, such as a UUID. If the request times out, send it again with the same key and body: you get the original result back instead of a second post.

    Request
    curl -X POST "https://dashboard.lifebliss.app/api/v1/posts" \
      -H "Authorization: Bearer $PS_API_KEY" \
      -H "Idempotency-Key: $(uuidgen)" \
      -H "Content-Type: application/json" \
      -d '{
        "content": "Hello from the Publishing Studio API",
        "targets": [{ "accountId": "8f0c2a6e-…" }],
        "publishNow": true
      }'
    Response · 201
    {
      "postId": "c1d2…",
      "status": "published",
      "targets": [
        {
          "targetId": "…",
          "platform": "facebook",
          "status": "published",
          "platformPostUrl": "https://www.facebook.com/…"
        }
      ]
    }

    With up to 10 targets, publishNow answers with the result: 201 when everything published, 207 when some networks failed. Larger posts — or a request with Prefer: respond-async — are queued and answer 202 with an id to check.

The same in Node.js

Scheduling instead of publishing: leave out publishNow and send scheduledFor.

publish.mjs
const API = "https://dashboard.lifebliss.app/api/v1";
const headers = {
  Authorization: `Bearer ${process.env.PS_API_KEY}`,
  "Content-Type": "application/json",
};

// 1. Find the accounts this key may publish to
const { accounts } = await fetch(`${API}/accounts`, { headers }).then((r) => r.json());

// 2. Schedule one post to all of them
const res = await fetch(`${API}/posts`, {
  method: "POST",
  headers: { ...headers, "Idempotency-Key": crypto.randomUUID() },
  body: JSON.stringify({
    content: "Tonight at 7 — join us live.",
    targets: accounts.map((a) => ({ accountId: a.id })),
    scheduledFor: "2026-11-01T13:30:00Z",
  }),
});

console.log(res.status, await res.json()); // 201 { id, status: "scheduled", … }

Next steps