Posts

Create post

Create a post, and optionally publish it in the same request. A post published immediately (publishNow: true) comes back with platformPostUrl in the response.

content is optional in four cases:

  • media is attached
  • all platforms have customContent
  • every platform entry is an X Article (platformSpecificData.article)
  • every platform entry is a LinkedIn text-free reshare (platformSpecificData.reshareUrl with no text)

See each platform's schema for media constraints.

Scheduling

Pick one of:

  • scheduledFor: publish at the scheduled time
  • publishNow: true: publish synchronously, inside this request
  • queuedFromProfile: publish in the profile's next queue slot

With none of them and isDraft unset, the post is saved as a draft. platforms is required unless the post is a draft.

Precedence: isDraft: true wins over publishNow and scheduledFor (the post is saved, never published), and publishNow: true wins over scheduledFor. A scheduledFor already in the past is not rejected: the post is published synchronously in the same request, exactly like publishNow.

Idempotency

Three layers of duplicate-protection apply, so safe-to-retry callers (network blips, n8n / Zapier retries, etc.) don't accidentally double-post.

1. Idempotency-Key (recommended for retries, 24-hour window). Send an Idempotency-Key header (a UUID per logical post, up to 255 characters) and reuse it when you retry after a 5xx, a timeout or a dropped connection. A retry with the same key within 24 hours returns HTTP 200 with the original post in the post field, and no new post is created. The match is on the key alone, not on the body: a retry returns the original post even if its body differs (for example a re-uploaded media URL). It covers drafts, and a post that was saved even though the original response was a 5xx or timed out.

If the first request is still being processed, the retry gets HTTP 409 with code: idempotency_conflict and a Retry-After header; retry after that delay. If the first request failed without creating a post, the retry is processed as a new request. Keys are scoped to your user. Never reuse a key for a different post: that post would not be created, and the earlier one would be returned instead.

2. x-request-id retry detection (24-hour window). If a request carries the same x-request-id as an earlier one AND collides with it on the content fingerprint below (same account, content and media URLs), we return HTTP 200 with the original post in the post field (or HTTP 202 with postId if the original is still being saved) instead of a 409. A request with the same x-request-id but different content is a new post. When both headers are sent, Idempotency-Key wins and x-request-id is ignored for matching.

