Test without publishing
Every API key starts with omsk_live_ and works on the real social accounts connected to its workspace. The workspace API has no separate sandbox and no test keys. You test without publishing with these tools:
- Dry run.
dry_run: trueon a post create runs every check of a real call and creates nothing. - File check.
POST /media/checktells you which connected platforms would refuse a file. - Drafts. A draft never publishes on its own.
- A test workspace and private posts, for the tests that must publish.
OmniSocials Connect, the product for partners who post for their own customers, has a full sandbox with test accounts and simulated posts. See Connect sandbox and live.
A request with publish_now: true, POST /posts/create-and-publish, POST /posts/:id/publish, or a schedule_at that you leave in place goes live on real accounts. Treat a test key like a production key. Only dry_run: true makes these requests safe.
Dry run
Add dry_run: true to the body of POST /posts/create or POST /posts/create-and-publish, or add ?dry_run=true to the URL (True works too). The request runs the same checks as a real call, in the same order, and stops before it stores anything.
Terminal
A request that passes answers 200 (a real create answers 201). data says what the real call would create:
JSON
statusis the status the post would get:draft,scheduled,posting(published right away) orin_approval.- Each entry of
accountshaspublish:now,scheduled,after_approvalordraft, the text the account would get, and its media. A media item withcropis posted as a crop at that ratio. Alsothread_parts(the number of posts in a thread) andfirst_commentwhen set. approval_workflow(withapproval_workflow_id),tags(the tag ids that exist and the names the real call would create) andcomment_dm_automation(the channels that would get one) show when the request has them.warningshas the same notices as the real call, plusmedia_urls_not_fetchedanddraft_not_checked(see below).
A request that fails a check answers exactly what the real call answers: the same status and the same error body, for example 400 validation_error for a caption over a platform's limit or 400 platform_not_connected for an account that is not connected. Send the same request without dry_run to create the post.
dry_run must be a boolean: "true", 1 or null answer 400 validation_error, and so does a query value other than true or false (any case). A value the API cannot read is never treated as false.
Only post creation has a dry run. PATCH /posts/:id, DELETE /posts/:id, POST /posts/:id/publish, /retry, /approve and /reject refuse a request with dry_run (400 validation_error) and change nothing, so a test that sends it there never acts for real.
What a dry run checks
Everything a real create checks before it stores the post:
- the key and its
posts:writescope, the rate limit and the subscription; - the size of every text, the format of every field, the post type for each platform;
- that each account is connected to the workspace;
media_ids: each file exists in the workspace's library and is ready;schedule_atin the future,draft,publish_nowandapproval_workflow_id(the workflow exists and every step has an approver);- for a post you schedule or publish: the character limits, the required media, the number and mix of media, video length and size, file type and size per platform, the aspect ratio (an image the real call crops is checked as that crop), Pinterest carousel ratios, the Google Business location, Threads permissions, and the credits an X post with a link needs;
- polls, thread parts, hashtag sets, tags (a new tag name is checked, not made) and the comment-to-DM settings.
What a dry run never does
A dry run stores no post, draft, media file, image crop, tag, approval or comment-to-DM automation. It does not download media_urls, queue a publish, call a social network, send a webhook, use credits, or notify approvers.
It is still an API request: it counts toward the rate limit, it is logged like every other request, and it marks the key as used.
What a dry run does not check
- The files behind
media_urls. Their address and file extension are checked, the files are not downloaded. The real call downloads each file and can still refuse it (unreachable, too large, wrong type, a video too long for a platform). A PDF becomes one image per page only in the real call. The answer carries the warningmedia_urls_not_fetchedand marks each such itemnot_fetched: true. To check a file first, send itsurltoPOST /media/check, or upload it and pass itsmedia_ids. - The image crop itself. The crop is not made. It is checked by the type and pixel size it will have; its file size, and a crop that fails to render, are not checked. The Pinterest carousel ratio check uses the crop's size too.
- Drafts. A draft skips the platform checks in a real call, so it skips them in a dry run too (warning
draft_not_checked). Addschedule_atorpublish_nowto the dry run to check them. - Changes after the dry run. An account that disconnects, a file that is deleted or a credits balance that another post uses before your real call, and a database fault during the real write.
- The platform. A network can still refuse a post when it publishes: an account restriction, a rate limit on its side, a rule it does not publish. See Known issues.
Dry run in the MCP server
The hosted MCP server (mcp.omnisocials.com) takes dry_run on create_post and create_and_publish_post. The result says "Dry Run: Nothing Was Created" and lists the accounts and warnings. update_post, delete_post, publish_post, retry_post, approve_post and reject_post refuse dry_run: true with an error and change nothing. The npm package @omnisocials/mcp-server takes it from its next release. The SDKs and the CLI have no dry_run option yet: send the request to the REST endpoint.
Check a file
POST /media/check checks one file against the platforms connected to the workspace and stores nothing. Pass a public url (its size and type are read with a HEAD request), a media_id of a library file, or size_bytes with mime. The answer lists the platforms that would refuse the file and why, and for an image how each channel shows it as a feed post (fit). It needs the media:read scope. See Media.
Use a test workspace
Every API key belongs to one workspace. You pick it in the Workspace field when you create the key under Settings → API, and the key only sees that workspace's accounts, posts and media.
- Create a workspace for testing in the dashboard and connect test accounts to it.
- Create a key for that workspace, with only the scopes your tests need.
- Check the target before a test run:
GET /accountsreturnsworkspace_idandworkspace_name.
A workspace is part of your subscription, see Billing. A trial has full API access. When a trial or subscription lapses, requests fail with 402 subscription_inactive until it is reactivated.
Webhooks you create with a key only receive events for that key's workspace, so test deliveries stay apart from production ones.
Post to accounts you can test on
Some tests must publish: the webhook events post.published and post.failed, or how a post looks on the platform. Connect social accounts that exist for testing, not your brand's main accounts. A few channels can keep a test post out of public view:
| Channel | How to keep a test post private |
|---|---|
tiktok | tiktok.privacy_level: "SELF_ONLY" |
youtube | youtube.privacy_status: "private" or "unlisted" |
pinterest | Pin to a secret board. The boards array of GET /accounts/:id includes secret boards |
telegram | Connect a channel or group that only your team is in |
discord | Connect a channel in a test server that only your team is in |
The other channels have no visibility option in the API, so a test post there is public on that account. Mastodon posts are always public, and Threads accounts must be public profiles to connect.
Drafts never publish
Every post is a draft unless the request has publish_now or schedule_at. The scheduler only picks up scheduled posts and posts sent with publish_now, so a draft never publishes on its own. You can create, read, update and delete drafts as often as you like:
Terminal
A planned draft (draft: true with schedule_at) keeps its time on the dashboard calendar and still never publishes.
Drafts skip most per-platform checks: character limits, media rules, Pinterest carousel ratios and the X credits check run when a post is scheduled or published. To run those checks without publishing, send the request with schedule_at and dry_run: true.
Scheduling for real has side effects of its own: it fires post.scheduled to your webhooks, and a scheduled X post with a link reserves its credits until it publishes. A dry run does neither.
For a human safety net, attach an approval workflow: the post waits as in_approval and publishes only after the last step approves it.
Clean up test posts
DELETE /posts/:idremoves a post from OmniSocials. On a scheduled post it cancels the publish.- It never deletes a live post on a platform. To take one down, use "Delete from [platform]" on the post in the dashboard (every platform except Instagram and TikTok, whose APIs have no delete) or delete it in the platform's app. Telegram allows removal only in the first 48 hours.
- Label test posts with
source(a free-form string, returned on every post) so a cleanup script can find them.GET /postshas nosourcefilter, so filter the list on your side.
Test webhooks
Webhook URLs must use HTTPS and resolve to a public host; private and loopback addresses are refused with validation_error. Two ways to receive test deliveries:
- A request bin. Register the URL of a request inspection service as a webhook. It shows each delivery's raw body and headers (
X-OmniSocials-Signature,X-OmniSocials-Deliveryand the rest), which is what you need to check your signature code. - A tunnel to your machine. Expose your dev server with
cloudflared tunnelorngrok http 3000and register the tunnel URL.
The workspace API has no endpoint that sends a test event (Connect has one for its own webhook endpoints, see Connect webhooks). A dry run sends no event. Trigger real events without publishing anything:
| Event | How to trigger it in a test |
|---|---|
post.scheduled | Create a post with schedule_at in the future through the API, then delete it |
post.approved, post.rejected | Create a post with approval_workflow_id and a future schedule_at, approve or reject it, then delete it. An approved post publishes at its time |
post.published, post.failed | These need a real publish. Use a private test post from the table above |
After a run, GET /webhooks/:id shows failure_count and last_failure for deliveries your endpoint did not accept. See Webhooks for the payloads and signature verification.
Mind the limits
- The rate limit is 100 requests per minute per key, dry runs included. Give tests their own key, so a test run never uses up the production key's budget. See Rate limits and errors.
- Each workspace can send 1,000 inbox replies per 24 hours, and every reply goes to a real person.
- X posts with a link cost 20 credits each when they publish, in tests too. A dry run uses none. Test X with link-free text unless the link is what you are testing.
- YouTube's daily API quota is shared by every OmniSocials customer. Keep YouTube test uploads few.
Postman and OpenAPI
- Postman collection: import omnisocials.postman_collection.json into Postman and add your API key as the Bearer token.
- OpenAPI file: openapi.json describes every endpoint. Use it to generate a client, import it into another API tool, or validate responses in contract tests. The dry-run answer is the schema
PostDryRun.
The CLI is handy for scripted checks too: every command takes --json.