> ## 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.

# Change a scheduled post

> Changes the text, accounts, settings or time of a post still waiting to go out.

Needs an API key with the `publish` scope.



## OpenAPI

````yaml /openapi.json patch /posts/{id}
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/{id}:
    patch:
      tags:
        - Posts
      summary: Change a scheduled post
      description: >-
        Changes the text, accounts, settings or time of a post still waiting to
        go out.


        Needs an API key with the `publish` scope.
      operationId: updatePost
      parameters:
        - name: id
          in: path
          required: true
          description: The post's id.
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePost'
      responses:
        '200':
          description: The post as it is now.
          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/PostAnswer'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  schemas:
    UpdatePost:
      type: object
      properties:
        content:
          type: string
          maxLength: 63206
        captions:
          type: object
          propertyNames:
            type: string
            maxLength: 64
          additionalProperties:
            type: string
            maxLength: 63206
        account_ids:
          maxItems: 50
          type: array
          items:
            type: string
            format: uuid
        scheduled_at:
          description: A new time.
          type: string
          format: date-time
        publish_now:
          description: Send it now instead of at its time.
          type: boolean
          const: true
        settings:
          description: >-
            Network fields to change: youtube_tags, youtube_made_for_kids,
            youtube_privacy, tiktok_options, reddit_title, reddit_subreddit,
            reddit_flair_id, always_post.
          type: object
          additionalProperties: {}
        series:
          description: 'For a repeating post: this time only, or this and every later one.'
          type: string
          enum:
            - this
            - all
        repeat:
          description: A new repeat from this post on, or null to stop after it.
          anyOf:
            - $ref: '#/components/schemas/Repeat'
            - type: 'null'
        expected_updated_at:
          description: The post's updated_at as you read it. Refused when it changed since.
          type: string
          format: date-time
      additionalProperties: false
      description: >-
        Changes to a post still waiting for its time. Fields left out stay as
        they are.
    PostAnswer:
      type: object
      properties:
        post:
          $ref: '#/components/schemas/Post'
        warning:
          type: string
        youtube:
          description: What happened to videos already on YouTube's schedule.
          type: array
          items:
            type: object
            additionalProperties: {}
      required:
        - post
      additionalProperties: false
    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'
    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'
    NotFound:
      description: No such item in your PostMesh.
      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'
    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

- [MCP tool reference](https://postmesh.app/docs/mcp-tools.md)
- [Cancel a scheduled post](https://postmesh.app/docs/api-reference/posts/cancel-a-scheduled-post.md)
- [Schedule posts to every network](https://postmesh.app/docs/schedule-posts.md)
- [Why a post failed and how to retry it](https://postmesh.app/docs/fix-a-failed-post.md)
- [Change a draft](https://postmesh.app/docs/api-reference/drafts/change-a-draft.md)


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