The official Zernio SDKs auto-generate a unique x-request-id per call. On a generic HTTP client (curl, n8n's HTTP node, Zapier, custom code), either:

  • Set a unique x-request-id per logical call (UUIDv4 is fine)
  • Or omit the header, and we'll treat each request as new

3. Content-hash dedup (24-hour window). Independently, we hash (platform, accountId, content + media URLs) and reject duplicates within 24 hours with HTTP 409. This catches genuine "same content posted twice to the same account" cases regardless of x-request-id. The response carries error, accountId, platform, and existingPostId so you can find the original.

To intentionally re-post identical content within 24h, change something (the caption, the media, the account), because the dedup is keyed on the full content fingerprint.

Order: an Idempotency-Key match (200) is checked first, then same-x-request-id retries (200), then the content-hash dedup (409).

post/v1/posts

Headers

Idempotency-Keystring

Optional client-generated key (a UUID per logical post) that makes retries safe. Reuse it on every retry of the same post, especially after a 5xx or a timeout. A retry with the same key within 24 hours returns the original post (HTTP 200) whatever its body; while the original is still being processed it returns 409 idempotency_conflict with Retry-After. Longer than 255 characters returns 400. Takes precedence over x-request-id. See the operation description for the full contract.

x-request-idstring uuid

Optional client-generated request identifier. A request with the same value as an earlier one within 24 hours that also matches its content fingerprint (same account, content and media URLs) returns the original post (HTTP 200) instead of a duplicate-content 409. It does not protect a retry whose body differs; use Idempotency-Key for that. SDKs set it automatically. See the operation description for the full idempotency contract.

Request body

titlestring

Stored on the post for reference/display only. This field is NOT used as the video title when publishing. To set a YouTube video title, use platformSpecificData.title on the youtube platform target (falls back to the first line of content when omitted).

contentstring

Post caption/text. Optional when media is attached, all platforms have customContent, every platform entry is an X Article (platformSpecificData.article), or every platform entry is a LinkedIn text-free reshare (platformSpecificData.reshareUrl with no text). Required for other text-only posts.

scheduledForstring date-time

When to publish. Required unless publishNow is true, queuedFromProfile is set, or the post is a draft. An ISO 8601 value with a Z or offset (2026-01-15T10:00:00Z, 2026-01-15T11:00:00+01:00) is taken as-is; a value without one (2026-01-15T10:00:00 or 2026-01-15 10:00) is read as local time in timezone. A value already in the past is published synchronously in the same request. Ignored when publishNow is true.

publishNowboolean

Publish to every platform synchronously in this request instead of scheduling; the response then carries each platform result and platformPostUrl, with HTTP 207 when some platforms failed. Takes precedence over scheduledFor; ignored when isDraft is true.

isDraftboolean

When true, saves the post as a draft. When none of scheduledFor, publishNow, or queuedFromProfile are provided, the post defaults to draft automatically.

dryRunboolean

TikTok only. Preview whether each tiktok entry in platforms could publish right now under the TikTok Direct Post daily limits, without creating, scheduling or publishing anything: no post is persisted and no upload slot is claimed, so it can be repeated freely. The request still goes through auth, the payment gate and body validation, then returns HTTP 200 with { dryRun: true, canPublish, tiktok: [...] } instead of 201. Only tiktok entries are evaluated; other platforms in the body are ignored, and a body with no tiktok entry is rejected with 400 invalid_field_value on platforms. An entry with platformSpecificData.tiktokSettings.draft: true (Creator Inbox upload) is not subject to the limit and always reports canPublish: true. Accounts connected through the TikTok for Business app do not go through these limits at all and also always report canPublish: true, so on those accounts a dry run confirms the request is well-formed rather than gating it.

timezonestring

IANA timezone (Europe/Madrid, America/New_York) used to interpret a scheduledFor (root or per-platform) that carries no Z or offset. Has no effect on values that already carry one. An unknown name returns 400 when scheduledFor is set.

tagsstring[]

Tags/keywords. YouTube constraints: each tag max 100 chars, combined max 500 chars, duplicates auto-removed.

hashtagsstring[]

Stored for reference only. Hashtags are NOT automatically appended to the caption when publishing. Include hashtags directly in the content field (platforms like Instagram only support hashtags as caption text). For YouTube keywords, use the tags field instead.

mentionsstring[]

Stored for reference only. This field does NOT automatically create @mentions when publishing. For LinkedIn @mentions, use the /v1/accounts/{accountId}/linkedin-mentions endpoint to resolve profile URLs to URNs, then embed the returned mentionFormat directly in the post content field.

crosspostingEnabledboolean

Stored on the post and echoed back on reads. Publishing does not branch on it: every entry in platforms is published regardless, so treat it as a label for your own tooling.

metadataobject

Free-form key/value pairs of your own, stored on the post and returned on reads and in webhook payloads. Zernio also writes the bookkeeping keys usageCounted, usageRefunded and hidden into this object; do not set them, and they are stripped from webhook payloads.

queuedFromProfilestring

Profile ID to schedule via queue. When provided without scheduledFor, the post is auto-assigned to the next available slot. Do not call /v1/queue/next-slot and use that time in scheduledFor, as that bypasses queue locking.

queueIdstring

Specific queue ID to use when scheduling via queue. Only used when queuedFromProfile is also provided. If omitted, uses the profile's default queue.

Response

Nothing was created. Either a dryRun preview (TikTok only), which deliberately carries no numeric cap detail, only a per-account go/no-go and a reason; or a retry matched by Idempotency-Key or x-request-id, which returns the original post (PostCreateResponse, with message: "Post already exists (idempotent retry)").

A newly created post is always a 201.

OR

Example response

{
  "post": {
    "platforms": [
      {
        "platform": "twitter",
        "status": "pending",
        "platformPostId": "1234567890123456789",
        "platformPostUrl": "https://twitter.com/acmecorp/status/1234567890123456789"
      }
    ]
  }
}

Changes