Quickstart
The shortest useful path through UniPost is: create an API key, connect an account, fetch its account ID, publish with `platform_posts[]`, and validate before you automate. This page is written to get a real integration working, not just to show what the API looks like.
What you are building
UniPost is most useful when you think of it as one publishing layer with three responsibilities: connect accounts, publish content with platform-aware payloads, and read back operational or analytics signals.
| Step | Why it matters |
|---|---|
| Create an API key | Establish auth for every request |
| Connect an account | Get a valid `social_account_id` |
| List accounts | Verify the account exists and capture its ID |
| Publish with `platform_posts[]` | Use the recommended shape for per-platform copy |
| Validate before automation | Catch platform errors before publish |
1. Create an API key
Create a workspace in UniPost, then generate an API key from the dashboard. Production keys start with up_live_. Test keys start with up_test_.
2. Connect an account
For your own team-owned accounts, connect directly. For customer-owned accounts, use Connect sessions later. The example below uses Bluesky because it is the shortest direct API flow.
curl -X POST https://api.unipost.dev/v1/social-accounts/connect \
-H "Authorization: Bearer up_live_xxxx" \
-H "Content-Type: application/json" \
-d '{
"platform": "bluesky",
"credentials": {
"handle": "alice.bsky.social",
"app_password": "xxxx-xxxx-xxxx-xxxx"
}
}'3. List accounts and capture the ID
After connecting, list the workspace's social accounts and copy the one you want to publish to. Every publish request ultimately needs a UniPost account ID, not a platform username.
curl https://api.unipost.dev/v1/social-accounts \
-H "Authorization: Bearer up_live_xxxx"4. Publish your first post
The recommended request shape is platform_posts[]. It keeps each platform's caption, media, and options separate, and it works better for AI-generated content than the older caption + account_ids shape.
curl -X POST https://api.unipost.dev/v1/social-posts \
-H "Authorization: Bearer up_live_xxxx" \
-H "Content-Type: application/json" \
-d '{
"platform_posts": [
{
"account_id": "sa_twitter_123",
"caption": "Shipping on every platform with one API."
},
{
"account_id": "sa_linkedin_456",
"caption": "We shipped a new release today. Here is what changed."
}
],
"idempotency_key": "launch-2026-04-13-001"
}'Add idempotency_key from day one. If you retry the same request within 24 hours, UniPost returns the original response instead of double-posting.
5. Validate before publish
Before any automated publish path, call Validate with the same body you plan to send to POST /v1/social-posts. UniPost catches caption overages, unsupported media combinations, and platform-specific field conflicts before the request writes anything.
curl -X POST https://api.unipost.dev/v1/social-posts/validate \
-H "Authorization: Bearer up_live_xxxx" \
-H "Content-Type: application/json" \
-d '{
"platform_posts": [
{
"account_id": "sa_twitter_123",
"caption": "This is a draft to validate before publish"
}
]
}'What to add next
| Next capability | When to add it | Docs path |
|---|---|---|
| Drafts + preview links | When a human should review before publish | API Reference → Drafts / Preview Links |
| Connect sessions | When your customers connect their own end-user accounts | API References → Connect Sessions |
| Analytics | When you need reporting or agent feedback loops | API References → Analytics |
| Platform guides | When you need exact per-platform content rules | Platforms |