> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postinger.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a post

> A draft (schedule.mode "draft", or no schedule), published now ("now") or later ("at"). schedule.at is on the workspace's clock as YYYY-MM-DDTHH:mm; GET /v1/me says which. A scheduled post must pass each platform's rules. Send an Idempotency-Key to retry safely. Needs posts:write.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/posts
openapi: 3.1.1
info:
  title: Postinger API
  description: >-
    Schedule and publish posts, upload media and read analytics for one
    workspace. Authenticate with an API key from API Keys in the app:
    Authorization: Bearer pst_live_…
  version: v1
servers:
  - url: https://api.postinger.dev
    description: Production
security:
  - apiKey: []
tags:
  - name: Accounts
  - name: Analytics
  - name: Workspace
  - name: Media
  - name: Posts
paths:
  /v1/posts:
    post:
      tags:
        - Posts
      summary: Create a post
      description: >-
        A draft (schedule.mode "draft", or no schedule), published now ("now")
        or later ("at"). schedule.at is on the workspace's clock as
        YYYY-MM-DDTHH:mm; GET /v1/me says which. A scheduled post must pass each
        platform's rules. Send an Idempotency-Key to retry safely. Needs
        posts:write.
      parameters:
        - name: Idempotency-Key
          in: header
          description: >-
            Send the same key again to retry without doing it twice: the first
            answer comes back. Up to 255 characters, kept for 24 hours.
          schema:
            maxLength: 255
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostBody'
            example:
              content: Our autumn collection is here 🍂
              targets:
                - socialAccountId: 0192f0c1-5a4e-7b3d-9c2f-1e8a6d4b7f20
                  content: null
                  options:
                    format: feed
              schedule:
                mode: at
                at: 2026-11-01T09:00
              mediaIds:
                - 0193a59e-7c2d-7a1b-9e4f-3d8c2b6a5f18
              version: null
          text/json:
            schema:
              $ref: '#/components/schemas/PostBody'
          application/*+json:
            schema:
              $ref: '#/components/schemas/PostBody'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostResponse'
              example:
                id: 0193a5a0-2b1c-7d4e-8f3a-5c6b9e0d1a24
                status: scheduled
                content: Our autumn collection is here 🍂
                scheduledAt: '2026-11-01T06:00:00+00:00'
                scheduledAtLocal: 2026-11-01T09:00
                timeZone: Europe/Istanbul
                publishedAt: null
                editable: true
                version: 1
                author: null
                apiKey:
                  id: 0192e7d3-1f2a-7c4b-8d5e-6a9b0c3d2e11
                  name: Website
                targets:
                  - socialAccountId: 0192f0c1-5a4e-7b3d-9c2f-1e8a6d4b7f20
                    platform: instagram
                    content: null
                    options:
                      format: feed
                      shareToFeed: true
                    status: pending
                    externalPostId: null
                    externalUrl: null
                    error: null
                    errorCode: null
                    waitReason: null
                    nextAttemptAt: null
                    attempts: 0
                    publishedAt: null
                    account:
                      handle: acme
                      displayName: Acme
                      avatarUrl: null
                      isActive: true
                media:
                  - id: 0193a59e-7c2d-7a1b-9e4f-3d8c2b6a5f18
                    kind: image
                    status: ready
                    contentType: image/jpeg
                    fileName: autumn.jpg
                    size: 482133
                    width: 1080
                    height: 1350
                    durationSeconds: null
                    url: https://media.postinger.dev/…/autumn.jpg
                    posterUrl: null
                    createdAt: '2026-10-28T10:00:00+00:00'
                createdAt: '2026-10-28T10:00:00+00:00'
                updatedAt: '2026-10-28T10:00:00+00:00'
components:
  schemas:
    PostBody:
      required:
        - content
        - targets
        - schedule
      type: object
      properties:
        content:
          type:
            - 'null'
            - string
          description: The text, for every target without its own.
        targets:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/TargetBody'
          description: 'Where it goes: one entry per account.'
        schedule:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ScheduleBody'
              description: 'When it goes out. Missing: a draft.'
        mediaIds:
          type:
            - 'null'
            - array
          items:
            type: string
            format: uuid
          description: Ready media from the library, in order. At most 10.
        version:
          type:
            - 'null'
            - integer
          description: >-
            PUT only: the version you read. A post changed since answers 409
            instead of being overwritten. Missing: last write wins.
          format: uint32
    PostResponse:
      required:
        - id
        - status
        - content
        - scheduledAt
        - scheduledAtLocal
        - timeZone
        - publishedAt
        - editable
        - version
        - author
        - apiKey
        - targets
        - media
        - createdAt
        - updatedAt
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          enum:
            - draft
            - scheduled
            - publishing
            - published
            - partial
            - failed
          type: string
        content:
          type: string
        scheduledAt:
          type:
            - 'null'
            - string
          format: date-time
        scheduledAtLocal:
          type:
            - 'null'
            - string
          description: scheduledAt on the workspace's clock.
        timeZone:
          type: string
        publishedAt:
          type:
            - 'null'
            - string
          format: date-time
        editable:
          type: boolean
          description: 'Whether it can still be changed: not once published.'
        version:
          type: integer
          description: Send it back with PUT or retry to detect changes made since.
          format: uint32
        author:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PostAuthorResponse'
        apiKey:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PostApiKeyResponse'
        targets:
          type: array
          items:
            $ref: '#/components/schemas/PostTargetResponse'
        media:
          type: array
          items:
            $ref: '#/components/schemas/MediaResponse'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    TargetBody:
      required:
        - socialAccountId
        - content
        - options
      type: object
      properties:
        socialAccountId:
          type:
            - 'null'
            - string
          description: The account's id, from GET /v1/accounts.
          format: uuid
        content:
          type:
            - 'null'
            - string
          description: 'This account''s own text. Null: the post''s.'
        options:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/JsonObject'
              description: >-
                The platform's options, such as format or privacy. Null: the
                defaults.
    ScheduleBody:
      required:
        - mode
        - at
      type: object
      properties:
        mode:
          enum:
            - draft
            - now
            - at
            - null
          type:
            - 'null'
            - string
          description: draft (the default), now, or at.
        at:
          type:
            - 'null'
            - string
          description: >-
            For at: when, on the workspace's clock, as YYYY-MM-DDTHH:mm without
            an offset. GET /v1/me says which clock. For draft, optional: the
            time it is planned for; nothing publishes it.
    PostAuthorResponse:
      required:
        - id
        - firstName
        - lastName
        - imageUrl
      type: object
      properties:
        id:
          type: string
          format: uuid
        firstName:
          type:
            - 'null'
            - string
        lastName:
          type:
            - 'null'
            - string
        imageUrl:
          type:
            - 'null'
            - string
    PostApiKeyResponse:
      required:
        - id
        - name
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
    PostTargetResponse:
      required:
        - socialAccountId
        - platform
        - content
        - options
        - status
        - externalPostId
        - externalUrl
        - error
        - errorCode
        - waitReason
        - nextAttemptAt
        - attempts
        - publishedAt
        - account
      type: object
      properties:
        socialAccountId:
          type: string
          format: uuid
        platform:
          enum:
            - instagram
            - facebook
            - youtube
            - tiktok
          type: string
        content:
          type:
            - 'null'
            - string
        options:
          $ref: '#/components/schemas/JsonElement'
        status:
          enum:
            - pending
            - publishing
            - processing
            - published
            - failed
          type: string
        externalPostId:
          type:
            - 'null'
            - string
        externalUrl:
          type:
            - 'null'
            - string
        error:
          type:
            - 'null'
            - string
        errorCode:
          enum:
            - reconnect_required
            - not_publishable
            - rejected
            - outcome_unknown
            - processing_timeout
            - rate_limited
            - platform_error
            - interrupted
            - deleted
            - payment_required
            - null
          type:
            - 'null'
            - string
        waitReason:
          enum:
            - retrying
            - rate_limited
            - null
          type:
            - 'null'
            - string
        nextAttemptAt:
          type:
            - 'null'
            - string
          format: date-time
        attempts:
          type: integer
          format: int32
        publishedAt:
          type:
            - 'null'
            - string
          format: date-time
        account:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PostAccountResponse'
    MediaResponse:
      required:
        - id
        - kind
        - status
        - contentType
        - fileName
        - size
        - width
        - height
        - durationSeconds
        - url
        - posterUrl
        - createdAt
      type: object
      properties:
        id:
          type: string
          format: uuid
        kind:
          enum:
            - image
            - video
          type: string
        status:
          enum:
            - uploading
            - ready
          type: string
        contentType:
          type: string
        fileName:
          type: string
        size:
          type: integer
          format: int64
        width:
          type:
            - 'null'
            - integer
          format: int32
        height:
          type:
            - 'null'
            - integer
          format: int32
        durationSeconds:
          type:
            - 'null'
            - number
          format: double
        url:
          type:
            - 'null'
            - string
        posterUrl:
          type:
            - 'null'
            - string
        createdAt:
          type: string
          format: date-time
    JsonObject:
      type: object
    JsonElement: {}
    PostAccountResponse:
      required:
        - handle
        - displayName
        - avatarUrl
        - isActive
      type: object
      properties:
        handle:
          type:
            - 'null'
            - string
        displayName:
          type:
            - 'null'
            - string
        avatarUrl:
          type:
            - 'null'
            - string
        isActive:
          type: boolean
  securitySchemes:
    apiKey:
      type: http
      description: A workspace API key (pst_live_…).
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.