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

# Change a post in Replier's calendar

> Changes a draft, scheduled or failed post that hasn't started publishing. Only the fields you send change; arrays replace the whole list. version must be the post's current version (POST_VERSION_CONFLICT otherwise). action defaults to the post's own and is required for a failed post.

Needs an API key with write access.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/workspaces/{workspace_id}/scheduled-posts/{post_id}
openapi: 3.1.0
info:
  title: Replier API
  version: '1'
servers:
  - url: https://api.usereplier.com
security:
  - apiKey: []
paths:
  /v1/workspaces/{workspace_id}/scheduled-posts/{post_id}:
    patch:
      tags:
        - Publishing
      summary: Change a post in Replier's calendar
      description: >-
        Changes a draft, scheduled or failed post that hasn't started
        publishing. Only the fields you send change; arrays replace the whole
        list. version must be the post's current version (POST_VERSION_CONFLICT
        otherwise). action defaults to the post's own and is required for a
        failed post.


        Needs an API key with write access.
      operationId: update_scheduled_post
      parameters:
        - name: workspace_id
          in: path
          required: true
          description: Workspace ID returned by `GET /v1/workspaces`
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        - name: post_id
          in: path
          required: true
          description: >-
            Post ID from `GET /v1/workspaces/{workspace_id}/scheduled-posts` or
            `POST /v1/workspaces/{workspace_id}/scheduled-posts`
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            Send the same key when you retry, and the request runs once. Without
            one, every request runs.
          schema:
            type: string
            minLength: 1
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                version:
                  type: integer
                  exclusiveMinimum: 0
                  maximum: 9007199254740991
                action:
                  type: string
                  enum:
                    - draft
                    - schedule
                    - publish_now
                channels:
                  description: >-
                    Every Instagram account and Facebook Page the post goes to;
                    each publishes on its own.
                  minItems: 1
                  maxItems: 20
                  type: array
                  items:
                    type: object
                    properties:
                      channel:
                        type: string
                        enum:
                          - instagram
                          - facebook
                      account_id:
                        description: >-
                          account_id from `GET
                          /v1/workspaces/{workspace_id}/publishing-accounts`
                        type: string
                        minLength: 1
                        maxLength: 64
                    required:
                      - channel
                      - account_id
                media_ids:
                  description: >-
                    They decide the kind of post: one photo, one video (a Reel),
                    or 2-20 files (a carousel; Facebook takes photos only in
                    one). A file belongs to one post.
                  minItems: 1
                  maxItems: 20
                  type: array
                  items:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                caption:
                  description: >-
                    Up to 2,200 characters, 30 hashtags and 20 @mentions. Empty
                    for none.
                  type: string
                first_comment:
                  description: >-
                    Commented on the post right after it publishes. Null for
                    none.
                  anyOf:
                    - type: string
                      maxLength: 2200
                    - type: 'null'
                cover_image_id:
                  description: >-
                    A Reel's cover: media.id of an image uploaded with purpose
                    cover. Null shows the frame a second into the video.
                  anyOf:
                    - type: string
                      format: uuid
                      pattern: >-
                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                    - type: 'null'
                publish_at:
                  description: >-
                    When to publish, at least 3 minutes and at most a year
                    ahead. Needed to schedule; a draft may keep one.
                  anyOf:
                    - type: string
                      format: date-time
                      pattern: >-
                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                    - type: 'null'
                time_zone:
                  description: >-
                    IANA time zone the user picked the time in, such as
                    Asia/Taipei. Replier shows the post's time in it.
                  type: string
                  minLength: 1
                  maxLength: 64
                automation_id:
                  description: >-
                    A comment automation from `GET
                    /v1/workspaces/{workspace_id}/automations` that answers the
                    post's comments from its first minute once it publishes, or
                    null for none. A next_post automation does not take a post
                    Replier publishes, so pass it here to answer this post.
                    Needs automations.update. An automation answers one waiting
                    post.
                  anyOf:
                    - type: string
                      format: uuid
                      pattern: >-
                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                    - type: 'null'
                move_automation:
                  description: >-
                    true moves automation_id here from another post it waits for
                    (AUTOMATION_USED_BY_POST); ask the user first.
                  type: boolean
              required:
                - version
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  workspace:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      name:
                        type: string
                      kind:
                        type: string
                        enum:
                          - personal
                          - agency
                      role:
                        type: string
                        enum:
                          - owner
                          - admin
                          - member
                    required:
                      - id
                      - name
                      - kind
                      - role
                  post:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      status:
                        description: >-
                          draft: saved, goes nowhere until scheduled or
                          published. scheduled: waits for publish_at. locked:
                          inside its last 3 minutes, being prepared; it can be
                          canceled but not edited. publishing: going out.
                          published: out on every channel. failed: a channel
                          failed; when another channel is published the post is
                          partly published, and channels[] says which. canceled.
                        type: string
                        enum:
                          - draft
                          - scheduled
                          - locked
                          - publishing
                          - published
                          - failed
                          - canceled
                      media_type:
                        description: >-
                          Decided by the files: one photo, one video (a Reel),
                          or 2-20.
                        type: string
                        enum:
                          - image
                          - carousel
                          - reels
                      caption:
                        description: The post's caption.
                        type: string
                      first_comment:
                        description: Commented on the post right after it publishes, once.
                        type:
                          - string
                          - 'null'
                      media:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            kind:
                              type: string
                              enum:
                                - image
                                - video
                            url:
                              type: string
                              format: uri
                            width:
                              anyOf:
                                - type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                                - type: 'null'
                            height:
                              anyOf:
                                - type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                                - type: 'null'
                            bytes:
                              type: integer
                              minimum: 0
                              maximum: 9007199254740991
                            duration_ms:
                              anyOf:
                                - type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                                - type: 'null'
                            cover_image_id:
                              description: >-
                                A Reel's cover image; null shows the frame a
                                second in.
                              type:
                                - string
                                - 'null'
                          required:
                            - id
                            - kind
                            - url
                            - width
                            - height
                            - bytes
                            - duration_ms
                            - cover_image_id
                      media_removed:
                        description: >-
                          Replier deleted the post's files after their
                          retention, so it can't be edited or published again.
                        type: boolean
                      publish_at:
                        anyOf:
                          - type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                          - type: 'null'
                      time_zone:
                        type: string
                      automation_id:
                        description: >-
                          The automation that answers the post's comments once
                          it is published.
                        anyOf:
                          - type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                          - type: 'null'
                      channels:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            channel:
                              type: string
                              enum:
                                - instagram
                                - facebook
                            account_id:
                              type: string
                            account_name:
                              type:
                                - string
                                - 'null'
                            account_connected:
                              description: >-
                                False once the account was disconnected from the
                                workspace; a draft keeps it, but scheduling or
                                publishing needs it connected again.
                              type: boolean
                            status:
                              description: >-
                                paused: its account was disconnected before the
                                post was due; it resumes if the same account
                                reconnects in time, and fails at the post's time
                                otherwise.
                              type: string
                              enum:
                                - pending
                                - publishing
                                - published
                                - failed
                                - paused
                            permalink:
                              type:
                                - string
                                - 'null'
                            published_at:
                              anyOf:
                                - type: string
                                  format: date-time
                                  pattern: >-
                                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                                - type: 'null'
                            publish_unconfirmed:
                              description: >-
                                Replier asked Meta to publish and is still
                                finding out whether it did. Don't publish it
                                again meanwhile.
                              type: boolean
                            error_code:
                              description: >-
                                Why the channel failed or waits, such as
                                publish_permission_required,
                                channel_disconnected, plan_required,
                                publishing_disabled or container_error.
                              type:
                                - string
                                - 'null'
                            error_message:
                              type:
                                - string
                                - 'null'
                            failed_at:
                              anyOf:
                                - type: string
                                  format: date-time
                                  pattern: >-
                                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                                - type: 'null'
                            first_comment_error:
                              type:
                                - string
                                - 'null'
                            automation_error:
                              description: >-
                                Set when the post published but its automation
                                couldn't be attached.
                              type:
                                - string
                                - 'null'
                          required:
                            - id
                            - channel
                            - account_id
                            - account_name
                            - account_connected
                            - status
                            - permalink
                            - published_at
                            - publish_unconfirmed
                            - error_code
                            - error_message
                            - failed_at
                            - first_comment_error
                            - automation_error
                      published_at:
                        anyOf:
                          - type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                          - type: 'null'
                      failed_at:
                        anyOf:
                          - type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                          - type: 'null'
                      locked:
                        description: >-
                          Inside its last 3 minutes or publishing: it can be
                          canceled until Meta is asked to publish it, but not
                          edited.
                        type: boolean
                      version:
                        description: >-
                          Pass as version to `PATCH
                          /v1/workspaces/{workspace_id}/scheduled-posts/{post_id}`.
                        type: integer
                        exclusiveMinimum: 0
                        maximum: 9007199254740991
                      created_at:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                      updated_at:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                    required:
                      - id
                      - status
                      - media_type
                      - caption
                      - first_comment
                      - media
                      - media_removed
                      - publish_at
                      - time_zone
                      - automation_id
                      - channels
                      - published_at
                      - failed_at
                      - locked
                      - version
                      - created_at
                      - updated_at
                  waiting_next_post_automations:
                    description: >-
                      next_post automations waiting on this post's accounts.
                      None of them takes this post or any post Replier
                      publishes: they wait for the account's next post published
                      outside Replier. To answer this post's comments, pass
                      automation_id. One that is this post's automation_id still
                      also waits for that next outside post; ask the user
                      whether to remove its next_post target with `PATCH
                      /v1/workspaces/{workspace_id}/automations/{automation_id}`.
                    type: array
                    items:
                      type: object
                      properties:
                        automation_id:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        automation_name:
                          type: string
                        channel:
                          type: string
                          enum:
                            - instagram
                            - facebook
                        account_id:
                          type: string
                        is_this_posts_automation:
                          type: boolean
                      required:
                        - automation_id
                        - automation_name
                        - channel
                        - account_id
                        - is_this_posts_automation
                required:
                  - workspace
                  - post
                  - waiting_next_post_automations
        default:
          $ref: '#/components/responses/Error'
components:
  responses:
    Error:
      description: Refused
      content:
        application/json:
          schema:
            type: object
            required:
              - error
            properties:
              error:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                    description: >-
                      Why the request was refused, such as AUTOMATION_NOT_FOUND
                      or VERSION_CONFLICT. Other fields beside it give details.
                  message:
                    type: string
                    description: The same reason, in English.
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: A Replier API key (rpl_...).

````

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