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

# List a post's history

> See who changed a post, what they changed and when, newest first.

> [!NOTE]
>
> Needs `posts:read`. See [Permissions](/docs/essentials/authentication.md#permissions).

What happened to one post, newest first: who made it, edited it, scheduled, moved or published it, which accounts and labels were added or removed, and what each network did with it. It is the history the post's Details panel shows in PostSyncer. Times are UTC.

* One person's run of the same change is one entry: a stretch of saves to the text is one `edited` entry, with `count` saves from `since` to `at`.
* `by` is who did it: a team member, an agent or API key (with the key's name), or PostSyncer AI. It is `null` for what PostSyncer or a network did on its own, such as a network posting it.
* What PostSyncer does on its own while it sends a post is left out. Each network's result is kept: `posted` with its link, `failed` with the reason.

20 entries a page. Send the answer's `next` as `before` for older entries; `next` is `null` on the last page.

## Errors

| Status | `error` | When | Retry? |
| - | - | - | - |
| 401 | | No API key, or not a valid one. | No: fix the key. |
| 403 | | The key lacks `posts:read`, or its user is inactive. | No: grant it in Settings → API. |
| 404 | | No post with that id in the workspaces the key can reach. | No. |
| 422 | | `before` isn't a whole number of 1 or more. | No: fix the request. |
| 429 | | More than 60 requests a minute. | Yes, after `Retry-After` seconds. |

## Related

* [Get a post](/docs/api-reference/posts/get.md): the post as it is now.
* [Update a post](/docs/api-reference/posts/update.md): `content_version` stops one change overwriting another.


## OpenAPI

````yaml GET /posts/{post}/history
openapi: 3.0.3
info:
  title: PostSyncer API
  description: >-
    Post to 12 social networks from your code: posts, media, comments,
    analytics, webhooks and more.
  version: 1.0.0
servers:
  - url: https://postsyncer.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: The workspaces the key can reach.
  - name: Accounts
    description: Connected social accounts, links to connect more, and disconnecting them.
  - name: Posts
    description: Drafts, scheduled and published posts, approvals and a post's history.
  - name: Post settings
    description: A post's auto-plug, comment moderation and contact collection.
  - name: Media
    description: >-
      The media library: file uploads, URL imports, and reading videos and
      social posts' files.
  - name: Folders
    description: Folders that organise the media library.
  - name: Comments
    description: >-
      Comments on your posts: reading, replying, editing, hiding, deleting and
      syncing them.
  - name: Reviews
    description: Google Business Profile reviews and your replies to them.
  - name: Analytics
    description: Workspace, account and post performance.
  - name: Brand
    description: >-
      A workspace's brand: identity, voice, look, accounts, competitors,
      learnings and rules.
  - name: Labels
    description: Labels used to tag posts.
  - name: Campaigns
    description: Campaigns used to group posts.
  - name: Snippets
    description: Saved snippets and hashtag groups to drop into posts.
  - name: Webhooks
    description: Signed webhook endpoints that get your notification events.
  - name: Billing
    description: >-
      The owner's plan, invoices and the links that pay for, change or cancel
      it.
  - name: Team
    description: A workspace's teammates and invitations, and their roles.
  - name: Notifications
    description: >-
      Your bell and notification settings, and the workspace's Slack, Discord
      and Telegram channels.
  - name: Blog-to-social
    description: Blog feeds that turn a workspace's new articles into posts.
  - name: Products
    description: Products the workspace's posts can promote.
  - name: Contacts
    description: People who commented on the workspace's posts, and the lists they are on.
  - name: Profile
    description: 'The key''s user: their name and sign-in email.'
  - name: API keys
    description: 'Your API keys: listing and deleting them.'
  - name: Agent sign-up
    description: >-
      An AI agent signs a person up with a code emailed to them, and gets their
      first key. No key needed.
paths:
  /posts/{post}/history:
    get:
      tags:
        - Posts
      summary: List a post's history
      description: >-
        Needs `posts:read`. Who changed the post, what and when, newest first:
        the same entries as the post's Details panel in PostSyncer. One person's
        run of the same change is one entry (`count`, from `since` to `at`). 20
        entries a page; send `next` as `before` for older ones. Times are UTC.
      operationId: listPostHistory
      parameters:
        - name: post
          in: path
          required: true
          description: The post's id.
          schema:
            type: integer
        - name: before
          in: query
          required: false
          description: The `next` of the page before, for older entries.
          schema:
            type: integer
            minimum: 1
      responses:
        '200':
          description: A page of the post's history.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - next
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/PostHistoryEntry'
                  next:
                    type: integer
                    nullable: true
                    description: Send as `before` for the next page; null on the last page.
              examples:
                default:
                  summary: The newest entries
                  value:
                    data:
                      - id: 88214
                        kind: edited
                        at: '2030-03-02T11:05:41Z'
                        since: null
                        count: 1
                        by:
                          kind: api_key
                          key: token:5821
                          name: Menu sync
                          logo: api
                          avatar: null
                          user_id: null
                        via: null
                        fields:
                          - text
                        accounts: []
                        removed_accounts: []
                        labels: []
                        removed_labels: []
                        status: null
                        scheduled_at: null
                        error: null
                        url: null
                      - id: 88190
                        kind: created
                        at: '2030-03-01T10:24:12Z'
                        since: null
                        count: 1
                        by:
                          kind: team
                          key: user:7
                          name: Halden Coffee editor
                          logo: null
                          avatar: null
                          user_id: 7
                        via: null
                        fields: []
                        accounts:
                          - id: 301
                            platform: instagram
                            name: Halden Coffee
                            username: haldencoffee
                          - id: 302
                            platform: linkedin
                            name: Halden Coffee
                            username: null
                        removed_accounts: []
                        labels: []
                        removed_labels: []
                        status: SCHEDULED
                        scheduled_at: '2030-03-15T09:00:00Z'
                        error: null
                        url: null
                    next: null
        '401':
          $ref: '#/components/responses/Unauthorized401'
        '403':
          description: The key lacks `posts:read`, or its user is inactive.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_permission:
                  summary: The key lacks posts:read
                  value:
                    message: >-
                      This API key does not have the "posts:read" permission.
                      Edit the key in PostSyncer under Settings → API to grant
                      it.
                inactive_account:
                  summary: The key's user is inactive
                  value:
                    message: Your account is inactive.
        '404':
          $ref: '#/components/responses/NotFound404'
        '422':
          description: '`before` is not a whole number of 1 or more.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
              examples:
                before:
                  summary: before is 0
                  value:
                    message: The before field must be at least 1.
                    errors:
                      before:
                        - The before field must be at least 1.
        '429':
          $ref: '#/components/responses/RateLimited429'
components:
  schemas:
    PostHistoryEntry:
      type: object
      properties:
        id:
          type: integer
          description: Unique; newest first.
        kind:
          type: string
          enum:
            - created
            - edited
            - scheduled
            - rescheduled
            - unscheduled
            - sent_for_approval
            - approved
            - published
            - retried
            - status
            - deleted
            - accounts
            - disconnected
            - posted
            - failed
            - deleted_on_platform
            - first_comment_sent
            - auto_plug_sent
            - labels
        at:
          type: string
          format: date-time
          description: When it happened, in UTC; for a run, its newest change.
        since:
          type: string
          format: date-time
          nullable: true
          description: A run's oldest change; null for a single change.
        count:
          type: integer
          description: How many changes the entry holds.
        by:
          type: object
          nullable: true
          description: Who did it; null when PostSyncer or a network did it on its own.
          properties:
            kind:
              type: string
              enum:
                - team
                - agent
                - api_key
                - ai
                - blog
                - import
                - platform
                - earlier_api
            key:
              type: string
            name:
              type: string
            logo:
              type: string
              nullable: true
            avatar:
              type: string
              nullable: true
            user_id:
              type: integer
              nullable: true
        via:
          type: string
          nullable: true
          enum:
            - chat
            - undo_link
            - reconnect
            - null
          description: >-
            How a person acted outside the post editor: a Chat card's button,
            the alert email's put-back link, or putting posts back after a
            reconnect.
        fields:
          type: array
          items:
            type: string
          description: >-
            For `edited`: what changed (text, media, content, title, notes,
            settings, campaign, repeat, auto_plug, comment_moderation,
            contact_collection, approval). `[]` otherwise.
        accounts:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              platform:
                type: string
                nullable: true
              name:
                type: string
                nullable: true
              username:
                type: string
                nullable: true
          description: The accounts it was about; for `accounts`, the ones added.
        removed_accounts:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              platform:
                type: string
                nullable: true
              name:
                type: string
                nullable: true
              username:
                type: string
                nullable: true
        labels:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                type: string
                nullable: true
                description: Null once the label is deleted.
              color:
                type: string
                nullable: true
          description: For `labels`, the ones added.
        removed_labels:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                type: string
                nullable: true
                description: Null once the label is deleted.
              color:
                type: string
                nullable: true
        status:
          type: string
          nullable: true
          description: The post's status after it, for `created` and `status`.
        scheduled_at:
          type: string
          format: date-time
          nullable: true
          description: The post's time after it, in UTC.
        error:
          type: string
          nullable: true
          description: >-
            For `failed`: the reason for the last try, the same words as
            `error_message` on the post's account row.
        url:
          type: string
          nullable: true
          description: 'For `posted`: the post on the network.'
      description: One change to the post, or a run of the same change by one person.
      required:
        - id
        - kind
        - at
        - since
        - count
        - by
        - via
        - fields
        - accounts
        - removed_accounts
        - labels
        - removed_labels
        - status
        - scheduled_at
        - error
        - url
    Error:
      type: object
      description: >-
        An error answer. Every one has `message`, in plain words; some add an
        `error` code and fields of their own.
      required:
        - message
      properties:
        message:
          type: string
          description: What went wrong and what to do about it.
        error:
          type: string
          description: >-
            A code a few errors add, such as `rate_limited`. See [Handle
            errors](/essentials/error-handling#answers-with-an-error-code).
    ValidationError:
      type: object
      description: '422: the request didn''t pass validation, and nothing changed.'
      required:
        - message
        - errors
      properties:
        message:
          type: string
          description: >-
            The first error and, when there are more, how many: `(and 1 more
            error)`, `(and 2 more errors)`.
        errors:
          type: object
          description: >-
            The messages, by field. A field inside a list is named with dots:
            `accounts.0.id`.
          additionalProperties:
            type: array
            items:
              type: string
  responses:
    Unauthorized401:
      description: No API key, or not a valid one.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            unauthenticated:
              summary: No valid API key
              value:
                message: Unauthenticated.
    NotFound404:
      description: Nothing with that id in the workspaces the key can reach.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            not_found:
              summary: Not found
              value:
                message: Not found.
    RateLimited429:
      description: >-
        More than 60 requests in a minute from this key's user (the API and the
        MCP server share the count). Wait `Retry-After` seconds.
      headers:
        Retry-After:
          description: Seconds until requests are allowed again.
          schema:
            type: integer
        X-RateLimit-Limit:
          description: Requests allowed a minute.
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Requests left this minute.
          schema:
            type: integer
        X-RateLimit-Reset:
          description: When requests are allowed again, as a Unix timestamp.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            too_many_attempts:
              summary: Too many requests
              value:
                message: Too Many Attempts.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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