Skip to main content
Use PostOnce through Corsair: one client, typed API calls, local DB sync. Create an API key in the PostOnce dashboard under Preferences, API Keys, and pick its scopes there. The plugin sends it as Authorization: Bearer <key>. Posts, drafts and analytics need accounts:read, posts:read and posts:write; media.* needs media:read/media:write, workflows.* needs workflows:read/workflows:write. A key without a scope gets a 403 for those calls. Things to know:
  • Accounts are the targets. accounts.list returns each connected account’s id, status and media_requirements. Pass the ids as targets[].account_id in posts.create, and only post to accounts whose status is active. Instagram, TikTok, YouTube and Pinterest need at least one image or video.
  • Now or later. posts.create without publish_at publishes right away. With an ISO-8601 publish_at it is scheduled, and posts.cancel stops it before it runs.
  • Media goes in by URL. media[].url must be an absolute HTTP or HTTPS URL that PostOnce can download when it publishes.
  • Retries do not double-post. Pass idempotencyKey (sent as the Idempotency-Key header) to posts.create, drafts.create or workflows.create: a repeat with the same body returns the original. After a 5xx or network error the plugin retries reads only; a write whose reply was lost may already have run, so it is never replayed.
  • Drafts before posts. drafts.create saves text, media and intended accounts without scheduling anything. drafts.update needs the draft’s current updated_at as expected_updated_at and returns 409 if it changed since.
  • Uploading media. media.createUpload returns a signed URL and a media_id. PUT the file’s bytes to the URL, then media.get gives the public_url to use as media[].url.
  • Workflows post on their own. An active workflow copies every new post from its source account to its targets, so workflows.create and workflows.update are destructive.
  • Webhooks. webhooks.create registers an HTTPS endpoint for post.published, post.partially_published and post.failed; the reply is the only time its signing secret is shown. This plugin does not receive those events yet.
  • One post, many destinations. A post’s status sums up its targets; each target carries its own status, platform_post_url and error.
  • Paging. posts.list returns up to limit posts (default 20, max 100), newest first. Pass meta.next_cursor as after for the next page; it is null on the last page.
What you get:
  • 25 typed API operations
  • 2 synced entities (accounts, posts) for fast .search() / .list()

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

4

Connect a tenant

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.

Example API calls

List connected social accounts
Schedule a post to one account
See the full list on the API page.

Query synced data

Synced entities support tenant.postonce.db.<entity>.search() and .list(): accounts, posts. See Database for filters and operators.

What’s next

API reference

Every postonce.api.* operation with input and output types.

Database

Synced entities, search filters, and operators.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.