Postixly API Reference
Publish and manage social media posts across multiple platforms.
Authentication
Include your API key in every request header. You can generate one in youraccount settings.
X-API-Key: your-api-keyJWT Bearer tokens are also accepted:Authorization: Bearer <token>
Posts
10Create and manage social media posts
/posts/Creates a new post and immediately enqueues it for publishing. Waits up to 30 s for the worker to finish so the response reflects the real status. Approval gate: members without an approver role create `pending_approval` posts that are not queued until an owner/admin approves them. API keys without a bound `user_id` (legacy team keys) cannot create posts — the insert fails with an integrity error (`created_by` must reference an existing auth user). Personal-account keys act as the account owner.
/posts/Returns a paginated list of posts for the authenticated account.
/posts/scheduleCreates a post and schedules it for future publishing. Approval gate: members without an approver role create `pending_approval` posts that are not queued until an owner/admin approves them. API keys without a bound `user_id` (legacy team keys) cannot create posts — the insert fails with an integrity error (`created_by` must reference an existing auth user). Personal-account keys act as the account owner.
/posts/{id}Returns a single post by ID.
/posts/{id}Updates the content, media, schedule time, recurrence interval, tags or target connections of a post in the `draft` or `scheduled` status. Content/media/connection changes to a `scheduled` post require an approver role — `scheduled_at`-, `recurrence_interval_days`- and `tags`-only changes stay open to every member (tags are workspace-internal metadata, never published; `scheduled_at` is the calendar drag & drop path). Changing a `scheduled` post's target connections re-enqueues its publish job with the new targets, even when `scheduled_at` is untouched — the in-flight job still carries the previous connection ids otherwise. Setting a `scheduled_at` on a draft submits it: approvers move it straight to `scheduled` and enqueue it, members move it to `pending_approval`. Status-transitioning edits are rejected with 409 when the post was moved concurrently — the status flip is written first and conditioned on the fetched status, so a losing request mutates nothing. A `published` post returns 409 unless the request carries `republish: true`, which re-schedules it: targets are reset (clearing the per-platform idempotency markers), the post moves back to `scheduled` and publishing is re-enqueued — immediately, or at the new `scheduled_at` when one is supplied. Sending `republish: true` with a non-published post returns 400. Any other status returns 409. Recurring posts (`recurrence_interval_days` set) re-arm themselves in the worker after a full publish success, so a republish of a published recurring post races the worker's own published → scheduled flip — both sides are conditioned on snapshot tokens and exactly one wins; the loser never enqueues.
/posts/{id}Cancels a post that is in the `scheduled` status and removes it from the queue. Returns the cancelled post.
/posts/{id}/retryRe-enqueues a post that is in the `failed` status for another publish attempt. Any other status returns 409.
/posts/{id}/recoverCreates a NEW draft from an existing post whose media has expired (7-day retention): copies content, tags and platform options, keeps only the media objects that still exist, and re-links the connection ids that are still alive. The original post is untouched — its history, metrics and targets stay intact. Not subject to the monthly post limit: the draft counts when it publishes, not when created.
/posts/{id}/approveApproves a post in the `pending_approval` status: sets it to `scheduled` and enqueues the publish job with a delay towards its `scheduled_at` (immediately when the slot already passed or the post has no date). Only the account owner or a member with the owner/admin role may approve. Any other status returns 409.
/posts/{id}/rejectRejects a post in the `pending_approval` status: moves it back to `draft` and clears its schedule date so it never publishes and leaves the calendar (kept as reference material in the posts list; a draft can be re-submitted by PATCHing it with a future `scheduled_at`, which routes it back through the approval flow for members). Only the account owner or a member with the owner/admin role may reject. Any other status returns 409.
Media
11Upload, inspect and delete media objects
/media/uploadStreams the first file of a multipart/form-data body straight into storage. The declared Content-Type is checked against the media whitelist before any byte is consumed; after the upload, the stored bytes are sniffed (magic bytes) and the SNIFFED mime type — never the declaration — is persisted and returned. Single-shot flow only: the hard per-object cap is max_upload_bytes from GET /media/limits. Larger files use the multipart flow. The object key is generated server-side; a SHA-256 of the stored bytes is recorded but not returned.
/media/presignCreates an uploading media row and returns a presigned PUT URL so a browser can upload straight to storage. Two modes: CREATE (default — accountId + content_type + content_length) and RE-PRESIGN (media_id present — a fresh PUT URL for an existing uploading row whose URL expired mid-upload; key, mime and size come from the stored row, not the caller). The URL is signed with the Content-Type header: the browser MUST send exactly the returned mime_type or storage answers 403 SignatureDoesNotMatch. The URL expires after expires_in seconds (R2_UPLOAD_URL_TTL_SECONDS). A ready or deleted row cannot be re-signed (409).
/media/limitsReturns the active upload limits verbatim from configuration. Clients decide single-shot vs multipart from HERE — thresholds are never hardcoded client-side. Values are environment-dependent and may change without notice; read them at runtime instead of assuming defaults.
/media/multipart/createOpens a multipart session in storage and returns presigned PUT URLs for every part. The browser PUTs the parts DIRECTLY to storage — the bytes never pass through this API. Requires content_length at or above threshold_bytes (smaller files use the single-shot upload), at most max_object_bytes, and at most 10,000 parts (S3/R2 cap). Parts are 1-indexed; every part except the last covers part_size bytes (S3 requires ≥5 MiB for all but the last part). Creates the metadata row (status uploading) bound to the session from the first moment, so the abandoned-upload GC covers multipart sessions too.
/media/multipart/sign-partReturns fresh presigned PUT URLs for the requested parts (retries and expired part URLs). The upload_id is the capability received at create time — a known media_id alone cannot sign parts. At most 100 parts per request. part_numbers must be unique integers within 1..part_count (part_count = byte_size ÷ part_size_bytes, see GET /media/limits). The session must still be uploading and not abandoned.
/media/multipart/completeCompletes the session in storage — the AUTHORITATIVE part validation (ETags, sizes, order) happens there. A part rejected by storage does NOT kill the session: re-upload the failing parts (sign-part) and complete again. After completion the final object is verified against the declaration: exact byte_size (413 on mismatch — object and row are deleted together), magic bytes on the whitelist (415), and a SHA-256 over the stored bytes is recorded. The returned mime_type is the SNIFFED type and may differ from the declared content_type. Idempotent: replaying after a successful complete (or completing a session that storage reports as already finished) returns the same success response instead of failing.
/media/multipart/abortCancels a multipart session and frees the reserved size immediately when no object exists behind it. Reaching an already-aborted state is reported as success (aborted: true), so retrying a lost abort is safe. A COMPLETED upload cannot be aborted (409) — delete it via POST /media/delete instead.
/media/lookupReturns object metadata for READY, non-deleted media owned by the caller’s account. Unknown ids, foreign-account ids and soft-deleted rows are silently omitted — the response shape is identical to the ids never having existed (no existence oracle for other accounts’ media). At most 50 ids per request. Used by the dashboard to hand pre-uploaded media to the post form.
/media/{id}/confirmVerifies that the object the browser PUT to the presigned URL actually landed and matches the declaration: the stored byte_size must equal the declared size (413 on mismatch — object and row are deleted together so nothing invalid lingers), the size cap applies, and the stored bytes must sniff to a whitelisted type (415 — invalid content is deleted). A SHA-256 over the stored bytes is computed and persisted; the returned mime_type is the SNIFFED type and may differ from the declared content_type. Idempotent on an already-ready row. No request body.
/media/resolveReturns expiring GET URLs for the given keys. Storage media keys are presigned per request (TTL: R2_READ_URL_TTL_SECONDS); legacy http(s) URLs pass through verbatim. Strings that are neither media keys nor http(s) URLs are silently omitted, as are keys whose presign fails. Keys are grouped by their owning account segment — every referenced account must be accessible to the caller (403 otherwise). At most 50 keys per request.
/media/deleteSchedules deletion of the given keys 24 h in the future. Keys still referenced by ANY post are skipped (shared-reference guard — active media is never deleted to make room); legacy non-media keys and keys belonging to another account are skipped too. The response reports per-key outcomes; the actual object removal is performed by the background garbage collector after the grace window. At most 50 keys per request.
Platforms
1Per-platform publishing requirements
/platforms/media-requirementsWebhooks
4Manage event notification webhooks
/webhooks/Returns all webhooks for the authenticated account.
/webhooks/Registers a new webhook endpoint. The signing secret is returned once and cannot be retrieved again.
/webhooks/{id}Enables or disables an existing webhook.
/webhooks/{id}Permanently removes a webhook.
System
3Health and diagnostics
/livez/healthReturns service health status.
/media/proxyPlatform Options
Pass platform-specific settings under the platform_options field when creating or updating a post. Only include the key for the platforms you are targeting — omitted platforms use their defaults.
TikTok-specific publish options (passed under `platform_options.tiktok`).
YouTube-specific publish options (passed under `platform_options.youtube`).