# Social Media API for SaaS: Let Your Users Connect Their Own Accounts and Post From Your Product

_2026-11-19 · A social media API for SaaS: one workspace per customer, a connect link for their accounts, signed webhooks, scoped keys, and what it costs per customer._

A social media API for SaaS lets your product publish to your customers’ own social accounts without your team building a separate integration for each network. In Shager the setup is four calls: create a workspace per customer, send them a connect link so they sign in to their networks themselves, post with one request, and get signed webhooks back when each account goes live. You never hold a customer’s password, and you never file a Meta, TikTok or Google app review of your own.

Here’s the case most builders arrive with. You run a listings tool for real estate agents. Every new listing already has photos, a price and a description in your database, and your users keep asking for a "post it" button that puts the listing on their own YouTube channel, LinkedIn profile, TikTok and X. The feature request is one sentence long. The work behind it, done natively, is a quarter.

## Why multi-tenant posting is harder than single-account posting

Posting to your own accounts is a weekend script. Posting to thousands of accounts that belong to your customers is a different job, for three reasons.

First, permissions. To publish on someone else’s behalf, each network wants your app reviewed. Until TikTok audits your app, its API [can only post privately, for at most 5 users in 24 hours](https://developers.tiktok.com/doc/content-sharing-guidelines). Meta asks for business verification and an [app review](https://developers.facebook.com/docs/app-review) per permission. YouTube gives each Google Cloud project a [daily quota](https://developers.google.com/youtube/v3/determine_quota_cost) shared by every one of your users, and an upload costs a big slice of it.

Second, tokens. Each customer’s connection expires, gets revoked or needs a refresh on its own schedule, and the customer is the only one who can fix it. Your product needs to know which customer, which account, and what to tell them.

Third, isolation. Customer A must never see, or post to, customer B’s accounts. That has to hold in your data model, your keys and your logs.

A unified API takes the first two off your plate. The third is where its data model matters, so look at that before anything else.

## How it maps in Shager: one workspace per customer

Your product signs up once and gets one Shager organization. Inside it, each of your customers gets a **workspace**: its own connected accounts, its own posts, its own time zone, its own webhooks. Your code keeps a single mapping, your customer id to a Shager `workspace_id`, and passes that id on every call.

| Your product | In Shager | API |
|---|---|---|
| A customer | A workspace | `POST /workspaces` |
| "Connect your accounts" button | A connect link | `POST /workspaces/{id}/connect-links` |
| Their connected profiles | Channels | `GET /workspaces/{id}/channels` |
| The "post it" button | A post | `POST /workspaces/{id}/posts` |
| Status updates in your UI | Signed webhooks | `POST /workspaces/{id}/webhooks` |

Every operation is in the [OpenAPI document](https://app.shager.ai/api/v1/openapi.json), and every answer comes back as `{ "data": ... }`.

## Step by step: the onboarding flow your customers see

Create the workspace when a customer turns the feature on. Pass their time zone, otherwise a default zone is used for times you send without an offset:

```bash
API="https://app.shager.ai/api/v1"
AUTH="Authorization: Bearer $SHAGER_API_KEY"

curl -s -X POST "$API/workspaces" -H "$AUTH" \
  -H "Content-Type: application/json" -H "Idempotency-Key: cust_4821" \
  -d '{"name": "Harbor Realty (cust_4821)", "timezone": "America/Chicago"}'
```

Then make a connect link and show it behind your "Connect your accounts" button:

```bash
curl -s -X POST "$API/workspaces/$WS/connect-links" -H "$AUTH" \
  -H "Content-Type: application/json" \
  -d '{"label": "cust_4821 onboarding"}'
```

You get back a `url` and an `expires_at`. The link works for 14 days and for as many accounts as the customer wants to connect. Your customer opens it, picks a network, and signs in on that network’s own screen. They don’t sign up to Shager. The page tells them your company is the one asking, and that they can remove access later from each network’s settings. If you need to cancel a link early, `DELETE /workspaces/{id}/connect-links/{link_id}` stops it at once. There’s a longer walkthrough of the customer’s side in our article on [client connect links](https://shager.ai/blog/client-connect-links).

When they’re done, the accounts show up in `GET /workspaces/{id}/channels`, each with its network, the formats it accepts, its caption limit and a `status`. Only `ACTIVE` accounts receive posts.

One thing to say plainly: this is not white-label. The network’s consent screen names Shager’s app, because that’s the app that passed the reviews. If you need your own brand on every OAuth screen, you need your own approved apps on every network, and that’s the quarter of work you were trying to skip.

## Posting from your product

The "post it" button is one request. Add an `Idempotency-Key`, so a retry from your job queue returns the first result instead of posting twice:

```bash
curl -s -X POST "$API/workspaces/$WS/posts" -H "$AUTH" \
  -H "Content-Type: application/json" -H "Idempotency-Key: listing-99173" \
  -d '{
    "caption": "Just listed: 3 bed, 2 bath near the lake. Open house Saturday 1 to 4.",
    "channel_ids": ["ch_youtube", "ch_linkedin", "ch_tiktok", "ch_x"],
    "media_ids": ["med_walkthrough"],
    "schedule_at": "2026-11-28T10:00:00-06:00"
  }'
```

Before you show a customer the "Scheduled" state, you can send the same body to `POST /workspaces/{id}/posts/validate`. It checks every account’s rules at once (caption length, video shape and length, the YouTube title, TikTok’s privacy fields) and saves nothing, so you can show the errors in your own form. The [posting API guide](https://shager.ai/blog/social-media-posting-api) covers media uploads and per-account captions in more detail.

You can wire this up today on a handful of test accounts: [sign up](https://shager.ai/signup), and it’s free during the launch, for up to 31 accounts, with no card.

## Webhooks, scopes and the safety rails

**Webhooks.** Register an HTTPS endpoint per workspace and Shager sends `post.destination.published`, `post.destination.failed`, `post.completed` and `approval.decided`. Each body carries `workspace_id`, so you route it straight to the right customer. Requests are signed with HMAC-SHA256 in a `Shager-Signature` header. Failed deliveries are retried, six attempts over about a day, with the same event id each time, so dedupe on it. The signing secret is shown once, when you create the endpoint.

**Scopes.** Keys carry `read`, `write` and `publish`. A dashboard that only shows numbers gets `read`. The service that schedules posts gets `publish`. Our piece on [API keys, scopes and audit](https://shager.ai/blog/api-keys-scopes-and-audit) explains how to split them.

**Rails you’ll hit in testing.** By default a key can send one post to at most 50 accounts and schedule 20 posts in any 24 hours, with 120 requests a minute. A post going out within the hour, or to more than 10 accounts, stops for a person to approve that exact plan. If your product already has its own approval step, the key setting "No second approval within the hour" removes the first check; posts to more than 10 accounts, and to Pinterest, still ask. `GET /me` returns the caps in force, so read it at startup. If the defaults don’t fit your volume, tell us before you build around them. Why these rails exist is in [how to stop an AI agent from double-posting](https://shager.ai/blog/ai-agent-double-posting-safety).

**What isn’t a webhook yet.** A disconnected account. LinkedIn, for one, asks people to reconnect every 60 days. Poll `GET /workspaces/{id}/channels` daily, and when a status turns `NEEDS_RECONNECT`, show your customer a fresh connect link.

## Which networks work today

Live for everyone: YouTube, TikTok (public posts), X, LinkedIn personal profiles, Bluesky, Telegram, Mastodon, Pinterest and Tumblr. Facebook, Instagram and Threads are awaiting Meta’s approval, and Google Business Profile is awaiting Google’s: until then, only people we gave early access can connect them. Plan your launch around the live list, and the others join the same calls once approved.

## What it costs per customer

Shager is priced per connected account, counted across all your workspaces, with unlimited posts and users. After the launch: $15 a month for 6 accounts, $19 for 11, $39 for 31, $79 for 101 and $199 for 301. If your average customer connects three accounts:

| Customers | Accounts | Plan | Per customer per month |
|---|---|---|---|
| 10 | 30 | $39 (31 accounts) | $3.90 |
| 33 | 99 | $79 (101 accounts) | about $2.40 |
| 100 | 300 | $199 (301 accounts) | about $2 |

One line item to price in: X. X bills apps per post, and a lot more for a post with a link ([X’s pricing](https://docs.x.com/x-api/getting-started/pricing)), so X posts come from a monthly allowance on your plan, shared by all your customers. If X is a big part of your feature, check `GET /me` for what’s left and decide whether to pass that cost on. Other APIs price per profile, per post or per organization; we lined them up in [social media API pricing compared](https://shager.ai/blog/social-media-api-pricing-compared).

## FAQ

### Do my customers need to sign up to Shager?

No. They open your connect link, sign in on each network’s own page and pick their accounts. Your product’s name appears on that page as the one asking. They can remove access at any time from the network’s settings.

### Can one customer see another customer’s accounts?

Not through Shager. Each workspace has its own accounts, posts and webhooks, and every call names the workspace it acts on. Keep your customer-to-workspace mapping on your server and never let a browser choose the `workspace_id`.

### Is my product the data controller?

For your customers’ data, you decide what happens to it, and Shager processes it for you. Our data processing addendum covers the case where you are yourself a processor for your customers, with Shager as your subprocessor.

### Can my customers approve posts before they go out?

Yes. Turn on approval for a workspace, request an approval on a saved post, and the reviewer gets a link that opens on their phone without signing in. You hear the decision through the `approval.decided` webhook.

If "post it" is on your roadmap, put it in this sprint instead of next quarter. [Sign up for Shager](https://shager.ai/signup), create a workspace for your first test customer, send yourself the connect link, and post a listing from your staging server.

---
Source: https://shager.ai/blog/social-media-api-for-saas
