# 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. It also reads and sends your users' email from Gmail, Outlook and any IMAP mailbox, and manages Google and Outlook calendars and Drive/OneDrive files. **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, or any IMAP mailbox, and read and send their 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 ## Email, Calendar, Files and Contacts (Google, Microsoft, IMAP) 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. Labels: create with `POST /v1/email/labels` and tag a message or thread without moving it via `addLabels`/`removeLabels` on `PATCH` (Gmail labels, Outlook categories). Send as another address with `from` (list them with `GET /v1/email/send-as`: Gmail aliases with their signatures, Outlook aliases; declare Outlook shared mailboxes with `POST /v1/email/send-as`). An Outlook shared mailbox can also be its own account: connect Microsoft with `scopes=email,shared_mailboxes`, then `POST /v1/email/shared-mailboxes` returns an `accountId` every email endpoint takes (its Inbox is read every minute). Signatures work on every provider: store them with `POST /v1/email/signatures` (`defaultFor` per sending address, workspace-wide or per account, Gmail import), then send with `signatureId` or `appendSignature: true` (Zernio default first, then Gmail's). Daily send caps per mailbox: Microsoft 1,000, Google Workspace 500, consumer Gmail 200, IMAP 200. Gmail and IMAP sends need a payment method on the workspace. Any other mailbox (iCloud, Yahoo, Fastmail, GMX, Zoho, a custom domain) connects over IMAP and SMTP as `platform: "imap"`: one hosted link for any address is `GET /v1/connect/email` (routes Google and Microsoft mail to OAuth), `POST /v1/email/imap/discover` returns the route, servers and app-password steps, and `POST /v1/email/imap/accounts` connects after checking IMAP and SMTP (`dryRun` checks only; failures name the stage, such as `app_password_required` or `smtp_auth_failed`). IMAP inboxes push new mail over IMAP IDLE (usually within seconds, with a minute poll as the fallback); a mailbox whose password stops working fires `account.disconnected` with `reconnectUrl`. Inbound mail lands in the unified inbox and fires `message.received`. `scheduledFor` schedules a send or reply up to 30 days ahead (list and cancel under `/v1/email/messages/scheduled`; a send that cannot leave fires `email.send_failed`; `holdAsDraft: true` keeps it as an editable draft in the mailbox until then). `trackOpens`, `trackLinks` and `trackReplies` fire `email.opened`, `email.link_clicked` and `email.thread_replied`. Forward with attachments via `POST /v1/email/messages/{messageId}/forward` (`includeAttachments`, `excludeAttachmentIds`; over 25 MB answers 413 `attachment_too_large`). Drafts: `GET`/`POST /v1/email/drafts` (`inReplyTo` for a reply draft, `forwardOf` for a forward draft; `kind` fixed at creation), `GET`/`PATCH`/`DELETE /v1/email/drafts/{draftId}` and `POST /v1/email/drafts/{draftId}/send` (sends the draft as the user left it in their mail app, IMAP Drafts folders included; `sendAt` schedules it). Each draft has a `version`: pass it as `If-Match` to update or send only that version (412 `draft_conflict` otherwise). `clean=true` on a message or thread read adds a `clean` object: `text` without quoted replies or footers (never empty, `status: fallback` when nothing could be stripped), `signature`, and a parsed `forwarded` header; `email.thread_replied` carries `reply.clean`. `email.sent` fires once per mail sent through the API with its `source`. Bounces fire `email.bounced` once per failed recipient with `category`, numeric `smtpCode` and `recommendedAction` (remove, retry, review, fix_configuration). Send, reply, forward and draft calls accept `Idempotency-Key`. Email accounts carry `capabilities` in the account list; email errors add `provider`, `providerError`, `retryable`, `requestId` and `docsUrl`, with stable codes such as `from_not_allowed` and `draft_conflict`. - **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/imap, 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, https://docs.zernio.com/platforms/imap ## 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": "
The first pieces land next month.
", "handle": "autumn-collection-preview", "excerpt": "A preview of the new collection.", "tags": ["autumn", "news"], "author": "42", "image": { "url": "https://cdn.example.com/autumn.jpg", "altText": "Autumn collection" }, "isPublished": true, "publishDate": "2026-10-01T09:00:00.000Z" } ``` A future `publishDate` uses WordPress-native scheduling, not Zernio's social queue. Exact timing on a self-hosted site depends on its cron configuration. SEO plugin fields, custom post types, and a visual blog editor are not supported; unsupported fields return an explicit validation error. ### Connect Wix Blogs ``` GET /v1/connect/wix?profileId={profileId}&redirect_url={optional_redirect} ``` Returns an `authUrl` that installs the Zernio app on the user's Wix site. Zernio handles the callback and connects that site. The site needs the Wix Blog app installed. Wix is a blogs-only connected account: it is not accepted by `POST /v1/posts`. ### Wix Blogs API Each connected Wix site exposes one blog with id `1`. Article ids are Wix GUIDs. `bodyHtml` is converted to Wix's rich content format on write and back to HTML on read (up to 30,000 characters per conversion block); images in the body and the cover image are imported into the site's Media Manager. Tags are created by name when missing. `author` is a Wix site member id; without it, posts are attributed to the site's default author. `seo.title` and `seo.description` are supported. A future `publishDate` uses Wix-native scheduling. Lists return `bodyHtml: null`; get an article to read its body. ### Connect Webflow ``` POST /v1/connect/webflow/token { "profileId": "{profileId}", "siteToken": "{webflow_site_api_token}" } ``` Connects one Webflow site with a site API token (Site settings > Apps & integrations > API access, with Sites read-only and CMS read and write). Webflow is a blogs-only connected account: it is not accepted by `POST /v1/posts`. ### Webflow Blogs API Each CMS collection with a rich text field is a blog; its id is the collection id. Article ids are Webflow item ids. Fields map to the collection by type and slug: `bodyHtml` to the rich text field, `excerpt` to a summary field, `image` to an image field, `tags` to a tags multi-reference (created by name when missing), `author` to an author reference (send the referenced item id). Sending a field the collection lacks returns 400. `isPublished: true` publishes to the live site immediately; the site must have been published once. Webflow's API cannot schedule: a future `publishDate` returns 400. `seo` returns 400. ### Posts #### List Posts ``` GET /v1/posts GET /v1/posts?page=1&limit=10&status=scheduled&platform=twitter&profileId={id} ``` Query params: - page (default: 1) - limit (default: 10, max: 100) - status: draft, scheduled, published, failed - platform: twitter, instagram, facebook, etc. - profileId: filter by profile - createdBy: filter by user ID - dateFrom: YYYY-MM-DD - dateTo: YYYY-MM-DD - includeHidden: true/false (default: false) Response: ```json { "posts": [ { "_id": "65f1c0a9e2b5af0012ab34cd", "title": "Launch post", "content": "We just launched!", "status": "scheduled", "scheduledFor": "2024-11-01T10:00:00Z", "timezone": "UTC", "mediaItems": [], "platforms": [ { "platform": "twitter", "accountId": "64e1f0...", "status": "pending" } ], "tags": ["launch"], "hashtags": [], "visibility": "public", "createdAt": "2024-10-01T12:00:00Z", "updatedAt": "2024-10-01T12:00:00Z" } ], "pagination": { "page": 1, "limit": 10, "total": 1, "pages": 1 } } ``` #### Create Post ``` POST /v1/posts ``` Body: ```json { "content": "Hello, world! 🌍", "scheduledFor": "2024-01-01T12:00:00Z", "publishNow": false, "isDraft": false, "timezone": "America/New_York", "platforms": [ { "platform": "twitter", "accountId": "TWITTER_ACCOUNT_ID" }, { "platform": "linkedin", "accountId": "LINKEDIN_ACCOUNT_ID", "customContent": "Professional version of post" } ], "profileId": "PROFILE_ID", "mediaItems": [ { "type": "image", "url": "https://your-storage.com/image.jpg" } ], "title": "My Post Title", "tags": ["marketing", "social"], "hashtags": ["startup", "tech"], "visibility": "public" } ``` Options: - publishNow: true (publish immediately) - isDraft: true (save as draft) - scheduledFor: ISO 8601 datetime (schedule for later) #### Get Single Post ``` GET /v1/posts/{postId} ``` #### Update Post ``` PUT /v1/posts/{postId} ``` Body: Same as create, any fields to update. #### Delete Post ``` DELETE /v1/posts/{postId} ``` Note: Cannot delete already published posts. #### Retry Failed Post ``` POST /v1/posts/{postId}/retry ``` Retry publishing a failed or partial post. #### Bulk Upload Posts (CSV) ``` POST /v1/posts/bulk-upload?dryRun=false ``` Upload CSV file with multiple posts. Form data: ``` file: posts.csv (multipart/form-data) ``` ### Media #### Upload Media (Presigned URL) ``` POST /v1/media/presign ``` Get a presigned URL for uploading files directly (up to 5GB). Request: ```json { "filename": "video.mp4", "contentType": "video/mp4" } ``` Response: ```json { "uploadUrl": "