On this page
- What a Social Media API Is
- Build on Each Network, or Use a Unified API?
- The 16 Networks and Three APIs
- Step 1: Authenticate
- Step 2: List Connected Accounts
- Step 3: Upload Media
- Step 4: Create and Schedule a Post
- Step 5: Listen for Webhooks
- Errors, Rules and Rate Limits
- Messaging, Link in Bio, Analytics and MCP
- Social Media API Use Cases
- Frequently Asked Questions
- The Short Version
Every social network has its own API, its own app review, its own sign-in flow, its own rules about media and character counts, and its own habit of changing things. If your product needs to post to one network, building directly is fine. If it needs to post to five, ten or sixteen, you spend more time maintaining integrations than building your product.
A unified social media API puts one layer in front of all of them. You connect accounts once, then your code sends one request in one format, and the API takes care of each network. This guide walks through how that works in practice with the OnlySocial API, with examples you can run.
A social media API is an interface your code calls to post, schedule, read messages and get analytics on social networks. A unified social media API such as OnlySocial’s covers 16 networks behind one workspace API key: connect accounts in the app, call
GET /accounts, upload media, then POST /posts with the accounts, a date, time and timezone. Each network’s rules are checked before anything is saved, and webhooks tell you when posts publish or fail. Plan for 60 requests a minute per key.
What a Social Media API Is
A social media API is a set of endpoints that lets software, rather than a person in a dashboard, work with social media accounts. Typical jobs are publishing and scheduling posts, uploading images and videos, reading comments and direct messages, replying, and fetching analytics.
There are two kinds:
- Native network APIs, such as the ones Meta, TikTok, LinkedIn or X offer for their own platforms. Each covers one network and has its own rules, review and authentication.
- Unified social media APIs, which sit in front of many networks and give you one consistent interface for all of them.
Build on Each Network, or Use a Unified API?
Build directly when you need deep access to one network; use a unified API when you need breadth across many.

The hidden cost of building directly is maintenance. Networks deprecate endpoints, change media rules and tighten permissions, and every change lands on your team. A unified API turns sixteen moving targets into one stable contract. The trade-off is control: if you need a feature only one network offers and the unified API does not expose it, build that piece directly.
The 16 Networks and Three APIs
The OnlySocial API publishes to 16 networks and has three REST APIs on one key.

| API | Covers | Base URL |
|---|---|---|
| Publishing API | Social accounts, posts, scheduling, approval, tags, media, analytics | https://app.onlysocial.io/os/api/{workspace-uuid} |
| Messaging API | Contacts, tags, segments, conversations, messages, broadcasts, automations | https://app.onlysocial.io/api/v1 |
| Link in Bio API | Bio pages and blocks, short links, QR codes, form submissions, analytics, domains | https://app.onlysocial.io/api/v1/biolinks |
The networks are Facebook Pages, Instagram, TikTok, LinkedIn (profiles and pages), YouTube, X, Threads, Pinterest, Google Business Profile, Reddit, Tumblr, Bluesky, Mastodon, Pixelfed, Telegram and VK. Accounts are connected once in the app, and each comes back from the API with an id and a provider value such as instagram or linkedin_page.
Step 1: Authenticate
Every request sends a bearer token. In the dashboard, go to Integrations, open REST API and create a workspace API key. Give it only the permissions your integration needs; the key is shown once.

