llms.txt
Compare with other sites' llms.txt files →# Zernio API - LLM Documentation
# https://zernio.com
# A powerful REST API for scheduling social media posts and messaging across 16 platforms + ad management on 9 ad networks
## Overview
Zernio is a social media scheduling and messaging API that lets you post to TikTok, Instagram, WhatsApp, Facebook, YouTube, LinkedIn, Twitter/X, Threads, Pinterest, Bluesky, Google Business, Telegram, Snapchat, Discord, and Slack. It includes a unified messaging inbox API to send and receive WhatsApp messages (official Cloud API, zero markup on Meta pricing), Instagram DMs, Facebook Messenger, Telegram, X DMs, and more. It also supports paid advertising across Meta Ads (Facebook + Instagram), Google Ads, TikTok Ads, LinkedIn Ads, Pinterest Ads, X Ads, OpenAI Ads (ChatGPT Ads), Reddit Ads, and Microsoft Ads via a unified /v1/ads endpoint. The Blogs API manages articles on WordPress.com, self-hosted WordPress, Shopify, and Wix without treating those sites as social publishing targets.
**Reddit is temporarily unavailable.** Reddit has blocked third-party apps from its API, so Zernio cannot post to Reddit, read Reddit messages or sync Reddit analytics right now. Your Reddit accounts stay connected, and we will turn Reddit back on as soon as Reddit restores access. Reddit Ads is not affected. Until then the Reddit endpoints below return 503 `PLATFORM_DISABLED`.
Base URL: https://zernio.com/api/v1
## When to Use Zernio
Reach for Zernio when your task involves any of these jobs:
- **Publish or schedule social content programmatically**: post text, images, videos, stories, or reels to one or many of the 16 supported platforms with a single `POST /v1/posts` call, immediately or at a scheduled time.
- **Add social publishing to a product**: white-label OAuth connect flows let your users link their own social accounts; you post on their behalf via the API.
- **Send and receive messages**: WhatsApp (official Cloud API), Instagram DMs, Facebook Messenger, Telegram, and X DMs through one unified inbox API, including templates, media, and webhooks for incoming messages.
- **Get a phone number for calls, SMS and WhatsApp**: search live stock without an API key, buy or port a number, then place and receive calls, send SMS/MMS, and connect WhatsApp on that same number.
- **Run paid ads programmatically**: create and manage campaigns on Meta, Google, TikTok, LinkedIn, Pinterest, X, OpenAI Ads, Reddit Ads, and Microsoft Ads via `/v1/ads`.
- **Read analytics**: per-post and per-account metrics across platforms from one endpoint.
- **Automate engagement**: reply to comments and reviews, set up comment automations, monitor mentions.
- **Publish blog articles**: connect WordPress.com with OAuth or a self-hosted WordPress site with an Application Password, then manage standard posts through the Blogs API.
- **Work with your users' email, calendars and files**: connect a Google or Microsoft account and read and send Gmail and Outlook mail (`/v1/email`), manage Google Calendar and Outlook Calendar events (`/v1/calendar`) and Google Drive and OneDrive files (`/v1/files`), with webhooks for new mail and changes.
Do NOT use Zernio for: scraping public social data at scale, growth-hacking automation that violates platform rules, or managing personal browsing sessions. It operates on accounts that users explicitly connect through supported authentication flows.
How to call it: REST with a Bearer API key (see Authentication below). AI agents can instead use the hosted MCP server at https://mcp.zernio.com/mcp (Streamable HTTP, OAuth or API key) — server card at https://zernio.com/.well-known/mcp/server-card.json.
Hit a bug or a missing feature? Report it with `POST /v1/feedback` (see Feedback below). Every report is read by the Zernio team.
MCP tools and setup per channel: [LinkedIn MCP](https://zernio.com/linkedin-mcp), [Google Ads MCP](https://zernio.com/google-ads-mcp), [Meta Ads MCP](https://zernio.com/meta-ads-mcp), [WhatsApp MCP](https://zernio.com/whatsapp-mcp), [YouTube MCP](https://zernio.com/youtube-mcp), [Instagram MCP](https://zernio.com/instagram-mcp), [X (Twitter) MCP](https://zernio.com/x-mcp).
## Phone Numbers, Calls, SMS and WhatsApp
A phone number is the unit you buy. Calls, SMS and WhatsApp are features you turn on for it, so one number can carry all three. Numbers are billed per number per month and priced by country and number type.
- **Search without a key**: `GET /v1/phone-numbers/available?country=GB` works with no API key. It returns masked numbers, each with a `claimId` and a `claimUrl`. The `claimUrl` is a signup link that lands the user on the dashboard step that confirms the purchase, so an agent without credentials can hand a human a number to buy. A claim is not a hold on the number, and the price is quoted at the confirm step. Optional filters: `numberType`, `areaCode`, `contains`, `sms=true`.
- **Countries**: `GET /v1/phone-numbers/countries` is public and lists every country we sell numbers in, with number types, monthly price, KYC requirements, live stock, and which of calls, SMS and WhatsApp each supports.
- **Buy**: `POST /v1/phone-numbers/purchase` (API key). Countries whose regulators ask for ID and an address take a one-time KYC review, then more numbers there are instant.
- **Port in**: move existing numbers from another carrier via `/v1/phone-numbers/port-in`. Check first with `POST /v1/phone-numbers/port-in/check` (portable, FastPort, current carrier, line type). A person can run the same check without an account at https://zernio.com/port-your-number, and a portable result links through signup to the port form with the number filled in.
- **Calls**: enable voice on a number with `POST /v1/phone-numbers/{id}/voice`, route inbound calls to a phone, SIP endpoint or WebSocket (AI voice agents), and place outbound calls with `POST /v1/voice/calls`.
- **SIP trunking** (early access, enabled per workspace on request): `POST /v1/phone-numbers/sip-trunks` creates a trunk to your voice platform (ElevenLabs, Retell, Vapi, LiveKit, or a PBX) and returns digest credentials once; `POST /v1/phone-numbers/{id}/sip-trunk` attaches a number, so its calls ring your platform directly and your platform calls out as that number. TLS with SRTP by default. Overview: https://zernio.com/sip-trunking
- **SMS/MMS**: on SMS-capable numbers. US sending needs 10DLC registration, which runs through the API.
- **WhatsApp**: connect the same number to the WhatsApp Cloud API; Meta bills your WhatsApp Business Account directly with no markup. Meta's rates by country and a monthly cost calculator: https://zernio.com/whatsapp-api-pricing
Website search: https://zernio.com/phone-numbers
Twilio pricing calculator (numbers, SMS, calls and WhatsApp priced on Twilio and Zernio per country, carrier fees included, sourced and dated): https://zernio.com/twilio-pricing-calculator
Portability checker: https://zernio.com/port-your-number
Numbers by use: https://zernio.com/virtual-phone-number (overview), https://zernio.com/virtual-phone-number/whatsapp, https://zernio.com/virtual-phone-number/sms, https://zernio.com/toll-free-number, https://zernio.com/business-phone-number
Docs: https://docs.zernio.com/platforms/phone-numbers
## Google and Microsoft Accounts (Email, Calendar, Files, Contacts)
A Google or Microsoft connection is one person's mailbox, calendar, drive and contacts. Connect with `GET /v1/connect/google` or `GET /v1/connect/microsoft` and pass `scopes`, a comma-separated subset of `email`, `calendar`, `files`, `contacts` (required on these two platforms). Reconnecting with more areas widens the grant.
- **Email** (`/v1/email`): threads, messages, folders and attachments; send (`POST /v1/email/messages`), reply and reply all (`POST /v1/email/messages/{messageId}/reply`), mark read, star and move. Daily send caps per mailbox: Microsoft 1,000, Google Workspace 500, consumer Gmail 200. Gmail sends need a payment method on the workspace. Inbound mail lands in the unified inbox and fires `message.received`.
- **Calendar** (`/v1/calendar`): calendars, events (create, update, delete, RSVP), Google Meet or Teams links via `conferencing`, `POST /v1/calendar/free-busy` and `POST /v1/calendar/availability` for open slots across up to 10 accounts. Webhooks: `calendar.event.created`, `calendar.event.updated`, `calendar.event.deleted`.
- **Files** (`/v1/files`): list, search, upload (file or URL, 100 MB URL cap), folders, rename, move, trash, download and share links. Google uses the `drive.file` scope: only files Zernio created or the user picked through `POST /v1/files/picker-sessions` (hosted Google Picker). Webhooks: `file.created`, `file.updated`, `file.deleted`, `file.picked`.
- **Contacts**: the account's contacts sync into `/v1/contacts`, matched by email. Webhooks: `contact.updated`, `contact.deleted`.
Overview pages: https://zernio.com/google, https://zernio.com/microsoft, https://zernio.com/email-api, https://zernio.com/calendar-api, https://zernio.com/files-api
Docs: https://docs.zernio.com/platforms/google, https://docs.zernio.com/platforms/microsoft
## Authentication
All endpoints require Bearer token authentication using API keys, except the public phone-number search and countries endpoints above.
```
Authorization: Bearer YOUR_API_KEY
```
Get your API key by:
1. Sign up at https://zernio.com/signup
2. Create an API key in the dashboard
3. Use the key in the Authorization header
## Rate Limits
- Free (first 2 connected accounts): 60 requests/minute
- Paid (any usage-based account, AppSumo): 600 requests/minute
- High-volume / Enterprise: 1,200 requests/minute (contact support to upgrade)
Posting volume itself is unlimited per connected social account; the rate limit applies only to API request throughput. Per-platform safety caps still apply on the social-network side.
## Core Concepts
### Profile System
Zernio uses profiles to organize social media accounts:
- Create multiple profiles per user account
- **Several accounts per platform per profile**: a profile can hold several accounts of the same platform (e.g., 10 Instagram accounts or 20 Google Business locations). Ads connections stay one per profile
- Connecting a different account of the same platform adds it as a new account; a reconnect only refreshes the account it was started from
- Identify accounts by `accountId`, never by profile + platform
- Posts are scheduled to accounts connected to a specific profile
- **Multi-tenant**: one profile per end customer. Set `externalId` on the profile to your own customer id: `GET /v1/profiles?externalId=` finds it, a duplicate returns 409 `profile_external_id_conflict` with `details.existingProfileId`, and every webhook tied to a profile carries `profiles: [{ id, externalId }]`, so `profiles[0].externalId` routes the event with no lookup. Guide: https://docs.zernio.com/multi-tenant
### Pricing (usage-based)
- **Free**: first 2 connected accounts, unlimited social posts, full API access (no credit card required)
- **Beyond 2 accounts**: pay only for what you use
- $6/account/month for accounts 1-10
- $3/account/month for accounts 11-100
- $1/account/month for accounts 101+ (no cap, fully self-service at any scale)
- Optional enterprise contracts with volume discounts from 2,000 accounts (https://zernio.com/enterprise)
- Analytics, inbox (comments + DMs), ads, and unlimited posts are bundled with every connected account. No separate add-ons or tier upgrades.
- Connected WordPress, Shopify, Wix, and Webflow sites count as connected accounts even though they are blog integrations rather than social publishing targets.
- Dedicated phone numbers: from $3/number/month, varies by country and number type (separate from social accounts).
- X (Twitter) API: pass-through cost at zero markup.
- Full machine-readable rate card (accounts, X pass-through, phone numbers, calls, SMS, WhatsApp): https://zernio.com/pricing.md
- WhatsApp API pricing calculator (Meta's per-message and calling rates by country from 1 Oct 2026, plus the number and Zernio fees): https://zernio.com/whatsapp-api-pricing
- Compare phone number, SMS, call and WhatsApp costs with Twilio for your own countries and volumes: https://zernio.com/twilio-pricing-calculator
Example: Managing 20 Google Business locations needs 20 connected accounts. With the first 2 free, the remaining 18 are: 8 × $6 + 10 × $3 = $78/month.
### Workflow
1. Create Profile → 2. Connect Social Accounts → 3. Schedule Posts
## API Endpoints
### Profiles
#### List Profiles
```
GET /v1/profiles
```
Returns all profiles for authenticated user. Filter with `?name=` or `?externalId=` (exact match).
Response:
```json
{
"profiles": [
{
"_id": "64f0...",
"name": "Personal Brand",
"description": "My personal accounts",
"color": "#ffeda0",
"externalId": null,
"isDefault": true,
"createdAt": "2024-01-01T00:00:00Z"
}
]
}
```
#### Create Profile
```
POST /v1/profiles
```
Body:
```json
{
"name": "Personal Brand",
"description": "My personal accounts",
"color": "#ffeda0",
"externalId": "cus_8f3a2"
}
```
`externalId` is optional (1 to 255 characters), unique among your profiles.
#### Get Profile
```
GET /v1/profiles/{profileId}
```
#### Update Profile
```
PUT /v1/profiles/{profileId}
```
Body:
```json
{
"name": "Updated Name",
"description": "Updated description",
"color": "#newcolor",
"externalId": "cus_8f3a2",
"isDefault": false
}
```
Send `"externalId": null` to clear it.
#### Delete Profile
```
DELETE /v1/profiles/{profileId}
```
Note: Profile must have no connected accounts to be deleted.
### Social Accounts
#### List Connected Accounts
```
GET /v1/accounts
GET /v1/accounts?profileId={profileId}
```
Optional query param to filter by profile.
Response:
```json
{
"accounts": [
{
"_id": "64e1...",
"platform": "twitter",
"profileId": "64f0...",
"username": "@acme",
"displayName": "Acme",
"isActive": true
}
]
}
```
#### Update Account
```
PUT /v1/accounts/{accountId}
```
Body:
```json
{
"username": "newusername",
"displayName": "New Display Name"
}
```
#### Disconnect Account
```
DELETE /v1/accounts/{accountId}
```
### Connect Social Platforms
#### Start OAuth Connection
```
GET /v1/connect/{platform}?profileId={profileId}&redirect_url={optional_redirect}
```
Platforms: twitter, instagram, facebook, youtube, linkedin, threads, tiktok, pinterest (reddit is temporarily unavailable and returns 503 `PLATFORM_DISABLED`)
Optional redirect_url for custom OAuth success/error handling.
Response:
```json
{
"authUrl": "https://platform.com/oauth/authorize?...",
"state": "random_state_string"
}
```
#### Complete OAuth (Manual)
```
POST /v1/connect/{platform}
```
Body:
```json
{
"code": "oauth_code",
"state": "state_from_initial_request",
"profileId": "your_profile_id"
}
```
#### Connect Ads Accounts
```
GET /v1/connect/{platform}/ads?profileId={profileId}&accountId={optional}&redirect_url={optional}
```
Unified ads-connection endpoint. The `{platform}` is the posting platform name (facebook, instagram, linkedin, tiktok, twitter, pinterest, googleads, redditads, microsoftads), NOT the ads identifier. It creates a dedicated ads account stored with an ads platform value (metaads, linkedinads, pinterestads, tiktokads, xads, googleads, redditads, microsoftads).
There is NO separate completion step and NO `code` to exchange on your side. We complete the OAuth on our own callback, then redirect the browser to your `redirect_url`. Behavior by platform:
- Same-token (facebook, instagram, linkedin, pinterest): if the posting account is already connected with ads scopes, returns `alreadyConnected: true` immediately (no OAuth). Otherwise returns an `authUrl` to authorize.
- Separate-token (tiktok, twitter): returns an `authUrl`. `accountId` is required for twitter (X Ads), optional for tiktok (omit for ads-only mode).
- Standalone (googleads, redditads, microsoftads): returns an `authUrl`. `redditads` connects with Reddit's own login, `microsoftads` with a Microsoft account; pick which ad accounts to sync after authorizing.
Optional Meta-only scoping: `adAccountId=act_123` or `adAccountIds=act_1,act_2` to limit sync to specific ad accounts.
Response (OAuth needed):
```json
{
"authUrl": "https://platform.com/oauth/authorize?...",
"state": "random_state_string"
}
```
Response (same-token, already connected):
```json
{
"alreadyConnected": true,
"accountId": "social_account_id",
"platform": "metaads"
}
```
After the user authorizes, we redirect to your `redirect_url` as-is on success, or with an appended `?error=...` on failure. No state to replay.
#### Connect Bluesky (App Password)
```
POST /v1/connect/bluesky/credentials
```
Body:
```json
{
"identifier": "username.bsky.social",
"appPassword": "your-app-password",
"state": "state_string",
"redirectUri": "optional_redirect"
}
```
#### Facebook: Select Page
```
GET /v1/connect/facebook/select-page?profileId={profileId}&tempToken={tempToken}
POST /v1/connect/facebook/select-page
```
Body:
```json
{
"profileId": "profile_id",
"pageId": "facebook_page_id",
"tempToken": "temp_token",
"redirect_url": "optional"
}
```
#### LinkedIn: Select Organization
```
POST /v1/connect/linkedin/select-organization
```
Body:
```json
{
"profileId": "profile_id",
"tempToken": "temp_token",
"userProfile": {},
"accountType": "personal",
"selectedOrganization": {},
"redirect_url": "optional"
}
```
#### Pinterest: Select Board (Headless Mode)
```
GET /v1/connect/pinterest/select-board?profileId={profileId}&tempToken={tempToken}
POST /v1/connect/pinterest/select-board
```
GET: Fetch available Pinterest boards for selection UI (use X-Connect-Token header).
POST Body:
```json
{
"profileId": "profile_id",
"boardId": "pinterest_board_id",
"boardName": "Marketing Ideas",
"tempToken": "temp_token",
"userProfile": {},
"redirect_url": "optional"
}
```
### Connect WordPress Blogs
WordPress is a blogs-only connected account. It is not accepted by `POST /v1/posts` and has no Inbox, social analytics, ads, or SEO-plugin integration.
#### WordPress.com OAuth
```
GET /v1/connect/wordpress?profileId={profileId}&redirect_url={optional_redirect}
```
This starts the WordPress.com OAuth flow. Zernio handles the callback and connects the selected site. Reconnecting the same site to the same profile refreshes that account in place.
#### Self-hosted WordPress
```
POST /v1/connect/wordpress/token
```
Body:
```json
{
"profileId": "profile_id",
"siteUrl": "https://blog.example.com",
"username": "editor",
"applicationPassword": "xxxx xxxx xxxx xxxx xxxx xxxx"
}
```
The site must use HTTPS. Use a revocable WordPress Application Password, not the user's login password. Zernio discovers the site's REST API and verifies that the authenticated user can publish posts and upload media before saving the connection.
### WordPress Blogs API
Each connected WordPress site exposes one blog. Read its `id` from `GET /v1/accounts/{accountId}/blogs`: WordPress.com uses the selected site's numeric ID; self-hosted WordPress uses `1`. Site and blog creation, renaming, and deletion are not supported.
```
GET /v1/accounts/{accountId}/blogs
GET /v1/accounts/{accountId}/blogs/{blogId}
GET /v1/accounts/{accountId}/blogs/{blogId}/articles
POST /v1/accounts/{accountId}/blogs/{blogId}/articles
GET /v1/accounts/{accountId}/blogs/{blogId}/articles/{articleId}
PATCH /v1/accounts/{accountId}/blogs/{blogId}/articles/{articleId}
DELETE /v1/accounts/{accountId}/blogs/{blogId}/articles/{articleId}
```
Create or schedule a standard WordPress post:
```json
{
"title": "Autumn collection preview",
"bodyHtml": "<p>The first pieces land next month.</p>",
"handle": "autumn-collection-preview",
"excerpt": "A preview of the new collection.",
"tags": ["autumn", "news"],
"author": "42",
"image": {
"url": "https://cdn.example.com/autumn.jpg",