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

# Create a post

> Creates a draft, or schedules it if you set `schedule`, `schedule_now` or `queue` (which also needs at least one account). Each line of `body` becomes a paragraph.

**Required permission:** `publishing:posts:write`, plus `publishing:posts:publish` to schedule, queue or publish now.



## OpenAPI

````yaml /api-reference/publishing.openapi.json post /{workspace}/posts
openapi: 3.1.0
info:
  title: Publishing API
  version: 1.0.0
  description: >-
    Social accounts, posts, scheduling, approval, tags and media for one
    workspace.
servers:
  - url: https://{domain}/os/api
    description: Your platform domain
    variables:
      domain:
        default: app.example.com
        description: The domain you sign in to, without https://
security:
  - bearerAuth: []
  - apiKeyHeader: []
tags:
  - name: Diagnostics
  - name: Accounts
  - name: Posts
  - name: Media
  - name: Tags
paths:
  /{workspace}/posts:
    post:
      tags:
        - Posts
      summary: Create a post
      description: >-
        Creates a draft, or schedules it if you set `schedule`, `schedule_now`
        or `queue` (which also needs at least one account). Each line of `body`
        becomes a paragraph.


        **Required permission:** `publishing:posts:write`, plus
        `publishing:posts:publish` to schedule, queue or publish now.
      operationId: posts.store
      parameters:
        - name: workspace
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Your workspace UUID. Must match the API key's workspace.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - versions
              properties:
                accounts:
                  type: array
                  items:
                    type: integer
                  description: Account `id`s (from List accounts) to publish to.
                  example:
                    - 12
                tags:
                  type: array
                  items:
                    type: integer
                  description: Tag `id`s.
                date:
                  type: string
                  nullable: true
                  example: '2026-10-20'
                  description: '`YYYY-MM-DD`'
                time:
                  type: string
                  nullable: true
                  example: '09:00'
                  description: '`HH:mm`'
                timezone:
                  type: string
                  example: Europe/London
                  description: Timezone for `date` and `time`.
                schedule:
                  type: boolean
                  description: Schedule for `date` and `time`.
                schedule_now:
                  type: boolean
                  description: Publish immediately.
                queue:
                  type: boolean
                  description: Add to the next free slot in the posting schedule.
                versions:
                  type: array
                  minItems: 1
                  items:
                    type: object
                    required:
                      - account_id
                      - is_original
                      - content
                    properties:
                      account_id:
                        type: integer
                        description: >-
                          `0` for the original version. Otherwise an account
                          `id` that is also in `accounts`, to override the
                          content for that account.
                        example: 0
                      is_original:
                        type: boolean
                        description: Only the first version is the original.
                        example: true
                      content:
                        type: array
                        minItems: 1
                        description: >-
                          One item per post in a thread. Most posts have a
                          single item.
                        items:
                          type: object
                          properties:
                            body:
                              type: string
                              nullable: true
                              example: Our autumn sale starts today!
                            url:
                              type: string
                              nullable: true
                            media:
                              type: array
                              items:
                                type: integer
                              description: Media `id`s from the media library.
                      options:
                        type: object
                        description: >-
                          Network-specific options, keyed by provider (for
                          example a Reddit title).
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Post'
components:
  schemas:
    Post:
      type: object
      properties:
        id:
          type: integer
        uuid:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - draft
            - scheduled
            - publishing
            - published
            - failed
            - needs_approval
            - approval_denied
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/Account'
        versions:
          type: array
          items:
            type: object
            required:
              - account_id
              - is_original
              - content
            properties:
              account_id:
                type: integer
                description: >-
                  `0` for the original version. Otherwise an account `id` that
                  is also in `accounts`, to override the content for that
                  account.
                example: 0
              is_original:
                type: boolean
                description: Only the first version is the original.
                example: true
              content:
                type: array
                minItems: 1
                description: One item per post in a thread. Most posts have a single item.
                items:
                  type: object
                  properties:
                    body:
                      type: string
                      nullable: true
                      example: Our autumn sale starts today!
                    url:
                      type: string
                      nullable: true
                    media:
                      type: array
                      items:
                        type: integer
                      description: Media `id`s from the media library.
              options:
                type: object
                description: >-
                  Network-specific options, keyed by provider (for example a
                  Reddit title).
        tags:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        user:
          type: object
          properties:
            name:
              type: string
        scheduled_at:
          type: string
          nullable: true
          description: '`YYYY-MM-DD HH:mm:ss`, UTC'
        published_at:
          type: string
          nullable: true
        partially_published_at:
          type: string
          nullable: true
        failed_at:
          type: string
          nullable: true
        created_at:
          type: string
        trashed:
          type: boolean
    Account:
      type: object
      properties:
        id:
          type: integer
          description: Use this in a post's `accounts`.
        uuid:
          type: string
          format: uuid
        name:
          type: string
        username:
          type: string
        image:
          type: string
        provider:
          type: string
          example: instagram
        data:
          type: object
        authorized:
          type: boolean
        created_at:
          type: string
        published_at:
          type: string
          nullable: true
    Tag:
      type: object
      properties:
        id:
          type: integer
        uuid:
          type: string
          format: uuid
        name:
          type: string
        hex_color:
          type: string
          example: '#4F46E5'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'A workspace API key: `Authorization: Bearer osk_...`'
    apiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: The same workspace API key in the `x-api-key` header.

````

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