Schedule a social media post with one API call (tutorial)
A step-by-step REST API tutorial: get a key, find your accounts and schedule one post to Facebook, Instagram and 17 more networks — with retries that never double-post.
- 1Create a key
- 2List accounts
- 3POST /posts
- 4Get a webhook
If you already have content in your own system — a CMS, an events calendar, a shop — the fastest way to get it onto social media is to send it there from code. Here's the whole flow with the Publishing Studio API.
1. Create an API key
In the studio, open Settings › Publishing API keys and create a key with the accounts:read and posts:write scopes. It starts with ps_. Keep it on your server.
2. Find the accounts to post to
Call GET https://dashboard.lifebliss.app/api/v1/accounts with your key as a bearer token. Each account in the response has an id — that's what you publish to. To post to a whole account group instead, list groups with GET /account-groups.
3. Schedule the post
- 1Send POST /posts
With your text in content, your media in mediaItems, the accounts in targets (or a group in groupIds), and scheduledFor with a timezone.
- 2Add 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, not a second post.
- 3Tailor per network if needed
Give any target its own customContent or customMedia — a shorter caption for X, a different image for Instagram.
A scheduled post answers 201 with its id. Publishing immediately (publishNow) to a few accounts answers with each network's result; a post that reached some networks but not others answers 207 — the successes stay live.
4. Hear back by webhook
- post.publishedEvery network published.
- post.partialSome published, some failed — retry only the failures.
- account.needs_reauthAn account must be reconnected before it can publish again.
Every webhook is signed, so you can verify it came from us, and retried for about 22 hours if your server is down.
Production checklist
- Keep keys server-side, with only the scopes each integration needs
- Always send an Idempotency-Key on POST /posts
- Retry failed networks with POST /posts/{id}/retry — never re-send the whole post
- Verify webhook signatures
- Log the X-Request-Id header for support
Full request and response examples are in the quickstart and the API reference.
Do API calls cost extra?
No. The API, webhooks and headless connect are included on every plan. Only X is billed separately, at X's own API rates.
How many requests can I make?
120 requests per key per minute.
Can my users connect their own accounts through my app?
Yes, with headless connect — they sign in to each network from your product.