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

# Create a post

> Posts now, or schedules the post when scheduled_at is set. Every network's rules are checked first; a post that breaks one is refused with 400 and nothing is sent. With an API key in approval mode the post waits for you in PostMesh instead.

Needs an API key with the `publish` scope.



## OpenAPI

````yaml /openapi.json post /posts
openapi: 3.1.0
info:
  title: PostMesh API
  version: 1.0.0
  description: >-
    The PostMesh API posts, schedules and reads your posts on every network you
    connected, with JSON in and out.


    **Authentication.** Send an API key from Settings, API & MCP as
    `Authorization: Bearer pm_live_...`. Each key has scopes (read, drafts,
    publish, media); every endpoint says which it needs.


    **Retries.** Send an `Idempotency-Key` header (up to 255 printable
    characters, a UUID is ideal) with every POST. Sending the same key again
    within 24 hours answers with the first request's status and body instead of
    posting twice, and says so with `Idempotent-Replayed: true`. A request still
    running under the key answers 409; one that failed with a 5xx or 429 frees
    the key, so the retry runs. The same key with a different body is refused
    with 422.


    **Rate limits.** Each key may make 120 requests a minute. Every answer
    carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`
    (Unix seconds); a 429 also carries `Retry-After`. Posting and uploads have
    their own, smaller limits.


    **Errors.** A refusal is JSON with `error` (plain words) and `code` (stable,
    to act on).
servers:
  - url: https://postmesh.app/api/v1
security:
  - apiKey: []
tags:
  - name: Posts
    description: Send, schedule, change and read posts.
  - name: Drafts
    description: Posts saved for later.
  - name: Media
    description: Images and videos for posts.
  - name: Accounts
    description: Your connected accounts and your plan.
  - name: Analytics
    description: How your posts did.
paths:
  /posts:
    post:
      tags:
        - Posts
      summary: Create a post
      description: >-
        Posts now, or schedules the post when scheduled_at is set. Every
        network's rules are checked first; a post that breaks one is refused
        with 400 and nothing is sent. With an API key in approval mode the post
        waits for you in PostMesh instead.


        Needs an API key with the `publish` scope.
      operationId: createPost
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePost'
      responses:
        '200':
          description: >-
            Answered from your posts: this same post was sent before under this
            key, so nothing was sent again.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedPost'
        '201':
          description: Sent or scheduled. Each account's outcome is in post.accounts.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedPost'
        '202':
          description: >-
            Accepted: it goes out within a minute. Read it again for each
            account's outcome.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedPost'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/Unprocessable'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        Makes a retry safe: the same key within 24 hours answers with the first
        request's result. Up to 255 printable characters.
      schema:
        type: string
        minLength: 1
        maxLength: 255
  schemas:
    CreatePost:
      type: object
      properties:
        content:
          default: ''
          description: The caption every account gets unless captions gives it its own.
          type: string
          maxLength: 63206
        platforms:
          minItems: 1
          maxItems: 12
          type: array
          items:
            type: string
            enum:
              - twitter
              - youtube
              - instagram
              - tiktok
              - threads
              - facebook
              - linkedin
              - reddit
              - bluesky
              - mastodon
              - telegram
              - discord
            description: A network PostMesh posts to.
          description: The networks to post to.
        account_ids:
          description: >-
            The connected accounts to post to, from GET /accounts. Left out,
            every account on the networks in platforms.
          maxItems: 50
          type: array
          items:
            type: string
            format: uuid
        captions:
          description: >-
            Own captions, keyed by network ("twitter") or by account id for one
            account's own copy.
          type: object
          propertyNames:
            type: string
            maxLength: 64
          additionalProperties:
            type: string
            maxLength: 63206
        media:
          description: Files from POST /media, in order.
          maxItems: 35
          type: array
          items:
            $ref: '#/components/schemas/MediaRef'
        media_ids:
          description: Media library ids from GET /media, added after media.
          maxItems: 35
          type: array
          items:
            type: string
            format: uuid
        scheduled_at:
          description: When to post. Left out, the post goes out now.
          type: string
          format: date-time
        network_settings:
          description: >-
            Each network's settings (privacy, title, flair...), keyed by
            network. The fields each takes are below.
          type: object
          additionalProperties: false
          properties:
            twitter:
              $ref: '#/components/schemas/XSettings'
            youtube:
              $ref: '#/components/schemas/YouTubeSettings'
            instagram:
              $ref: '#/components/schemas/InstagramSettings'
            tiktok:
              $ref: '#/components/schemas/TikTokSettings'
            threads:
              $ref: '#/components/schemas/ThreadsSettings'
            facebook:
              $ref: '#/components/schemas/FacebookSettings'
            linkedin:
              $ref: '#/components/schemas/LinkedInSettings'
            reddit:
              $ref: '#/components/schemas/RedditSettings'
            bluesky:
              $ref: '#/components/schemas/BlueskySettings'
            mastodon:
              $ref: '#/components/schemas/MastodonSettings'
            discord:
              $ref: '#/components/schemas/DiscordSettings'
        settings:
          description: >-
            One account's own settings, keyed by account id. Accounts on one
            network must agree.
          type: object
          propertyNames:
            type: string
            maxLength: 128
          additionalProperties:
            oneOf:
              - type: object
                properties:
                  platform:
                    const: twitter
                  values:
                    $ref: '#/components/schemas/XSettings'
                required:
                  - platform
                  - values
                additionalProperties: false
              - type: object
                properties:
                  platform:
                    const: youtube
                  values:
                    $ref: '#/components/schemas/YouTubeSettings'
                required:
                  - platform
                  - values
                additionalProperties: false
              - type: object
                properties:
                  platform:
                    const: instagram
                  values:
                    $ref: '#/components/schemas/InstagramSettings'
                required:
                  - platform
                  - values
                additionalProperties: false
              - type: object
                properties:
                  platform:
                    const: tiktok
                  values:
                    $ref: '#/components/schemas/TikTokSettings'
                required:
                  - platform
                  - values
                additionalProperties: false
              - type: object
                properties:
                  platform:
                    const: threads
                  values:
                    $ref: '#/components/schemas/ThreadsSettings'
                required:
                  - platform
                  - values
                additionalProperties: false
              - type: object
                properties:
                  platform:
                    const: facebook
                  values:
                    $ref: '#/components/schemas/FacebookSettings'
                required:
                  - platform
                  - values
                additionalProperties: false
              - type: object
                properties:
                  platform:
                    const: linkedin
                  values:
                    $ref: '#/components/schemas/LinkedInSettings'
                required:
                  - platform
                  - values
                additionalProperties: false
              - type: object
                properties:
                  platform:
                    const: reddit
                  values:
                    $ref: '#/components/schemas/RedditSettings'
                required:
                  - platform
                  - values
                additionalProperties: false
              - type: object
                properties:
                  platform:
                    const: bluesky
                  values:
                    $ref: '#/components/schemas/BlueskySettings'
                required:
                  - platform
                  - values
                additionalProperties: false
              - type: object
                properties:
                  platform:
                    const: mastodon
                  values:
                    $ref: '#/components/schemas/MastodonSettings'
                required:
                  - platform
                  - values
                additionalProperties: false
              - type: object
                properties:
                  platform:
                    const: discord
                  values:
                    $ref: '#/components/schemas/DiscordSettings'
                required:
                  - platform
                  - values
                additionalProperties: false
        label_ids:
          description: Your own labels for the post.
          maxItems: 10
          type: array
          items:
            type: string
            format: uuid
        signature:
          description: off sends the post without the accounts' default signatures.
          type: string
          enum:
            - 'on'
            - 'off'
        repeat:
          $ref: '#/components/schemas/Repeat'
        draft_id:
          description: >-
            The draft this post is made from. Its labels are kept when label_ids
            is left out.
          type: string
          format: uuid
      required:
        - platforms
      additionalProperties: false
      description: A post to send now or schedule.
    CreatedPost:
      type: object
      properties:
        post:
          $ref: '#/components/schemas/Post'
        success:
          type: boolean
          description: >-
            False when every account failed; each account's outcome is in
            post.accounts.
        replayed:
          description: >-
            The Idempotency-Key was used before: this is that request's answer,
            and nothing was sent again.
          type: boolean
          const: true
        awaiting_approval:
          description: 'The API key is in approval mode: the post waits for you in PostMesh.'
          type: boolean
          const: true
        outcome_unknown:
          description: >-
            PostMesh can't tell whether the post went out. Check the account
            before sending it again.
          type: boolean
          const: true
        error:
          type: string
      required:
        - post
        - success
      additionalProperties: false
    MediaRef:
      type: object
      properties:
        path:
          type: string
          minLength: 1
          maxLength: 512
          description: The stored file's path, from POST /media.
        name:
          type: string
          minLength: 1
          maxLength: 255
        mime_type:
          type: string
          enum:
            - image/jpeg
            - image/png
            - image/webp
            - image/gif
            - image/avif
            - video/mp4
            - video/mpeg
            - video/webm
            - video/quicktime
      required:
        - path
        - name
        - mime_type
      additionalProperties: false
      description: >-
        A file in your PostMesh storage, as POST /media and GET /media return
        it.
    XSettings:
      type: object
      properties:
        replySettings:
          type: string
          enum:
            - everyone
            - following
            - mentionedUsers
            - verified
            - subscribers
        community:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
        shareWithFollowers:
          type: boolean
        madeWithAi:
          type: boolean
        paidPartnership:
          type: boolean
        poll:
          anyOf:
            - type: object
              properties:
                options:
                  minItems: 2
                  maxItems: 4
                  type: array
                  items:
                    type: string
                    minLength: 1
                durationMinutes:
                  type: integer
                  minimum: 5
                  maximum: 10080
              required:
                - options
                - durationMinutes
            - type: 'null'
        altTexts:
          maxItems: 4
          type: array
          items:
            type: string
            maxLength: 1000
        thread:
          maxItems: 24
          type: array
          items:
            type: string
        replyTo:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
        quote:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
        firstComment:
          anyOf:
            - type: object
              properties:
                text:
                  type: string
                delayMinutes:
                  type: integer
                  minimum: 0
                  maximum: 1440
              required:
                - text
                - delayMinutes
            - type: 'null'
      required:
        - replySettings
        - community
        - shareWithFollowers
        - madeWithAi
        - paidPartnership
        - altTexts
        - thread
        - replyTo
        - quote
      description: X (Twitter) settings for a post.
    YouTubeSettings:
      type: object
      properties:
        tags:
          maxItems: 15
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 30
        madeForKids:
          type: boolean
        privacy:
          type: string
          enum:
            - public
            - unlisted
            - private
      required:
        - tags
        - madeForKids
        - privacy
      description: YouTube settings for a post.
    InstagramSettings:
      type: object
      properties:
        format:
          anyOf:
            - type: string
              enum:
                - post
                - story
            - type: string
              enum:
                - STORIES
                - REELS
                - IMAGE
                - VIDEO
                - CAROUSEL
                - CAROUSEL_ALBUM
        shareToFeed:
          type: boolean
        trialReel:
          type: string
          enum:
            - 'off'
            - manual
            - performance
        collaborators:
          maxItems: 3
          type: array
          items:
            type: string
            maxLength: 31
      required:
        - format
        - shareToFeed
        - trialReel
        - collaborators
      description: Instagram settings for a post.
    TikTokSettings:
      type: object
      properties:
        privacyLevel:
          type: string
          enum:
            - ''
            - PUBLIC_TO_EVERYONE
            - MUTUAL_FOLLOW_FRIENDS
            - FOLLOWER_OF_CREATOR
            - SELF_ONLY
        allowComment:
          type: boolean
        allowDuet:
          type: boolean
        allowStitch:
          type: boolean
        commercial:
          type: boolean
        brandOrganic:
          type: boolean
        brandContent:
          type: boolean
        isAigc:
          type: boolean
        autoAddMusic:
          type: boolean
        coverTimestampMs:
          anyOf:
            - type: integer
              minimum: 0
              maximum: 9007199254740991
            - type: 'null'
        durationSec:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
        postMode:
          anyOf:
            - type: string
              enum:
                - direct
                - inbox
            - type: string
              enum:
                - DIRECT_POST
                - MEDIA_UPLOAD
        photoTitle:
          type: string
          maxLength: 90
      required:
        - privacyLevel
        - allowComment
        - allowDuet
        - allowStitch
        - commercial
        - brandOrganic
        - brandContent
        - isAigc
        - autoAddMusic
        - coverTimestampMs
        - durationSec
        - postMode
        - photoTitle
      description: TikTok settings for a post.
    ThreadsSettings:
      type: object
      properties:
        replyControl:
          type: string
          enum:
            - everyone
            - followers_only
            - accounts_you_follow
            - mentioned_only
        topicTag:
          anyOf:
            - type: string
              maxLength: 58
            - type: 'null'
        link:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
        poll:
          anyOf:
            - type: object
              properties:
                options:
                  minItems: 2
                  maxItems: 4
                  type: array
                  items:
                    type: string
                    minLength: 1
              required:
                - options
            - type: 'null'
      required:
        - replyControl
        - topicTag
        - link
      description: Threads settings for a post.
    FacebookSettings:
      type: object
      properties:
        link:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
        videoTitle:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
        backgroundPresetId:
          anyOf:
            - type: string
              pattern: ^\d{1,25}$
            - type: 'null'
      required:
        - link
        - videoTitle
        - backgroundPresetId
      description: Facebook settings for a post.
    LinkedInSettings:
      type: object
      properties:
        asDocument:
          type: boolean
        documentTitle:
          anyOf:
            - type: string
              maxLength: 100
            - type: 'null'
        firstComment:
          anyOf:
            - type: object
              properties:
                text:
                  type: string
                delayMinutes:
                  type: integer
                  minimum: 0
                  maximum: 1440
              required:
                - text
                - delayMinutes
            - type: 'null'
      required:
        - asDocument
        - documentTitle
      description: LinkedIn settings for a post.
    RedditSettings:
      type: object
      properties:
        title:
          anyOf:
            - type: string
              minLength: 1
              maxLength: 300
            - type: 'null'
        subreddit:
          anyOf:
            - type: string
              minLength: 1
              maxLength: 64
            - type: 'null'
        flairId:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
        kind:
          anyOf:
            - type: string
              enum:
                - self
                - link
                - image
                - video
                - gallery
            - type: 'null'
        destinations:
          maxItems: 4
          type: array
          items:
            type: object
            properties:
              subreddit:
                type: string
                minLength: 1
                maxLength: 64
              title:
                anyOf:
                  - type: string
                    minLength: 1
                    maxLength: 300
                  - type: 'null'
              flairId:
                anyOf:
                  - type: string
                    maxLength: 64
                  - type: 'null'
              kind:
                anyOf:
                  - type: string
                    enum:
                      - self
                      - link
                      - image
                      - video
                      - gallery
                  - type: 'null'
            required:
              - subreddit
        nsfw:
          type: boolean
        spoiler:
          type: boolean
        firstComment:
          anyOf:
            - type: object
              properties:
                text:
                  type: string
                delayMinutes:
                  type: integer
                  minimum: 0
                  maximum: 1440
              required:
                - text
                - delayMinutes
            - type: 'null'
      description: Reddit settings for a post.
    BlueskySettings:
      type: object
      properties:
        quoteUrl:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
        altTexts:
          maxItems: 4
          type: array
          items:
            type: string
            maxLength: 2000
        linkCard:
          type: boolean
        language:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - quoteUrl
        - altTexts
        - linkCard
      description: Bluesky settings for a post.
    MastodonSettings:
      type: object
      properties:
        visibility:
          type: string
          enum:
            - public
            - unlisted
            - private
            - direct
        spoilerText:
          anyOf:
            - type: string
              maxLength: 1000
            - type: 'null'
        sensitive:
          type: boolean
        language:
          anyOf:
            - type: string
              maxLength: 8
            - type: 'null'
        poll:
          anyOf:
            - type: object
              properties:
                options:
                  minItems: 2
                  maxItems: 20
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 200
                expiresIn:
                  type: integer
                  minimum: 60
                  maximum: 31536000
                multiple:
                  type: boolean
                hideTotals:
                  type: boolean
              required:
                - options
                - expiresIn
                - multiple
                - hideTotals
            - type: 'null'
      required:
        - visibility
        - spoilerText
        - sensitive
        - language
      description: Mastodon settings for a post.
    DiscordSettings:
      type: object
      properties:
        threadName:
          anyOf:
            - type: string
              maxLength: 100
            - type: 'null'
        threadId:
          anyOf:
            - type: string
            - type: 'null'
        altTexts:
          maxItems: 10
          type: array
          items:
            type: string
            maxLength: 1024
        pingMentions:
          type: boolean
      required:
        - threadName
        - threadId
        - altTexts
        - pingMentions
      description: Discord settings for a post.
    Repeat:
      type: object
      properties:
        rule:
          type: string
          minLength: 1
          maxLength: 200
          description: >-
            An RRULE: FREQ=DAILY, WEEKLY or MONTHLY, INTERVAL, BYDAY (weekly
            only), and COUNT or UNTIL. For example
            FREQ=WEEKLY;BYDAY=MO,TH;COUNT=8.
        time_zone:
          description: The IANA time zone the times repeat in. UTC when left out.
          type: string
          maxLength: 64
        vary:
          description: Rewrite the caption a little each time. X needs it on.
          type: boolean
      required:
        - rule
      additionalProperties: false
      description: How a scheduled post repeats. Needs scheduled_at.
    Post:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - scheduled
            - awaiting_approval
            - needs_review
            - processing
            - sent
            - failed
            - cancelled
        platforms:
          type: array
          items:
            type: string
        text:
          type: string
        text_cut:
          description: The text was cut to fit; GET /posts/{id} has all of it.
          type: boolean
          const: true
        scheduled_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          description: Send it back as expected_updated_at to change only this version.
          type: string
          format: date-time
        source:
          description: Where the post came from.
          type: string
          enum:
            - app
            - agent
            - mcp
            - api
            - csv
            - clip_factory
        error:
          type: string
        accounts:
          description: Each account's outcome, once the post went out or failed.
          type: array
          items:
            type: object
            properties:
              account_id:
                type: string
              platform:
                type: string
              username:
                type: string
              result:
                type: string
                enum:
                  - posted
                  - processing
                  - failed
                  - unconfirmed
              url:
                description: The live post on the network.
                type: string
              error:
                type: string
            required:
              - platform
              - result
            additionalProperties: false
        label_ids:
          type: array
          items:
            type: string
            format: uuid
      required:
        - id
        - status
        - platforms
        - text
        - created_at
      additionalProperties: false
      description: 'A post: sent, scheduled, waiting or failed.'
    Error:
      type: object
      properties:
        error:
          type: string
          description: What went wrong, in plain words.
        code:
          type: string
          description: >-
            A stable code to act on, such as invalid_request, rate_limited or
            idempotency_key_reused.
        field:
          description: The request field that was refused.
          type: string
        retry_after:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
      required:
        - error
        - code
      additionalProperties: false
      description: Every refusal looks like this.
  headers:
    X-RateLimit-Limit:
      description: Requests this key may make in a minute.
      schema:
        type: integer
    X-RateLimit-Remaining:
      description: Requests left this minute.
      schema:
        type: integer
    X-RateLimit-Reset:
      description: When the minute resets, in Unix seconds.
      schema:
        type: integer
  responses:
    BadRequest:
      description: >-
        The request was refused: a field is missing or invalid. `field` names
        it.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: No API key, or one that isn't valid any more.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PaymentRequired:
      description: Your plan doesn't include this, or it has ended.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        The key can't do this: it needs another scope (`code` is
        `api_key_scope`), or it is in approval mode.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: >-
        The item changed since you read it, is being sent right now, or a
        request with this Idempotency-Key is still running.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unprocessable:
      description: This Idempotency-Key was already used for a different request.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: Too many requests. Wait for `Retry-After` seconds.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        Retry-After:
          description: Seconds to wait.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unavailable:
      description: PostMesh can't answer right now. Try again shortly.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: 'An API key from Settings, API & MCP: pm_live_...'

````

## Related topics

- [Create a draft](https://postmesh.app/docs/api-reference/drafts/create-a-draft.md)
- [Quickstart: your first post to every network](https://postmesh.app/docs/quickstart.md)
- [Post to Discord with a channel webhook](https://postmesh.app/docs/discord.md)
- [Post to social media from Claude, Cursor and Codex (MCP)](https://postmesh.app/docs/mcp-setup.md)
- [MCP tool reference](https://postmesh.app/docs/mcp-tools.md)


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