# Social media API request builder

Write a caption, pick what should happen to the post, and copy a working create-post request for curl or your language. One API call drafts, schedules or publishes to X, LinkedIn, Instagram, Facebook, TikTok and more.

## Example: create a draft with curl

```bash
curl -X POST https://postboost.co/app/api/YOUR_WORKSPACE_UUID/posts \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "accounts": [
      123
    ],
    "versions": [
      {
        "account_id": 0,
        "is_original": true,
        "content": [
          {
            "body": "Hello from the PostBoost API!"
          }
        ]
      }
    ]
  }'
```

## One request for every network

The PostBoost REST API publishes to every connected network with the same call. You send one `POST /{workspaceUuid}/posts` with a list of account ids and a version that holds the caption, and PostBoost turns it into a Facebook Page post, an Instagram caption, a LinkedIn post, an X post and so on. When a post is scheduled, each network's requirements, such as X's 280 characters or a network that needs media, are checked before anything is saved, and a request that breaks one comes back as a 422 error. Validate first runs the same checks for any post.

## Pick a mode

Most integrations start with drafts: the post appears in the PostBoost calendar and a person reviews it before it goes out. Scheduling needs a date, a time and a timezone; without a timezone the workspace timezone is used. The queue picks the next free slot of the workspace's posting schedule. Publish now sends the post right away.

## SDKs and the CLI

The SDKs for Python, Node.js, PHP, Go, Ruby, Java, C# and Rust and the Bash CLI are generated from the same OpenAPI spec as the API reference, so the field names match the curl request. Install commands for each SDK are in the SDK docs. Errors come back as JSON, and repeating a request with the same Idempotency-Key header within 24 hours never creates a second post.

## Test safely

Run your first requests as drafts or with Validate first. Neither publishes anything, and drafts can be deleted from the calendar. The duplicate guard refuses a post with the same text for the same account within 24 hours, which protects you from a retry loop posting twice.

## How to use

1. Write your caption and tick the networks you post to; the length check shows each network's limit.
2. Enter your account ids, or keep the 123 placeholder for now.
3. Pick save as draft, schedule (date, time, timezone), add to queue or publish now.
4. Copy the request for curl or your language.
5. Replace YOUR_API_TOKEN and YOUR_WORKSPACE_UUID in your terminal or code, then run it.

## FAQ

### Do I enter my API token on this page?

No. The page has no token field and sends nothing anywhere: every request is built in your browser with YOUR_API_TOKEN and YOUR_WORKSPACE_UUID placeholders. Paste your real token in your terminal or your code, never into a web page.

### Where do I get an API token and my workspace UUID?

Create a free PostBoost account, then create an access token from the avatar menu in the top bar (Access Tokens). The token is shown only once. Your workspace UUID is the long id in the dashboard address, right after /app/.

### Where do I find my account ids?

Call GET /{workspaceUuid}/accounts with your token. Each connected social account has a numeric id; put the ids of the accounts you want to post to in the accounts list.

### What do draft, schedule, queue and publish now send?

A draft sends no flag and saves the post for review. Schedule sends schedule: true with date, time and timezone. Add to queue sends queue: true and takes the next free slot of your posting schedule. Publish now sends schedule_now: true.

### What does Validate first do?

It adds a call to POST /{workspaceUuid}/posts/validate with the same body before the create call. It runs every check the create call runs, including each network's requirements (text length, media, links), duplicate content, daily caps and account health, and saves nothing. It always answers 200; read the valid field.

### Is the API available on the free plan?

Yes. The REST API, the SDKs and the MCP server are on every plan, with no per-call fees. API requests are limited to 60 per minute.

### Can I post the same text to several networks?

Yes. The version with account_id 0 is the original, and its text goes to every account in the accounts list. Add more versions with an account's id to change the text for that account only.

## Related

- [MCP server config generator for social media](https://postboost.co/tools/mcp-config-generator): Get the exact MCP setup to connect Claude, ChatGPT, Claude Code, Cursor, VS Code, Codex, Gemini CLI or n8n to PostBoost's social media MCP server.
- [Social media character counter](https://postboost.co/tools/social-media-character-counter): Free character counter for X, Threads, Bluesky, Instagram, LinkedIn, TikTok and more. Counts as each network does, live in your browser.
- [Social media post checker: check your post before you publish](https://postboost.co/tools/social-media-post-checker): Check a post before posting: character limits, hashtags, media count, video length and see-more cut-offs for X, Instagram, LinkedIn, TikTok and more.
- [UTM builder for social media links](https://postboost.co/tools/utm-builder): Build UTM-tagged links for social posts in your browser: network presets, live preview, naming warnings and saved presets. Free, no signup.
- [API and webhooks](https://postboost.co/api-for-developers): Publish and schedule to 15 channels through one REST API, nine SDKs, webhooks and a hosted MCP server.
- [How to Let an AI Agent Post to Social Media Safely](https://postboost.co/learn/let-an-ai-agent-post-to-social-media-safely): Seven rules for letting Claude, ChatGPT or your own agent post to social media: drafts first, an approval step, a narrow key, dry runs and server-side limits.

Last verified: 2026-10-15

## Sources

- [PostBoost API reference: create a post](https://postboost.co/docs/api/create-post/)
- [PostBoost docs: quickstart](https://postboost.co/docs/quickstart/)
- [PostBoost docs: SDKs](https://postboost.co/docs/sdks/)

Canonical: https://postboost.co/tools/social-media-api-request-builder