Check the key and get your workspace UUID, which the Publishing API needs in its URL:
curl https://app.onlysocial.io/api/v1/account \
-H "Authorization: Bearer osk_YOUR_SECRET"
The response’s id is your workspace UUID. Useful Publishing permissions include publishing:accounts:read, publishing:posts:write, publishing:posts:publish (needed to schedule, queue or publish), publishing:media:write and publishing:analytics:read.
Step 2: List Connected Accounts
curl https://app.onlysocial.io/os/api/WORKSPACE_UUID/accounts \
-H "Authorization: Bearer osk_YOUR_SECRET"
Note each account’s id (used in posts) and provider (used for per-network options).
Step 3: Upload Media
Media is uploaded to the workspace’s media library first, then referenced by id in a post. The Publishing API offers three ways in:
POST /mediafor an ordinary file upload.POST /media/chunked/initiate, then upload parts andcomplete, for large videos.POST /media/remote/initiateto fetch a file from a URL in the background, with a status endpoint to check progress.
Step 4: Create and Schedule a Post
One request can schedule the same post to many accounts, with a different version or options per network.
curl -X POST https://app.onlysocial.io/os/api/WORKSPACE_UUID/posts \
-H "Authorization: Bearer osk_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"accounts": [12, 15],
"date": "2026-12-08",
"time": "09:00",
"timezone": "Europe/London",
"schedule": true,
"versions": [
{
"account_id": 0,
"is_original": true,
"content": [ { "body": "Our winter sale starts today!", "media": [431] } ],
"options": { "instagram": { "type": "reel" } }
}
]
}'
versions: the original version ("account_id": 0) applies to every account; add a version with a specific account’sidto give it different text, media or options.contentis a list: the first item is the post, and a second item becomes the first comment on networks that support one, or the next post in a thread on networks such as X, Threads, Bluesky and Mastodon.optionsare keyed by provider, for example an Instagram or Facebooktypeofpost,reelorstory.
Other endpoints schedule, reschedule, add to the queue, approve, and retry a post on one failed account.

Step 5: Listen for Webhooks
Subscribe to events instead of polling. Create an endpoint under Integrations, Webhooks or through the webhook management API, choose events, and copy the signing secret (it starts with whsec_).
Publishing events include publishing.post.scheduled, publishing.post.published (once per account), publishing.post.published_all, publishing.post.publishing_failed, and account events such as publishing.account.disconnected. Each delivery is a signed JSON POST with an X-Webhook-Signature header. Respond with any 2xx as soon as you have stored the event; deliveries are retried for about 24 hours, can arrive more than once and out of order, so deduplicate on X-Webhook-Delivery.
Errors, Rules and Rate Limits
- Network rules are checked first. A post that would break a network’s rules returns
422and nothing is saved, with one error per problem, keyed likerequirements.0.instagram.hashtags_0. Common causes are an Instagram post without media or with more than five hashtags, a Pinterest pin without a board, and X text over 280 characters on an account without X Premium. - Partial failures. If one network refuses a post, the others still publish. Retry sends it again only to the failed accounts.
- Rate limits. By default, 60 requests a minute per workspace API key and 300 a minute per client IP. On
429, wait for theRetry-Afterseconds. - Plan features. A feature your plan does not include returns
403withplan_feature_missing.
Messaging, Link in Bio, Analytics and MCP
The same key can call the Messaging API (contacts, conversations, messages, broadcasts and automations from the unified inbox, where your plan includes it) and the Link in Bio API (bio pages, short links, QR codes and leads). The Publishing API’s analytics endpoints return workspace and account figures, post performance and the best times to post.
If you would rather not write code, OnlySocial also has a built-in MCP server at https://app.onlysocial.io/mcp, so assistants such as Claude, ChatGPT, Cursor and VS Code can schedule posts, read analytics and work in the inbox in plain language, within your role’s permissions. See the full reference at api.onlysocial.io and the social media API page.

Social Media API Use Cases
- Content management systems that share every new article to the brand’s networks.
- E-commerce stores that announce new products or restocks automatically.
- SaaS products that let their own customers schedule social posts inside the product.
- Agencies that build internal tools for approval and reporting across clients.
- AI agents that draft, schedule and report on posts.
- Data teams that pull post and account analytics into a warehouse.
Frequently Asked Questions
What is a social media API?
A set of endpoints that lets software publish, schedule, read messages and fetch analytics on social media accounts, instead of a person doing it in a dashboard.
Which networks does the OnlySocial API support?
16: Facebook, Instagram, TikTok, LinkedIn, YouTube, X, Threads, Pinterest, Google Business Profile, Reddit, Tumblr, Bluesky, Mastodon, Pixelfed, Telegram and VK.
Do I need my own developer app for each network?
No. Accounts are connected in the OnlySocial app, and your code refers to them by id.
What are the rate limits?
By default, 60 requests a minute per workspace API key and 300 a minute per client IP. OnlySocial can change the defaults; a 429 tells you how long to wait.
Can I use the API without coding?
Yes: connect an AI assistant through the MCP server, or use the Zapier integration.
The Short Version
A unified social media API replaces sixteen integrations with one. Create a workspace key with the narrowest permissions, list accounts, upload media, post with versions and per-network options, let the API check each network’s rules, and subscribe to webhooks for the results.


