---
title: "Publish a post"
method: POST
path: "/v1/posts/{postId}/publish"
tags: ["Posts"]
---

# Publish a post

`POST /v1/posts/{postId}/publish`

## Request

- Base URL: `https://www.postquick.ai/api`
- URL: `https://www.postquick.ai/api/v1/posts/{postId}/publish`
- Auth: HTTP bearer

With Idempotency-Key, atomically save a publish request and return 202. The same key and recognized settings return the original acceptance, even after completion. A changed request returns 409. Accepted does not mean posted; poll getPost for platform results. Without the header, retain the legacy synchronous behavior. Immediately publish a post to the specified platforms. All root and reply media are validated before any platform request; X/Twitter allows 4 images and Threads allows 20 per item. Returns success/failure per platform.

## Path parameters

- `postId` string, required

## Headers

- `Idempotency-Key` string: Use one key per approved publish. Repeat the same key and settings after a lost response; never make a new key for an uncertain result.

## Request body

- object
  - `platforms` string[], required: Platforms to publish to
  - `linkedinTarget` object: LinkedIn publishing target
    - `type` 'personal' | 'organization', required
    - `organizationId` string
  - `facebookTarget` object: Facebook page publishing target
    - `pageId` string, required
    - `pageName` string

## Response `200`

Publish result.

- object
  - `success` true, required
  - `data` object, required
    - `post` object, required: A social media post record
      - `id` string, required
      - `app_id` string, required
      - `content` string, required
      - `status` 'pending' | 'draft' | 'scheduled' | 'processing' | 'posted' | 'published' | 'partial' | 'failed', required: Post lifecycle status. `partial` indicates at least one targeted platform succeeded and at least one failed — check `platform_errors` for the per-platform breakdown.
      - `post_type` 'text' | 'image' | 'carousel' | 'video', required: Post content type
      - `platforms` string[], nullable, required
      - `posted_platforms` string[], nullable, required
      - `image_url` string, nullable, required
      - `image_urls` string[], nullable, required
      - `video_url` string, nullable, required
      - `scheduled_for` string, date-time, nullable, required
      - `posted_at` string, date-time, nullable, required
      - `thread_parts` object[], nullable, required
        - `text` string, required
        - `image_urls` string[]
        - `video_url` string, uri
        - `post_type` 'text' | 'image' | 'carousel' | 'video'
      - `linkedin_target` object, nullable, required: LinkedIn publishing target
        - `type` 'personal' | 'organization', required
        - `organizationId` string
      - `facebook_target` object, nullable, required: Facebook page publishing target
        - `pageId` string, required
        - `pageName` string
      - `platform_post_ids` object, nullable, required
      - `error_message` string, nullable, required
      - `platform_errors` object, nullable, required: Per-platform error messages keyed by platform name. Populated when `status` is `partial` or `failed`.
      - `is_manual` boolean, nullable, required
      - `created_at` string, date-time
      - `updated_at` string, date-time
    - `publishedTo` string[], required
    - `errors` object[]
      - `platform` string, required
      - `error` string, required

## Other responses

- `202`: With Idempotency-Key: publish durably accepted, not confirmed posted. Poll getPost for final platform results.
- `409`: Conflicting key settings, changed content, or an active/uncertain publish.
- `503`: Publish acceptance could not be confirmed. Repeat the same key and settings; do not resend with a new key.

---

[API](https://skmtc.dev/postquick/apis/postquickai-api.md) · [All operations](https://skmtc.dev/postquick/apis/postquickai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postquick/apis/postquickai-api/revisions/d9bc2bcf3042?raw)
