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

# Reject a post

> Send a post that is waiting for approval back to its writer, with a reason.

> [!NOTE]
>
> Needs `posts:approve`, the same permission as [Approve a post](/docs/api-reference/posts/approve.md). See [Permissions](/docs/essentials/authentication.md#permissions).

This does what the Reject button in PostSyncer does. The post goes back to the person who wrote it as `REJECTED`, and nothing is published. Your `reason` goes in its notes and in [the post object](/docs/api-reference/posts/object.md)'s `approval.reason`, and the writer gets an email with it while they are still in the workspace (not when they rejected their own post). Leave `reason` out to reject without one.

The answer is the post, with `status: REJECTED` and `approval` naming who rejected it and why. The `approval.rejected` webhook tells the writer's tools, and the request closes in the app and in the workspace's team chats.

## Reject what you reviewed

Send the `review_version` of the post you reviewed (from [Get a post](/docs/api-reference/posts/get.md)), as for an approval. A stale `review_version` is refused with `409` and `error: post_changed_since_review`, and nothing changes: read the post again and look at what changed. Without `review_version`, the rejection takes whatever the post holds now. [Approvals](/docs/guides/approvals.md#two-counts) says what moves it.

## Who can reject

The same people who can approve it:

* The key's person must have a role that can approve posts in the workspace: an owner, an admin, a publisher or a client.
* An owner, an admin or a publisher can reject any waiting post. A client can reject only a post that was sent to them.
* Rejecting answers the request for everyone. Once rejected, the post isn't waiting any more, so rejecting it again answers `422`; if two people answer at the same moment, the second gets `409`.
* In a read-only team (7 days after the owner's plan stopped including one), only the workspace owner rejects: a member's request answers `403` with `error: team_read_only` and changes nothing. See [Team read-only](/docs/essentials/error-handling.md#team-read-only).

## After a rejection

The writer changes the post and sends it for approval again ([Update a post](/docs/api-reference/posts/update.md) with `schedule` or `publish_now`), which starts a new round: the people it is sent to are asked again. Someone who may publish can also schedule or publish it without approval; the people who were asked hear it (`approval.overridden`).

## Errors

| Status | `error` | When | Retry? |
| - | - | - | - |
| 401 | | No API key, or not a valid one. | No: fix the key. |
| 403 | | The key lacks `posts:approve`, or its user is inactive. | No: grant it in Settings → API. |
| 403 | | Your role can't approve posts, or the post wasn't sent to you. | No. |
| 403 | `team_read_only` | You're a member, not the owner, of a team that is read-only: the owner's plan stopped including one 7 days ago or more. Nothing changed. | After the owner upgrades. |
| 404 | | No post with that id in the workspaces the key can reach. | No. |
| 409 | | Someone else answered the approval request first. | No: read the post to see where it stands. |
| 409 | `post_changed_since_review` | What an approver reviews changed since the `review_version` you sent. `review_version` in the answer is the one it is at now. | Yes, after you read the post and review the new version. |
| 422 | | The post isn't waiting for approval, or `reason` is longer than 2000 characters. | No: fix the request. |
| 429 | | More than 60 requests a minute. | Yes, after `Retry-After` seconds. |

## Related

* [Approve a post](/docs/api-reference/posts/approve.md): the other answer.
* [Approvals](/docs/guides/approvals.md): who answers, the two counts, and the events.
* [Webhook events](/docs/webhooks/events.md#approval-rejected): `approval.rejected`, with the `reason`.


## OpenAPI

````yaml POST /posts/{post}/reject
openapi: 3.0.3
info:
  title: PostSyncer API
  description: >-
    Post to 14 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}/reject:
    post:
      tags:
        - Posts
      summary: Reject a post
      description: >-
        Needs `posts:approve`. It is the permission [Approve a
        post](/api-reference/posts/approve) needs too. Rejects a post waiting
        for approval (`PENDING_APPROVAL`), as the Reject button in PostSyncer
        does: it goes back to the person who wrote it as `REJECTED`, with your
        `reason` in its notes, and nothing is published. They are emailed while
        they are still in the workspace, unless they rejected their own post.
        The same people may reject a post as may approve it: your role in the
        workspace must let you approve posts, and unless it can publish, the
        post must have been sent to you. The writer changes it and sends it for
        approval again, which starts a new round; someone who may publish can
        also schedule it or publish it without approval ([Update a
        post](/api-reference/posts/update)).
      operationId: rejectPost
      parameters:
        - name: post
          in: path
          required: true
          description: The post's id.
          schema:
            type: integer
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  nullable: true
                  maxLength: 2000
                  description: >-
                    What to change, in your words. The writer reads it in the
                    post's notes, and in the email when they get one, and it is
                    the post's `approval.reason`. Leave it out to reject without
                    one.
                review_version:
                  type: integer
                  nullable: true
                  minimum: 0
                  description: >-
                    The `review_version` of the post you reviewed. A stale
                    `review_version` is refused (`409`,
                    `post_changed_since_review`) and nothing changes: what an
                    approver reviews changed since, so read the post again and
                    review the new version. A change of its labels or campaign
                    doesn't move it. Leave it out to reject whatever the post
                    holds now.
                step:
                  type: string
                  nullable: true
                  enum:
                    - team
                    - client
                  description: >-
                    With client approvals on: the step you answer, as for
                    [Approve a post](/api-reference/posts/approve): `team` (the
                    team check) or `client` (the client's sign-off, for a Client
                    member). Left out, a Client member answers the client step
                    and anyone else the team step. On the client step the post
                    goes back to the team as changes asked.
            examples:
              default:
                summary: Reject with a reason
                value:
                  reason: Use the spring logo.
                  review_version: 3
              no_reason:
                summary: Reject without a reason
                value: {}
      responses:
        '200':
          description: >-
            The post, rejected: its `status` is `REJECTED` and its `approval`
            names who rejected it and why.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Post'
              examples:
                default:
                  $ref: '#/components/examples/PostRejected'
        '401':
          $ref: '#/components/responses/Unauthorized401'
        '403':
          description: >-
            The key lacks `posts:approve`, its user is inactive, your role can't
            approve posts, the post wasn't sent to you for approval, or you're a
            member, not the owner, of a read-only team (`team_read_only`: the
            owner's plan stopped including one 7 days ago or more, and only the
            owner rejects).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                team_read_only:
                  summary: A member of a read-only team
                  value:
                    message: >-
                      Mira Okafor's plan doesn't include a team, so you can only
                      view posts and write team notes in Halden Coffee. Ask them
                      to upgrade.
                    error: team_read_only
                missing_permission:
                  summary: The key lacks posts:approve
                  value:
                    message: >-
                      This API key does not have the "posts:approve" permission.
                      Edit the key in PostSyncer under Settings → API to grant
                      it.
                role:
                  summary: The role can't approve posts
                  value:
                    message: >-
                      Your role in the workspace "Halden Coffee" does not allow
                      you to approve posts. Ask the workspace owner or an admin
                      to do it, or to change your role.
                not_sent_to_you:
                  summary: Not sent to you
                  value:
                    message: This post was not sent to you for approval.
                inactive_account:
                  summary: The key's user is inactive
                  value:
                    message: Your account is inactive.
        '404':
          $ref: '#/components/responses/NotFound404'
        '409':
          description: >-
            Someone else answered first (with client approvals on, the message
            names who), the step you named isn't the one waiting, or what an
            approver reviews changed since the `review_version` you sent. Read
            the post again. Nothing changed.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - type: object
                    properties:
                      error:
                        type: string
                        enum:
                          - post_changed_since_review
                        description: >-
                          Only when what an approver reviews changed after the
                          `review_version` you sent.
                      review_version:
                        type: integer
                        description: >-
                          With `post_changed_since_review`: the post's
                          `review_version` now.
              examples:
                post_changed_since_review:
                  summary: Changed since you reviewed it
                  value:
                    message: >-
                      This post changed since you opened it. Review the new
                      version before you reject it.
                    error: post_changed_since_review
                    review_version: 5
                already_answered:
                  summary: Someone else answered it
                  value:
                    message: >-
                      Someone else answered this approval request just now.
                      Reload the post to see where it stands.
                not_waiting:
                  summary: No longer waiting
                  value:
                    message: This post is not waiting for approval.
                already_answered_by:
                  summary: The step was answered first by someone else
                  value:
                    message: Already answered by Maya Lopez.
                client_not_reached:
                  summary: The client step comes after the team check
                  value:
                    message: >-
                      The team check comes first: this post reaches the client
                      once the team approves it.
        '422':
          description: >-
            `reason` is longer than 2000 characters, or the post isn't waiting
            for approval.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ValidationError'
                  - $ref: '#/components/schemas/Error'
              examples:
                not_pending:
                  summary: The post isn't waiting for approval
                  value:
                    message: >-
                      Only posts with status PENDING_APPROVAL can be rejected;
                      this post is SCHEDULED.
                reason_too_long:
                  summary: reason is too long
                  value:
                    message: The reason field must not be greater than 2000 characters.
                    errors:
                      reason:
                        - >-
                          The reason field must not be greater than 2000
                          characters.
        '429':
          $ref: '#/components/responses/RateLimited429'
components:
  schemas:
    Post:
      type: object
      description: >-
        A post: its text and media, when it goes out, and one row per account it
        goes to (`platforms`). Times are in the workspace's timezone, as `Y-m-d
        H:i`.
      required:
        - id
        - content
        - status
        - content_version
        - posted_on
        - scheduled_at
        - repeatable
        - repeatable_times
        - repeatable_gap
        - repeatable_gap_unit
        - repeatable_accounts
        - remaining_posts
        - comments_settings
        - contact_collection_settings
        - created_at
        - updated_at
        - workspace
        - labels
        - campaign
        - platforms
        - auto_plug
      properties:
        id:
          type: integer
          description: The post's id.
        content:
          type: array
          description: >-
            The post's parts, in order. One part is a single post; more parts
            make a thread on X, Threads, Bluesky and Mastodon, and replies in
            the message's thread on Slack and Discord (the other networks get
            the parts joined into one text, with two blank lines between them,
            the first comment left out). A part with `is_first_comment` is the
            first comment.
          items:
            $ref: '#/components/schemas/PostContent'
        status:
          type: string
          enum:
            - DRAFT
            - SCHEDULED
            - PENDING_APPROVAL
            - IN_QUEUE
            - IN_PROGRESS
            - PUBLISHED
            - PARTIALLY_FAILED
            - FAILED
            - REJECTED
          description: >-
            Where the post stands. `DRAFT`: saved, not going out. `SCHEDULED`:
            goes out at `scheduled_at`. `PENDING_APPROVAL`: waiting for someone
            to approve it. `IN_QUEUE`: published now and waiting its turn.
            `IN_PROGRESS`: being sent. `PUBLISHED`: out on every account.
            `PARTIALLY_FAILED`: out on some accounts, failed on others.
            `FAILED`: failed on every account. `REJECTED`: its approval was
            turned down.
        content_version:
          type: integer
          description: >-
            Goes up by one on every save through [Update a
            post](/api-reference/posts/update) (one that only changes its labels
            or campaign too), [its auto-plug](/api-reference/posts/auto-plug),
            [its contact collection](/api-reference/posts/contact-collection) or
            the app's composer, and when the post's content, time or accounts
            change. A few changes in the app leave it: its auto-repost,
            auto-plug, contact collection, comment moderation and labels set on
            their own, and unscheduling it. With client sign-off on, a change
            that sends a scheduled post to the client again moves it once more,
            so a copy read before is refused instead of putting the post back on
            the schedule. Send it back on Update a post: a stale
            `content_version` is refused (`409`) instead of overwriting a change
            made elsewhere since you read it.
        review_version:
          type: integer
          description: >-
            Goes up by one each time what an approver reviews changes: the text,
            first comment and thread parts, media and their order, the accounts
            and their settings, the time, the repeats, the auto-plug or contact
            collection. Its labels, campaign and comment moderation leave it.
            Send it back on [Approve a post](/api-reference/posts/approve) or
            [Reject a post](/api-reference/posts/reject): a stale
            `review_version` is refused (`409`) instead of answering about a
            version you didn't review.
        posted_on:
          type: array
          items:
            type: string
          description: >-
            When it went out, one entry a time (a repeating post has several).
            `[]` until it is published.
        scheduled_at:
          type: string
          nullable: true
          description: >-
            When it goes out (or went out), in the workspace's timezone. Null
            when the post has no time yet: a draft with none, or a post sent for
            approval with none, where the approver picks when it goes out. API
            v1 and MCP never save a `SCHEDULED` post without one.
        repeatable:
          type: boolean
          nullable: true
          description: True when the post repeats. `false` or `null` when it doesn't.
        repeatable_times:
          type: integer
          nullable: true
          description: How many times it repeats after the first time.
        repeatable_gap:
          type: integer
          nullable: true
          description: Time between repeats, in `repeatable_gap_unit`.
        repeatable_gap_unit:
          type: string
          nullable: true
          enum:
            - minutes
            - hours
            - days
            - weeks
            - months
            - null
          description: The unit of `repeatable_gap`.
        repeatable_accounts:
          type: array
          nullable: true
          items:
            type: integer
          description: >-
            The accounts the repeats go to; null or `[]` for every account of
            the post.
        remaining_posts:
          type: integer
          nullable: true
          description: Sends still to go, the first one included until it goes out.
        comments_settings:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PostCommentModeration'
          description: >-
            The post's comment moderation; null when it was never set. Change it
            with [Update comment
            moderation](/api-reference/posts/comment-moderation).
        contact_collection_settings:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PostContactCollection'
          description: >-
            The post's contact collection; null when it was never set. Change it
            with [Update contact
            collection](/api-reference/posts/contact-collection).
        created_at:
          type: string
          description: When the post was made, in the workspace's timezone.
        updated_at:
          type: string
          description: When the post last changed, in the workspace's timezone.
        workspace:
          allOf:
            - $ref: '#/components/schemas/Workspace'
          description: >-
            The post's workspace. It has no `accounts` or `brand_voice` here:
            [List workspaces](/api-reference/workspaces/list) has those.
        labels:
          type: array
          items:
            $ref: '#/components/schemas/PostLabel'
          description: The post's labels; `[]` when it has none.
        campaign:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Campaign'
          description: The post's campaign, or null.
        platforms:
          type: array
          items:
            $ref: '#/components/schemas/PlatformPost'
          description: >-
            One row per account the post goes to, in the order the accounts were
            added. A draft with no accounts has `[]`.
        auto_plug:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PostAutoPlug'
          description: >-
            The reply posted when the post reaches a number of likes, reposts,
            replies or views; null when it's off. Change it with [Update
            auto-plug](/api-reference/posts/auto-plug).
        comments:
          type: array
          items:
            $ref: '#/components/schemas/APIComment'
          description: >-
            Only with `include_comments=true`: the post's comments, with their
            contact.
        approval:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PostApproval'
          description: >-
            Where the post stands with its approval, who it was sent to and who
            answered. `null` for a post that never waited for approval, and for
            a waiting or rejected post moved back to a draft. With client
            approvals on for the post's workspace, also its approval steps, when
            the waiting one needs an answer, and who it waits on.
      example:
        id: 4182
        content:
          - text: >-
              Our spring menu starts today. The lavender oat latte is back, and
              so is the rhubarb bun.
            media:
              - id: 9051
                workspace_id: 12
                folder_id: null
                name: latte-art.jpg
                url: https://cdn.postsyncer.com/examples/latte-art.jpg
                thumb_url: https://cdn.postsyncer.com/examples/latte-art-thumb.jpg
                medium_url: https://cdn.postsyncer.com/examples/latte-art-medium.jpg
                mime_type: image/jpeg
                size: 482113
                is_processing: false
                type: image
                ai_generated_id: null
                is_reference: false
                progress: 100
                alt: Latte art in a blue cup
                duration_seconds: null
            cover_image: null
            is_first_comment: false
            first_comment_delay: null
          - text: Find us at 14 Mill Lane, open 7 to 4 every day.
            media: []
            cover_image: null
            is_first_comment: true
            first_comment_delay: 1
        status: PUBLISHED
        content_version: 1
        review_version: 1
        approval: null
        posted_on:
          - 2030-03-15 09:00
        scheduled_at: 2030-03-15 09:00
        repeatable: false
        repeatable_times: null
        repeatable_gap: null
        repeatable_gap_unit: null
        repeatable_accounts: null
        remaining_posts: null
        comments_settings: null
        contact_collection_settings: null
        created_at: 2030-03-01 10:24
        updated_at: 2030-03-15 09:01
        workspace:
          id: 12
          owner_id: 7
          name: Halden Coffee
          type: BRAND
          logo: https://cdn.postsyncer.com/examples/halden-coffee-logo.png
          timezone: Europe/London
          queue_slot:
            '09:00':
              time_24: '09:00'
              time_12: 9:00 am
              days:
                - true
                - true
                - true
                - true
                - true
                - false
                - false
          is_auto_repost_enabled_by_default: false
          auto_repost_settings:
            repeatable_gap: 6
            repeatable_gap_unit: hours
            repeatable_times: 2
          is_auto_plug_enabled_by_default: false
          auto_plug_settings: []
          comments_settings:
            remove_profanity: false
            remove_negativity: false
            remove_all_comments: false
            remove_custom_topics: false
            custom_topics_list: []
            remove_urls: false
            remove_emails: false
            remove_phones: false
            remove_mentions: false
            mentions_list: []
            remove_hashtags: false
            hashtags_list: []
            remove_keywords: false
            keywords_list: []
            ai_reply: false
          is_comment_moderation_enabled: false
          credits: 240
        labels: []
        campaign: null
        platforms:
          - platform: instagram
            account_id: 301
            posted_on:
              - 2030-03-15 09:00
            status: PUBLISHED
            settings:
              post_type: POST
              caption: null
              reel_trial_enabled: false
              graduation_strategy: MANUAL
              collaborators: []
            notes: []
            analytics:
              comments: 12
              likes: 248
              shares: 9
              impressions: 3120
              quotes: null
              saves: 31
              views: null
              reach: 2870
              clicks: null
              profile_visits: 44
              link_clicks: null
              watch_time: 0
              reactions: null
              avg_watch_time: null
              avg_view_percentage: null
              followers_gained: null
              followers_lost: null
              story: null
              engagement_rate: 9.62
              pending: false
              synced_at: '2030-03-16T09:00:00+00:00'
            post_url: https://www.instagram.com/p/DHk2mQ7sLtA/
          - platform: linkedin
            account_id: 302
            posted_on:
              - 2030-03-15 09:00
            status: PUBLISHED
            settings:
              visibility: PUBLIC
              link: null
              title: null
            notes: []
            analytics:
              comments: 7
              likes: 64
              shares: 5
              impressions: 1850
              quotes: null
              saves: 3
              views: 0
              reach: 1400
              clicks: 41
              profile_visits: 12
              link_clicks: 0
              watch_time: null
              reactions: null
              avg_watch_time: null
              avg_view_percentage: null
              followers_gained: null
              followers_lost: null
              story: null
              engagement_rate: 6.49
              pending: false
              synced_at: '2030-03-16T09:00:00+00:00'
            post_url: >-
              https://www.linkedin.com/feed/update/urn:li:share:7306000000000000001/
        auto_plug: null
    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
    PostContent:
      type: object
      description: One part of a post.
      required:
        - text
        - media
        - cover_image
        - is_first_comment
        - first_comment_delay
      properties:
        text:
          type: string
          nullable: true
          description: The text, as saved (LinkedIn tags included).
        media:
          type: array
          items:
            $ref: '#/components/schemas/APIMedia'
          description: The part's files, in order. `[]` when it has none.
        cover_image:
          type: object
          nullable: true
          description: The video cover, or null. Only the first part's is used.
          required:
            - thumbnail
            - video_cover_timestamp_ms
          properties:
            thumbnail:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/APIMedia'
              description: >-
                The cover picture (YouTube, Facebook, and Instagram Reels), or
                null.
            video_cover_timestamp_ms:
              type: integer
              nullable: true
              description: >-
                The video frame used as the cover, in milliseconds (TikTok,
                Instagram), or null.
        is_first_comment:
          type: boolean
          description: True for the part posted as the first comment.
        first_comment_delay:
          type: integer
          nullable: true
          description: >-
            Minutes after publishing that the first comment goes out; null on
            other parts.
    PostCommentModeration:
      type: object
      description: >-
        Comment moderation on the post: the rules that remove comments as they
        come in.
      required:
        - enabled
        - settings
      properties:
        enabled:
          type: boolean
        settings:
          type: object
          properties:
            remove_profanity:
              type: boolean
              description: Remove comments with swearing.
            remove_negativity:
              type: boolean
              description: Remove negative comments.
            remove_all_comments:
              type: boolean
              description: Remove every comment.
            remove_custom_topics:
              type: boolean
              description: Remove comments about the topics in `custom_topics_list`.
            custom_topics_list:
              type: array
              items:
                type: string
              description: The topics for `remove_custom_topics`. Needed when it's on.
            remove_urls:
              type: boolean
              description: Remove comments with links.
            remove_emails:
              type: boolean
              description: Remove comments with email addresses.
            remove_phones:
              type: boolean
              description: Remove comments with phone numbers.
            remove_mentions:
              type: boolean
              description: Remove comments that mention someone.
            mentions_list:
              type: array
              items:
                type: string
              description: The handles `remove_mentions` looks for; empty for any mention.
            remove_hashtags:
              type: boolean
              description: Remove comments with hashtags.
            hashtags_list:
              type: array
              items:
                type: string
              description: The hashtags `remove_hashtags` looks for; empty for any hashtag.
            remove_keywords:
              type: boolean
              description: Remove comments with the words in `keywords_list`.
            keywords_list:
              type: array
              items:
                type: string
              description: The words for `remove_keywords`. Needed when it's on.
            ai_reply:
              type: boolean
              description: Reply to comments with AI.
          required:
            - remove_profanity
            - remove_negativity
            - remove_all_comments
            - remove_custom_topics
            - custom_topics_list
            - remove_urls
            - remove_emails
            - remove_phones
            - remove_mentions
            - mentions_list
            - remove_hashtags
            - hashtags_list
            - remove_keywords
            - keywords_list
            - ai_reply
    PostContactCollection:
      type: object
      description: >-
        Contact collection on the post: people who comment are added to CRM
        lists.
      required:
        - enabled
        - settings
      properties:
        enabled:
          type: boolean
        settings:
          type: object
          required:
            - mode
            - list_id
            - keyword_rules
            - keyword_case_sensitive
          properties:
            mode:
              type: string
              nullable: true
              enum:
                - keyword_rules
                - add_all
                - null
              description: >-
                `add_all`: everyone who comments goes to `list_id`.
                `keyword_rules`: a comment with a rule's keyword goes to that
                rule's list.
            list_id:
              type: integer
              nullable: true
              description: The list for `add_all`.
            keyword_rules:
              type: array
              items:
                $ref: '#/components/schemas/PostContactKeywordRule'
            keyword_case_sensitive:
              type: boolean
              description: >-
                True: a keyword matches only with the same upper and lower case,
                so `Coffee` doesn't match `coffee`. False: case is ignored.
    Workspace:
      type: object
      description: A workspace the key can reach.
      required:
        - id
        - owner_id
        - name
        - type
        - logo
        - timezone
        - queue_slot
        - is_auto_repost_enabled_by_default
        - auto_repost_settings
        - is_auto_plug_enabled_by_default
        - auto_plug_settings
        - comments_settings
        - is_comment_moderation_enabled
        - credits
      properties:
        id:
          type: integer
          description: The workspace's id. Other routes take it as `workspace_id`.
        owner_id:
          type: integer
          description: >-
            The id of the user who owns the workspace. Their plan sets the
            workspace's limits.
        name:
          type: string
        type:
          type: string
          enum:
            - PERSONAL
            - TEAM
            - ORGANIZATION
            - CLIENT
            - PROJECT
            - DEPARTMENT
            - EVENT
            - TEMPORARY
            - COMMUNITY
            - BRAND
            - AGENCY
          description: What the workspace is for, as picked when it was made.
        logo:
          type: string
          description: The logo, or an avatar made from the name when there is none.
        timezone:
          type: string
          description: >-
            The workspace's time zone, an IANA name like `Europe/London`. Post
            times are in it.
        queue_slot:
          description: >-
            The posting queue's times, keyed by the 24-hour time. `days` has 7
            entries, Monday first: true when the time is used that day. A
            workspace with no queue times has `[]`, an empty list, not an
            object.
          oneOf:
            - type: object
              title: Queue times
              additionalProperties:
                type: object
                required:
                  - time_24
                  - time_12
                  - days
                properties:
                  time_24:
                    type: string
                    description: The time, like `08:30`.
                  time_12:
                    type: string
                    description: The same time on a 12-hour clock, like `8:30 am`.
                  days:
                    type: array
                    minItems: 7
                    maxItems: 7
                    items:
                      type: boolean
            - type: array
              title: No queue times
              maxItems: 0
              items: {}
        is_auto_repost_enabled_by_default:
          type: boolean
          description: >-
            Whether posts made in the PostSyncer app repeat by default, with
            `auto_repost_settings`. Posts made through the API or MCP don't take
            this default: send `repeatable` and its fields yourself.
        auto_repost_settings:
          type: object
          description: >-
            How auto-repost repeats a post. Without settings of its own a
            workspace has 6 hours and 2 times.
          properties:
            repeatable_gap:
              type: integer
              description: The wait between reposts, in `repeatable_gap_unit`.
            repeatable_gap_unit:
              type: string
              description: The unit of `repeatable_gap`, like `hours`.
            repeatable_times:
              type: integer
              description: How many times the post goes out again.
        is_auto_plug_enabled_by_default:
          type: boolean
          description: >-
            Whether posts made in the PostSyncer app get the default auto-plug
            from `auto_plug_settings`. Posts made through the API or MCP don't
            take this default: send `auto_plug` yourself.
        auto_plug_settings:
          type: array
          description: >-
            The workspace's auto-plugs: a reply posted when a post reaches a
            number of likes, reposts, replies or views. `[]` when there are
            none.
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              is_default:
                type: boolean
                description: >-
                  True for the auto-plug new posts get when
                  `is_auto_plug_enabled_by_default` is on.
              reply_text:
                type: string
                description: The reply posted.
              likes:
                $ref: '#/components/schemas/WorkspaceAutoPlugTrigger'
              reposts:
                $ref: '#/components/schemas/WorkspaceAutoPlugTrigger'
              replies:
                $ref: '#/components/schemas/WorkspaceAutoPlugTrigger'
              views:
                $ref: '#/components/schemas/WorkspaceAutoPlugTrigger'
        comments_settings:
          type: object
          description: >-
            The comment moderation rules: what to remove, and whether AI replies
            are on. Each `remove_…` is true when that kind of comment is
            removed; the `…_list` fields hold the topics, mentions, hashtags and
            keywords to look for.
          properties:
            remove_profanity:
              type: boolean
            remove_negativity:
              type: boolean
            remove_all_comments:
              type: boolean
            remove_custom_topics:
              type: boolean
            custom_topics_list:
              type: array
              items:
                type: string
            remove_urls:
              type: boolean
            remove_emails:
              type: boolean
            remove_phones:
              type: boolean
            remove_mentions:
              type: boolean
            mentions_list:
              type: array
              items:
                type: string
            remove_hashtags:
              type: boolean
            hashtags_list:
              type: array
              items:
                type: string
            remove_keywords:
              type: boolean
            keywords_list:
              type: array
              items:
                type: string
            ai_reply:
              type: boolean
              description: Whether AI replies to comments.
        is_comment_moderation_enabled:
          type: boolean
          description: Whether comment moderation is on.
        accounts:
          type: array
          description: >-
            Only in List workspaces: the workspace's connected accounts, as
            [List accounts](/api-reference/accounts/list) gives them but without
            `boards`.
          items:
            $ref: '#/components/schemas/Account'
        brand_voice:
          type: string
          nullable: true
          description: >-
            Only in List workspaces: how the workspace sounds, in one line of up
            to 200 characters, from its brand. Null when the brand has no voice
            yet. [Get brand](/api-reference/brand/get) has the whole brand.
        credits:
          type: integer
          description: >-
            The AI credits the workspace owner has left. Every member's key sees
            the owner's credits: AI work in the workspace spends them.
    PostLabel:
      type: object
      description: >-
        A label as a post carries it: no `workspace`. [Get a
        label](/api-reference/labels/get) has the whole label.
      required:
        - id
        - name
        - color
      properties:
        id:
          type: integer
        name:
          type: string
        color:
          type: string
          description: A hex color, like `#0EA5E9`.
    Campaign:
      type: object
      description: A campaign that groups posts.
      required:
        - id
        - name
        - status
        - start_date
        - end_date
        - description
        - workspace
      properties:
        id:
          type: integer
          description: The campaign's id. Send it as a post's `campaign_id`.
        name:
          type: string
          maxLength: 255
        status:
          type: string
          enum:
            - DRAFT
            - SCHEDULED
            - ACTIVE
            - COMPLETED
            - CANCELLED
          description: >-
            `SCHEDULED` until `start_date`, `ACTIVE` until `end_date`, then
            `COMPLETED`: these follow the dates when the campaign is read.
            `DRAFT` and `CANCELLED` are holds set on the campaign, which stay
            until it is changed. The status only describes the campaign: it
            doesn't hold back or send its posts.
        start_date:
          type: string
          description: When it starts, in the workspace's timezone, as `Y-m-d H:i`.
        end_date:
          type: string
          description: When it ends, in the workspace's timezone, as `Y-m-d H:i`.
        description:
          type: string
          nullable: true
          maxLength: 255
        workspace:
          allOf:
            - $ref: '#/components/schemas/Workspace'
          description: >-
            The campaign's workspace, as [List
            workspaces](/api-reference/workspaces/list) gives it, with no
            `accounts` or `brand_voice`.
    PlatformPost:
      type: object
      description: >-
        The post on one account. `progress`, `error_message`, `analytics` and
        `post_url` appear only in the statuses named.
      required:
        - platform
        - posted_on
        - status
        - settings
        - notes
      properties:
        platform:
          type: string
          enum:
            - twitter
            - instagram
            - facebook
            - linkedin
            - youtube
            - tiktok
            - pinterest
            - threads
            - telegram
            - bluesky
            - mastodon
            - google_business
            - slack
            - discord
            - snapchat
          description: The network.
        account_id:
          type: integer
          nullable: true
          description: >-
            The account this row posts to. Null only for an old row whose
            account was removed.
        posted_on:
          type: array
          items:
            type: string
          description: When it went out on this account, in the workspace's timezone.
        status:
          type: string
          enum:
            - PENDING
            - IN_PROGRESS
            - PUBLISHED
            - FAILED
          description: >-
            `PENDING`: not sent yet. `IN_PROGRESS`: being sent now. `PUBLISHED`:
            live on the network. `FAILED`: the last try failed (`error_message`
            says why).
        settings:
          type: object
          nullable: true
          additionalProperties: true
          description: >-
            This account's options, as sent in `accounts[].settings`, with the
            platform's defaults filled in. When the account posts its own media,
            `settings.media` lists those files as media objects. You can send
            them back unchanged.
        notes:
          type: array
          items:
            $ref: '#/components/schemas/PublishNote'
          description: What went partly wrong in a published result. `[]` when nothing did.
        progress:
          type: object
          nullable: true
          description: >-
            Only while `IN_PROGRESS`: what the account is doing, or null while
            it is simply posting. Read the post again to follow it.
          required:
            - stage
            - message
          properties:
            stage:
              type: string
              enum:
                - preparing_video
            message:
              type: string
              description: Like "Preparing video for TikTok".
        error_message:
          type: string
          nullable: true
          description: 'Only when `FAILED`: the network''s reason for the last try, in words.'
        analytics:
          $ref: '#/components/schemas/PlatformPostAnalytics'
        post_url:
          type: string
          description: >-
            Only when `PUBLISHED`: the post on the network, when the network
            gives a link.
    PostAutoPlug:
      type: object
      description: >-
        A reply posted on the post once it reaches any one of the thresholds
        that are on.
      required:
        - id
        - name
        - is_default
        - reply_text
        - likes
        - reposts
        - replies
        - views
      properties:
        id:
          type: string
        name:
          type: string
        is_default:
          type: boolean
        reply_text:
          type: string
        likes:
          $ref: '#/components/schemas/PostAutoPlugThreshold'
        reposts:
          $ref: '#/components/schemas/PostAutoPlugThreshold'
        replies:
          $ref: '#/components/schemas/PostAutoPlugThreshold'
        views:
          $ref: '#/components/schemas/PostAutoPlugThreshold'
    APIComment:
      type: object
      description: >-
        A comment on a post: from a network (`source: SOCIAL`), or written in
        PostSyncer (team, approval and share-link comments). `mentions`,
        `media`, `replies` and `user` are left out of a reply's
        `parent_comment`.
      required:
        - id
        - user_id
        - crm_contact_id
        - post_id
        - platform_post_id
        - parent_comment_id
        - source
        - comment_url
        - platform
        - platform_post_comment_id
        - author_name
        - author_avatar_url
        - content
        - moderation_message
        - moderation_reason
        - is_resolved
        - is_approved
        - is_deleted_on_platform
        - is_hidden_on_platform
        - media_hidden_by_platform
        - needs_reply
        - quote
        - anchor
        - account_id
        - account
        - likes_count
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        user_id:
          type: integer
          nullable: true
          description: >-
            The PostSyncer member behind it: who wrote a team comment or a reply
            sent from PostSyncer (an auto-reply has the post's author, or the
            workspace owner). On a comment read from a network, the member who
            connected the account when the connected account itself wrote it.
            Null on other people's comments from a network and on a client's
            share-link comment, and once the member's account is deleted: their
            team comments, replies and approval notes stay, by `Former member`.
        crm_contact_id:
          type: integer
          nullable: true
          description: >-
            The CRM contact saved for the commenter of a comment read from a
            network, whatever contact collection is set to. Null on team,
            approval and share-link comments, on replies sent from PostSyncer,
            and when the network withheld the author.
        post_id:
          type: integer
        platform_post_id:
          type: integer
          nullable: true
          description: >-
            The post's copy on one account (a `platforms[].id` of the post) that
            the comment is on. Null on team, approval and share-link comments.
        parent_comment_id:
          type: integer
          nullable: true
          description: The comment this one answers; null on a top-level comment.
        source:
          type: string
          enum:
            - SOCIAL
            - INTERNAL
            - APPROVAL
            - PUBLIC_SHARE
          description: >-
            `SOCIAL`: from a network, or a reply to one sent from PostSyncer.
            `INTERNAL`: a team comment, which stays in PostSyncer. `APPROVAL`: a
            note left when approving or asking for changes. `PUBLIC_SHARE`: a
            client's comment on the post's share link.
        comment_url:
          type: string
          nullable: true
          description: >-
            A link to the comment, or to the post it is on, on the network. Null
            when the network gives none.
        platform:
          type: string
          nullable: true
          description: >-
            The network, like `instagram`. Null on team, approval and share-link
            comments.
        platform_post_comment_id:
          type: string
          nullable: true
          description: >-
            The comment's id on the network. Null on a reply that hasn't gone
            out yet, and on comments that stay in PostSyncer.
        author_name:
          type: string
          nullable: true
          description: >-
            The member's name when a member wrote it; `Former member` on a team
            comment, reply or approval note whose writer's account was deleted
            since; else the name a client gave on the share link, or the name or
            handle the network gives.
        author_avatar_url:
          type: string
          nullable: true
          description: >-
            The writer's picture, as `author_name` names them. Null for a former
            member.
        content:
          type: string
          nullable: true
          description: >-
            The text. Null on a comment with only media. An Instagram comment
            with a picture Instagram doesn't share has `""`: see
            `media_hidden_by_platform`.
        moderation_message:
          type: string
          nullable: true
          description: What moderation did, in words.
        moderation_reason:
          type: string
          nullable: true
          description: >-
            Why moderation acted on the comment. On a comment moderation removed
            (is_deleted_on_platform true), the rule it broke:
            remove_all_comments, urls_detected, emails_detected,
            phone_numbers_detected, mentions_detected, hashtags_detected,
            keywords_detected, profanity_detected, negativity_detected or
            custom_topics_detected. On a reply the auto-reply sent:
            ai_reply_generated. Null when moderation did nothing, as on a
            comment its author deleted.
        is_resolved:
          type: boolean
          nullable: true
          description: >-
            The thread is marked resolved. Null only in the answer to [Create a
            comment](/api-reference/comments/create) when the request left it
            out; it is stored as `false`.
        is_approved:
          type: boolean
          nullable: true
          description: >-
            A flag of your own, set when the comment was created. Null when it
            wasn't set.
        is_deleted_on_platform:
          type: boolean
          nullable: true
          description: >-
            Removed on the network: deleted from PostSyncer (on YouTube, someone
            else's comment is rejected, which can't be undone), by moderation,
            or by its author. On Bluesky, a delete or moderation also marks
            someone else's reply `true`, though it stays up there. Null only in
            the answer to Create a comment.
        is_hidden_on_platform:
          type: boolean
          nullable: true
          description: >-
            Hidden on the network: by Hide, by moderation, or by a delete on X
            or Threads, which hide instead of deleting someone else's comment.
            Null only in the answer to Create a comment.
        media_hidden_by_platform:
          type: boolean
          description: >-
            Instagram: the comment holds a GIF, sticker or photo Instagram
            doesn't share. Instagram sends such a comment with no text, so its
            content is "" (an empty string) and its media is []. False on every
            other comment.
        needs_reply:
          type: boolean
          description: >-
            A top-level social comment that asks something (?, ؟ or ？), is not
            hidden or deleted, and has no reply from the workspace yet. A reply
            counts as the workspace's when it was sent from PostSyncer or
            written by the connected account in the network's own app.
        quote:
          type: string
          nullable: true
          description: 'Team comments: the words of the post this comment is about.'
        anchor:
          type: object
          nullable: true
          description: 'Team comments: where the quoted words are.'
          required:
            - thread
            - network
          properties:
            thread:
              type: integer
              description: 'The content item: 0 is the post.'
            network:
              type: string
              nullable: true
              description: >-
                The network whose own text holds the words; null for the post's
                text.
        visibility:
          type: string
          nullable: true
          enum:
            - team
            - client
          description: >-
            Client approvals: who reads it. `team` is Team only; `client` means
            the client sees it too, on the review and share pages. Null for a
            comment from a network, and, while client approvals are off for the
            workspace, for a comment written before them.
        pin:
          type: object
          nullable: true
          description: >-
            What the comment points at: one photo or video of the post (`type:
            photo`, `media_id`), or words of it (`type: words`, `quote`,
            `anchor`). Null when it points at nothing.
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - photo
                - words
            media_id:
              type: integer
              description: '`photo`: a media id the post uses.'
            quote:
              type: string
              description: '`words`: the words, as `quote`.'
            anchor:
              type: object
              nullable: true
              description: '`words`: where they are, as `anchor`.'
              properties:
                thread:
                  type: integer
                network:
                  type: string
                  nullable: true
        suggestion:
          type: object
          nullable: true
          description: >-
            A suggested edit of the post's words: `from` (the words now), `to`
            (what they become; empty removes them) and `state` (`open`,
            `accepted` or `dismissed`). Null when the comment suggests nothing.
          required:
            - from
            - to
            - state
          properties:
            from:
              type: string
            to:
              type: string
            state:
              type: string
              enum:
                - open
                - accepted
                - dismissed
        resolved_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            When the thread was resolved; null while it is open, and for a
            thread resolved before client approvals.
        resolved_by:
          type: integer
          nullable: true
          description: The user id of who resolved it; null while it is open.
        mentions:
          type: array
          description: >-
            Team comments: the people it tags. Picture and name only, never an
            email.
          items:
            type: object
            required:
              - id
              - name
              - avatar
            properties:
              id:
                type: integer
              name:
                type: string
              avatar:
                type: string
                nullable: true
                description: A link to their picture; null when they have none.
        account_id:
          type: integer
          nullable: true
          description: >-
            A social comment: which of the post's connected accounts it is on,
            the one a reply to it is sent as. Null on team, client and approval
            comments.
        account:
          type: object
          nullable: true
          description: The account `account_id` names. Null with it.
          required:
            - id
            - name
            - username
            - avatar
          properties:
            id:
              type: integer
            name:
              type: string
              nullable: true
            username:
              type: string
              nullable: true
            avatar:
              type: string
              nullable: true
        likes_count:
          type: integer
          nullable: true
          description: >-
            The likes the network counted when PostSyncer last read the comment.
            Null when not known: team and client comments, replies sent from
            PostSyncer, Instagram and Threads.
        created_at:
          type: string
          format: date-time
          description: UTC, ISO 8601.
        updated_at:
          type: string
          format: date-time
          description: UTC, ISO 8601.
        parent_comment:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/APIComment'
          description: >-
            Get, create and update only: the comment this one answers, without
            its `mentions`, `media`, `replies` or `user`. Null on a top-level
            comment.
        replies:
          type: array
          description: >-
            The answers to it, nested up to five levels. On a list with
            `include_replies=false` it is left out.
          items:
            $ref: '#/components/schemas/APIComment'
        media:
          type: array
          description: >-
            A social comment: the photos, GIFs, videos and audio clips in it, in
            the order the comment shows them. A team comment: its attachments.
            Instagram doesn't share the pictures in comments, so an Instagram
            comment has none. On Threads, a GIF in a reply with text isn't kept.
          items:
            $ref: '#/components/schemas/APICommentMedia'
        user:
          type: object
          description: The member who wrote it. Left out when `user_id` is null.
          required:
            - id
            - name
            - avatar
          properties:
            id:
              type: integer
            name:
              type: string
            avatar:
              type: string
              nullable: true
              description: A link to their picture; null when they have none.
    PostApproval:
      type: object
      description: >-
        A post's approval. Read it before answering: [Approve a
        post](/api-reference/posts/approve) and [Reject a
        post](/api-reference/posts/reject) take a `pending` one. With client
        approvals on for the workspace it also has the latest round's `steps`,
        when the waiting step needs its answer (`needs_answer_by`) and who it
        waits on (`waiting_on`).
      required:
        - status
        - approvers
        - answered_by
        - answered_at
        - reason
      properties:
        status:
          type: string
          enum:
            - pending
            - approved
            - rejected
            - overridden
          description: >-
            `pending`: waiting for an answer (`PENDING_APPROVAL`). `approved`:
            approved, then published, scheduled or kept as a draft as the
            approval chose. `rejected`: sent back to its writer (`REJECTED`).
            `overridden`: someone who may publish scheduled it or published it
            without approving it.
        approvers:
          type: array
          items:
            $ref: '#/components/schemas/PostApprover'
          description: >-
            The people it was sent to who are still in the workspace, in the
            order they were picked. Anyone whose role may publish can answer it
            too. Empty for a Client member's key while client approvals are on:
            who the team check asked isn't theirs to read.
        answered_by:
          type: object
          nullable: true
          required:
            - id
            - name
          properties:
            id:
              type: integer
              nullable: true
              description: '`null` when their account was deleted since.'
            name:
              type: string
              description: '`Former member` when their account was deleted since.'
          description: >-
            Who approved it, rejected it or sent it on without approval. `null`
            while it waits.
        answered_at:
          type: string
          nullable: true
          description: >-
            When they did, in the workspace's timezone (`Y-m-d H:i`). `null`
            while it waits.
        reason:
          type: string
          nullable: true
          description: >-
            With `rejected`: what the approver wrote, or `null` when they gave
            no reason.
        steps:
          type: array
          items:
            $ref: '#/components/schemas/PostApprovalStep'
          description: >-
            Only with client approvals on for the workspace. The latest round,
            team check first. Empty for a post that never waited for approval.
        needs_answer_by:
          type: string
          nullable: true
          description: >-
            Only with client approvals on for the workspace. When the waiting
            step needs its answer: 2 hours before the post's time, in the
            workspace's timezone (`Y-m-d H:i`). `null` for a post with no time,
            which goes out as soon as it's approved.
        waiting_on:
          type: array
          items:
            $ref: '#/components/schemas/PostApprovalPerson'
          description: >-
            Only with client approvals on for the workspace. Who the waiting
            step waits on. Empty when nothing waits, and for a Client member's
            key while the team step waits.
      example:
        status: rejected
        approvers:
          - id: 7
            name: Maya Ortiz
            answer: rejected
        answered_by:
          id: 7
          name: Maya Ortiz
        answered_at: 2030-03-14 16:20
        reason: Use the spring logo.
    APIMedia:
      type: object
      description: >-
        A file in the media library: what list, get and the uploads give, and
        what posts and comments hold.
      required:
        - id
        - workspace_id
        - folder_id
        - name
        - url
        - mime_type
        - size
        - is_processing
        - type
        - ai_generated_id
        - is_reference
        - progress
        - alt
        - duration_seconds
      properties:
        id:
          type: integer
          description: The file's id. Posts take it in `content[].media`.
        workspace_id:
          type: integer
        folder_id:
          type: integer
          nullable: true
          description: The folder it is in; null at the top of the library.
        name:
          type: string
          description: The file name.
        url:
          type: string
          format: uri
          description: The file itself, at a public link.
        thumb_url:
          type: string
          format: uri
          description: >-
            A picture's small copy (about 400 px on its long edge) for cards and
            lists, or a video's still. Left out until one is made: use `url`
            then. See [Picture
            copies](/api-reference/media/overview#picture-copies).
        medium_url:
          type: string
          format: uri
          description: >-
            A picture's medium copy (about 800 px on its long edge) for large
            tiles and previews. Left out until one is made, and for a picture no
            bigger than 800 px on its long edge, which needs none: use `url`
            then. Videos, GIFs and documents have none.
        mime_type:
          type: string
          nullable: true
          description: The file's type, like `image/jpeg`.
        size:
          type: integer
          nullable: true
          description: The size in bytes.
        is_processing:
          type: boolean
          description: >-
            True while the file is still being made (an AI video, for example).
            It can't go on a post or be deleted until it is ready.
        type:
          type: string
          nullable: true
          enum:
            - image
            - video
            - audio
            - document
            - null
          description: >-
            The kind of file, from `mime_type`: `document` is a PDF, Word or
            PowerPoint file. Null for any other type.
        ai_generated_id:
          type: integer
          nullable: true
          description: Set when PostSyncer's AI made the file; null for uploads.
        is_reference:
          type: boolean
          description: True for a reference picture kept for AI video, not for posting.
        progress:
          type: integer
          description: Always 100.
        alt:
          type: string
          nullable: true
          description: The alt text, when set.
        duration_seconds:
          type: number
          nullable: true
          description: >-
            A video's or sound's length in seconds, read when it was uploaded.
            Null for pictures and documents, and for files stored before lengths
            were read.
    PostContactKeywordRule:
      type: object
      required:
        - keyword
        - list_id
      properties:
        keyword:
          type: string
          description: The word to look for in a comment.
        list_id:
          type: integer
          description: The CRM list a matching commenter goes to.
    WorkspaceAutoPlugTrigger:
      type: object
      description: 'One trigger of an auto-plug: on, and the count that fires it.'
      properties:
        enabled:
          type: boolean
        count:
          type: integer
          minimum: 0
    Account:
      type: object
      description: A connected social account.
      required:
        - id
        - workspace_id
        - platform
        - username
        - name
        - avatar
        - has_expired
        - needs_reconnect
        - reconnect_reason
        - platform_hold
        - renewal_failing
        - sign_in_ends_at
        - profile_url
        - is_default
        - post_defaults
        - support_threads
        - is_verified
        - plan_allows_posting
        - analytics_unavailable
      properties:
        id:
          type: integer
          description: The account's id. Posts take it in `accounts[].id`.
        workspace_id:
          type: integer
        platform:
          type: string
          enum:
            - twitter
            - linkedin
            - instagram
            - facebook
            - tiktok
            - youtube
            - threads
            - pinterest
            - bluesky
            - telegram
            - mastodon
            - google_business
            - slack
            - discord
            - snapchat
          description: >-
            The network. `twitter` is X; `google_business` is Google Business
            Profile.
        username:
          type: string
          nullable: true
          description: >-
            The handle on the network, without `@` (a Mastodon handle includes
            its server).
        name:
          type: string
          nullable: true
          description: The display name on the network.
        avatar:
          type: string
          description: >-
            The profile picture, or an avatar made from the name when there is
            none.
        has_expired:
          type: boolean
          description: The same as `needs_reconnect`, kept for older integrations.
        needs_reconnect:
          type: boolean
          description: >-
            True when the sign-in no longer works, so the account can't post
            until someone reconnects it in PostSyncer. A new post leaves it out
            and lists it in `skipped_accounts`.
        reconnect_reason:
          type: string
          nullable: true
          description: >-
            The network's reason the account needs reconnecting, when it gave
            one. Null when `needs_reconnect` is false.
        platform_hold:
          type: object
          nullable: true
          description: >-
            Set when the network holds the account until its owner acts there
            (an identity check, a lock, a suspension, a restriction, the bot
            removed from a channel). The sign-in still works, so no reconnect is
            needed: posts to it fail with the network's reason until the hold is
            resolved there, and trying a failed post again asks the network
            again. Null when not held.
          required:
            - reason
            - scope
            - since
            - next_check_at
          properties:
            reason:
              type: string
              nullable: true
              description: The network's own words.
            scope:
              type: string
              nullable: true
              enum:
                - publish
                - all
                - null
              description: >-
                `publish`: only posting is held. `all`: everything the account
                does is.
            since:
              type: string
              format: date-time
              nullable: true
              description: When the network first refused.
            next_check_at:
              type: string
              format: date-time
              nullable: true
              description: >-
                When PostSyncer asks the network again (every 3 hours). Null
                while a retry is letting posts through.
        renewal_failing:
          type: object
          nullable: true
          description: >-
            Set when the network refused to renew a sign-in that still works.
            The account keeps posting until `works_until`; if the renewal is
            still refused then, it needs a reconnect. Null when renewals are
            fine.
          required:
            - reason
            - since
            - works_until
          properties:
            reason:
              type: string
              nullable: true
              description: The network's reason for refusing.
            since:
              type: string
              format: date-time
              nullable: true
              description: When the renewal was first refused.
            works_until:
              type: string
              format: date-time
              nullable: true
              description: >-
                When the sign-in stops working. Reconnect the account before
                then.
        sign_in_ends_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            When the network ends this sign-in whatever PostSyncer does
            (LinkedIn: a year after it was connected). Reconnect the account
            before then. Null when the network doesn't say.
        profile_url:
          type: string
          nullable: true
          description: >-
            The account's own page on its network. Null when PostSyncer can't
            make one, for example a Mastodon account without its server, or a
            Telegram channel with no public name.
        is_default:
          type: boolean
          description: Whether the account is picked by default for new posts.
        post_defaults:
          allOf:
            - $ref: '#/components/schemas/PostDefaultsSettings'
          description: >-
            The settings a new post on this account starts from, as [Get an
            account's post
            defaults](/api-reference/accounts/get-account-defaults) gives them;
            `{}` when none are set. What a post sends in `accounts[].settings`
            wins over them, key by key.
        support_threads:
          type: boolean
          nullable: true
          description: >-
            Whether a post can be a thread of several parts on this network (X,
            Threads, Bluesky and Mastodon; on Slack and Discord, replies in the
            message's thread).
        is_verified:
          type: boolean
          nullable: true
          description: >-
            Whether the network marks the account verified (X only; false
            elsewhere).
        plan_allows_posting:
          type: boolean
          description: >-
            False when the owner's plan doesn't let new posts go to this account
            (Free outside a first week: 2 picked accounts). Drafts, replies and
            analytics still work.
        can_publish_articles:
          type: boolean
          description: >-
            X accounts only: true when X lets the account publish Articles (X
            Premium or Premium+). Absent for other networks.
        analytics_unavailable:
          type: object
          nullable: true
          description: >-
            Why this account's post numbers can't be read, or null when they
            can. Its posts' numbers are not read meanwhile.
          required:
            - reason
            - message
          properties:
            reason:
              type: string
              enum:
                - x_private
                - linkedin_reconnect
                - pinterest_not_business
                - google_business_no_post_stats
                - telegram_private
              description: >-
                `x_private`: a private X account. `linkedin_reconnect`: a
                LinkedIn profile on the older connection; reconnect it.
                `pinterest_not_business`: not a Pinterest business account.
                `google_business_no_post_stats`: Google gives numbers for a
                location, never for one post. `telegram_private`: a private
                Telegram channel shows no views (subscribers are still counted).
            message:
              type: string
              description: The same, in words to show a person.
        is_page:
          type: boolean
          description: >-
            LinkedIn accounts only: true for a Company Page, false for a person.
            Absent for other networks.
        creator_info:
          type: object
          nullable: true
          description: >-
            TikTok accounts only: what TikTok lets this creator choose on a
            post, as TikTok's creator_info gives it. Send a `privacy_level` from
            `privacy_level_options`, and leave on (false) any of
            `disable_comment`, `disable_duet` and `disable_stitch` whose
            `*_disabled` here is true. Null until TikTok has been asked. Absent
            for other networks.
          properties:
            privacy_level_options:
              type: array
              items:
                type: string
                enum:
                  - PUBLIC_TO_EVERYONE
                  - MUTUAL_FOLLOW_FRIENDS
                  - FOLLOWER_OF_CREATOR
                  - SELF_ONLY
              description: Who can watch, as TikTok offers it to this account.
            comment_disabled:
              type: boolean
              description: >-
                The creator's TikTok app turns comments off: a post can't allow
                them.
            duet_disabled:
              type: boolean
              description: 'The creator''s TikTok app turns Duet off: a post can''t allow it.'
            stitch_disabled:
              type: boolean
              description: >-
                The creator's TikTok app turns Stitch off: a post can't allow
                it.
            max_video_post_duration_sec:
              type: integer
              nullable: true
              description: The longest video this creator may post, in seconds.
        location:
          type: object
          description: >-
            Google Business Profile accounts only: the location this account is.
            Absent for other networks.
          required:
            - address
            - verified
            - can_post
            - maps_uri
            - new_review_uri
          properties:
            address:
              type: string
              nullable: true
            verified:
              type: boolean
              description: Whether Google verified the location.
            can_post:
              type: boolean
              description: Whether Google lets the location publish posts.
            maps_uri:
              type: string
              nullable: true
              description: The location on Google Maps.
            new_review_uri:
              type: string
              nullable: true
              description: The link that opens Google's form for a new review.
        boards:
          type: array
          description: >-
            List accounts and Get account only. A Pinterest account's boards,
            read from Pinterest; `[]` for other networks, and when Pinterest
            can't be read. Pass a board's `id` as `accounts[].settings.board_id`
            on a post.
          items:
            type: object
            required:
              - id
              - name
              - image_cover_url
            properties:
              id:
                type: string
                nullable: true
              name:
                type: string
              image_cover_url:
                type: string
                nullable: true
        playlists:
          type: array
          nullable: true
          description: >-
            Get account only. A YouTube channel's own playlists, read from
            YouTube, up to 500. `[]` for other networks and when
            `playlists_reconnect` is `true`. `null` when YouTube didn't answer:
            the channel may still have playlists, so try again later. Pass a
            playlist's `id` as `accounts[].settings.playlist_id` on a post to
            add the video to it.
          items:
            type: object
            required:
              - id
              - title
              - privacy_status
              - video_count
            properties:
              id:
                type: string
              title:
                type: string
              privacy_status:
                type: string
                nullable: true
                enum:
                  - public
                  - unlisted
                  - private
                  - null
                description: Who can see the playlist.
              video_count:
                type: integer
                nullable: true
                description: How many videos it holds.
        playlists_reconnect:
          type: boolean
          description: >-
            Get account only. `true` for a YouTube channel that must be
            reconnected to list its playlists and add videos to them: it was
            connected before PostSyncer asked YouTube for that permission, or
            its sign-in no longer works. `false` for every other account.
        scheduled_posts:
          type: object
          description: >-
            Get account only. Scheduled posts still to go out to this account.
            Deleting the account moves the ones that go only to it to drafts
            (they keep their time); the others still go to their other accounts.
          required:
            - total
            - only_this_account
          properties:
            total:
              type: integer
            only_this_account:
              type: integer
              description: The ones with no other account.
        posts_to_put_back:
          type: object
          nullable: true
          description: >-
            Get account only. Set when this profile was disconnected and
            connected again to the same workspace, and posts it was on can get
            it back with [Put back account
            posts](/api-reference/accounts/put-back-posts). Null otherwise.
          required:
            - posts
            - counts
            - relinked
            - disconnected_at
          properties:
            posts:
              type: integer
              description: Posts that would get the account back.
            counts:
              $ref: '#/components/schemas/PutBackCounts'
            relinked:
              type: integer
              description: >-
                Published posts already linked to the account again, with their
                link, numbers and comments. That happens on its own at the
                reconnect and sends nothing.
            disconnected_at:
              type: string
              format: date-time
              nullable: true
              description: When the profile was disconnected.
    PublishNote:
      type: object
      required:
        - type
        - message
      properties:
        type:
          type: string
          enum:
            - thread_unposted
            - unconfirmed
            - thumbnail_error
            - text_shortened
            - mentions_untagged
            - repeat_failed
            - setting_not_applied
          description: >-
            `thread_unposted`: some parts of the thread didn't go out.
            `unconfirmed`: the network never said the video was ready.
            `thumbnail_error`: the custom cover wasn't applied.
            `text_shortened`: X text was cut to fit the account, or a YouTube
            description to 5,000 bytes. `mentions_untagged`: LinkedIn people who
            couldn't be tagged went out as plain names. `repeat_failed`: a
            repeat didn't go out; the earlier post is still live.
            `setting_not_applied`: a network setting that is applied after the
            post is made didn't take, such as a YouTube playlist, a Telegram pin
            or a Bluesky reply rule; `setting` names it. The post itself is
            live.
        message:
          type: string
          description: What happened, in words.
        items:
          type: array
          nullable: true
          items:
            type: integer
          description: 'For `thread_unposted` and `text_shortened`: the parts it is about.'
        setting:
          type: string
          description: >-
            For `setting_not_applied`: the `accounts[].settings` key that didn't
            take, such as `playlist_id`.
    PlatformPostAnalytics:
      type: object
      description: >-
        Only when `PUBLISHED`: the post's numbers on this network. A number the
        network doesn't report is null, never 0.
      required:
        - comments
        - likes
        - shares
        - impressions
        - quotes
        - saves
        - views
        - reach
        - clicks
        - profile_visits
        - link_clicks
        - watch_time
        - reactions
        - avg_watch_time
        - avg_view_percentage
        - followers_gained
        - followers_lost
        - story
        - engagement_rate
        - pending
        - synced_at
      properties:
        comments:
          type: integer
          nullable: true
        likes:
          type: integer
          nullable: true
        shares:
          type: integer
          nullable: true
          description: Shares and reposts together.
        impressions:
          type: integer
          nullable: true
        quotes:
          type: integer
          nullable: true
        saves:
          type: integer
          nullable: true
        views:
          type: integer
          nullable: true
        reach:
          type: integer
          nullable: true
        clicks:
          type: integer
          nullable: true
        profile_visits:
          type: integer
          nullable: true
        link_clicks:
          type: integer
          nullable: true
          description: >-
            Clicks that went on to the post's link: a part of `clicks`, not
            added to it.
        watch_time:
          type: integer
          nullable: true
          description: Seconds watched in total. 0 on a post without a video.
        reactions:
          type: object
          nullable: true
          additionalProperties:
            type: integer
          description: >-
            Facebook: the count of each reaction type, in lower case, like
            `{"like": 11, "love": 1}`.
        avg_watch_time:
          type: number
          format: float
          nullable: true
          description: >-
            Seconds watched on average, with 1 decimal: YouTube, Instagram
            Reels, Facebook and Pinterest videos. Pinterest's is per play (each
            time the video starts), the others' per view.
        avg_view_percentage:
          type: number
          format: float
          nullable: true
          description: >-
            YouTube: how much of the video was watched on average, a percent
            with 1 decimal (43.2 means 43.2%).
        followers_gained:
          type: integer
          nullable: true
          description: 'YouTube: subscribers the video brought.'
        followers_lost:
          type: integer
          nullable: true
          description: 'YouTube: subscribers lost from the video.'
        story:
          type: object
          nullable: true
          description: 'An Instagram Story: how people moved through it.'
          required:
            - exits
            - taps_forward
            - taps_back
            - swipes_forward
          properties:
            exits:
              type: integer
              description: Taps to leave the stories.
            taps_forward:
              type: integer
              description: Taps on to the next story.
            taps_back:
              type: integer
              description: Taps back to the story before.
            swipes_forward:
              type: integer
              description: Swipes on to the next account's stories.
        engagement_rate:
          type: number
          nullable: true
          description: >-
            Interactions over impressions, in percent with 2 decimals (9.62 is
            9.62%). Null without impressions.
        pending:
          type: boolean
          description: True until the numbers were read once.
        synced_at:
          type: string
          format: date-time
          nullable: true
          description: When the numbers were last read.
    PostAutoPlugThreshold:
      type: object
      required:
        - enabled
        - count
      properties:
        enabled:
          type: boolean
        count:
          type: integer
          nullable: true
          description: The number that fires the reply.
    APICommentMedia:
      description: >-
        A picture, GIF, video or audio clip in a social comment, or a file
        attached to a team comment: a media library item, plus its kind and
        whether the network marked it sensitive.
      allOf:
        - $ref: '#/components/schemas/APIMedia'
        - type: object
          required:
            - kind
            - sensitive
          properties:
            kind:
              type: string
              enum:
                - photo
                - gif
                - video
                - audio
                - file
              description: >-
                On a social comment, what the network sent: photo, gif, video or
                audio. type is the saved file's type, so the two can differ: a
                video kept as its still has type image and kind video; a saved
                video file's still is at thumb_url once it is made. On a team
                comment, kind follows the file's type: photo, gif, video, audio,
                or file for anything else (a PDF, for example).
            sensitive:
              type: boolean
              description: >-
                True when the network marked the picture sensitive, for example
                a Mastodon post marked sensitive or a Bluesky post with an adult
                or graphic label.
    PostApprover:
      type: object
      required:
        - id
        - name
        - answer
      properties:
        id:
          type: integer
          description: >-
            The person's account id, as in [List team
            members](/api-reference/team/list).
        name:
          type: string
        answer:
          type: string
          nullable: true
          enum:
            - approved
            - rejected
          description: Their answer in this round, or `null` while they haven't answered.
    PostApprovalStep:
      type: object
      description: One step of the post's latest approval round.
      required:
        - step
        - state
        - who
        - answered_by
        - answered_at
        - reason
        - overridden_by
        - override_reason
        - reached_at
      properties:
        step:
          type: string
          enum:
            - team
            - client
        state:
          type: string
          enum:
            - not_reached
            - waiting
            - approved
            - changes_asked
          description: >-
            `not_reached`: the client step before the team approved.
            `changes_asked`: the post went back to its writer (status
            `REJECTED`).
        who:
          type: array
          items:
            $ref: '#/components/schemas/PostApprovalPerson'
          description: >-
            Who may answer it: the post's team approvers, or the workspace's
            Client members and client reviewers. Empty on the team step for a
            Client member's key.
        answered_by:
          type: object
          nullable: true
          description: Who answered it, once someone has.
          allOf:
            - $ref: '#/components/schemas/PostApprovalPerson'
        answered_at:
          type: string
          nullable: true
          description: In the workspace's timezone, as `Y-m-d H:i`.
        reason:
          type: string
          nullable: true
          description: >-
            What the person asking for changes wrote. `null` on the team step
            for a Client member's key: the team's reason is the team's own.
        overridden_by:
          type: object
          nullable: true
          description: Someone who can publish sent the post on without this answer.
          required:
            - id
            - name
          properties:
            id:
              type: integer
            name:
              type: string
              nullable: true
        override_reason:
          type: string
          nullable: true
          description: >-
            Why they sent it on without this answer, as they wrote it for the
            client too: a Client member's key reads it. `null` unless
            `overridden_by` is set.
        reached_at:
          type: string
          nullable: true
          description: >-
            When the step began to wait, in the workspace's timezone, as `Y-m-d
            H:i`. `null` while it is not reached, and for a post sent before
            client approvals.
    PostApprovalPerson:
      type: object
      description: >-
        Someone who answers a step: a team member or Client member (`user`), or
        a client reviewer added by email (`reviewer`). A reviewer's email is
        never shown.
      required:
        - type
        - id
        - name
        - avatar
      properties:
        type:
          type: string
          enum:
            - user
            - reviewer
        id:
          type: integer
          description: The user's id, or the client's `id` in the client list.
        name:
          type: string
          nullable: true
        avatar:
          type: string
          nullable: true
          description: A URL, or `null`.
    PostDefaultsSettings:
      type: object
      additionalProperties: true
      description: >-
        An account's post defaults: the settings a new post on the account
        starts from, in the same shape as `accounts[].settings` on [Create a
        post](/api-reference/posts/create), for the account's network. Only the
        keys someone set are here; `{}` when none are. `first_comment_media` is
        read as media objects, in order, as a post's media is: a file deleted
        from the library since is left out. Send ids, or the objects a read
        gave. Post text (titles, captions, descriptions, polls), media and
        TikTok's `brand_content_toggle` and `brand_organic_toggle` are never
        defaults. [Post defaults](/guides/account-defaults) lists the keys each
        network takes.
    PutBackCounts:
      type: object
      description: >-
        Posts by what putting back does with them (all 11 are always there):
        `scheduled_again` (a draft the disconnect took off the schedule,
        unchanged since, scheduled again at its time), `added_to_scheduled`
        (scheduled or waiting for approval: the account is added, the time
        stays), `added_to_draft` (a draft stays a draft),
        `added_to_draft_time_passed` and `added_to_draft_changed` (taken off the
        schedule by the disconnect, but its time passed or it was edited since,
        so it stays a draft), `added_to_draft_refused` (kept a draft because the
        plan's post limit refused scheduling it), `skipped_deleted`,
        `skipped_already_there`, `skipped_went_out` (published, failed or
        sending), `skipped_time_passed` (due within 5 minutes), and `not_done`
        (an error stopped it; calling again tries it again).
      required:
        - scheduled_again
        - added_to_scheduled
        - added_to_draft
        - added_to_draft_time_passed
        - added_to_draft_changed
        - added_to_draft_refused
        - skipped_deleted
        - skipped_already_there
        - skipped_went_out
        - skipped_time_passed
        - not_done
      properties:
        scheduled_again:
          type: integer
        added_to_scheduled:
          type: integer
        added_to_draft:
          type: integer
        added_to_draft_time_passed:
          type: integer
        added_to_draft_changed:
          type: integer
        added_to_draft_refused:
          type: integer
        skipped_deleted:
          type: integer
        skipped_already_there:
          type: integer
        skipped_went_out:
          type: integer
        skipped_time_passed:
          type: integer
        not_done:
          type: integer
  examples:
    PostRejected:
      summary: A rejected post
      value:
        id: 4182
        content:
          - text: >-
              Our spring menu starts today. The lavender oat latte is back, and
              so is the rhubarb bun.
            media:
              - id: 9051
                workspace_id: 12
                folder_id: null
                name: latte-art.jpg
                url: https://cdn.postsyncer.com/examples/latte-art.jpg
                thumb_url: https://cdn.postsyncer.com/examples/latte-art-thumb.jpg
                medium_url: https://cdn.postsyncer.com/examples/latte-art-medium.jpg
                mime_type: image/jpeg
                size: 482113
                is_processing: false
                type: image
                ai_generated_id: null
                is_reference: false
                progress: 100
                alt: Latte art in a blue cup
                duration_seconds: null
            cover_image: null
            is_first_comment: false
            first_comment_delay: null
          - text: Find us at 14 Mill Lane, open 7 to 4 every day.
            media: []
            cover_image: null
            is_first_comment: true
            first_comment_delay: 1
        status: REJECTED
        content_version: 1
        review_version: 1
        approval:
          status: rejected
          approvers:
            - id: 7
              name: Maya Ortiz
              answer: rejected
          answered_by:
            id: 7
            name: Maya Ortiz
          answered_at: 2030-03-14 16:20
          reason: Use the spring logo.
        posted_on: []
        scheduled_at: 2030-03-15 09:00
        repeatable: false
        repeatable_times: null
        repeatable_gap: null
        repeatable_gap_unit: null
        repeatable_accounts: null
        remaining_posts: null
        comments_settings: null
        contact_collection_settings: null
        created_at: 2030-03-01 10:24
        updated_at: 2030-03-01 10:24
        workspace:
          id: 12
          owner_id: 7
          name: Halden Coffee
          type: BRAND
          logo: https://cdn.postsyncer.com/examples/halden-coffee-logo.png
          timezone: Europe/London
          queue_slot:
            '09:00':
              time_24: '09:00'
              time_12: 9:00 am
              days:
                - true
                - true
                - true
                - true
                - true
                - false
                - false
          is_auto_repost_enabled_by_default: false
          auto_repost_settings:
            repeatable_gap: 6
            repeatable_gap_unit: hours
            repeatable_times: 2
          is_auto_plug_enabled_by_default: false
          auto_plug_settings: []
          comments_settings:
            remove_profanity: false
            remove_negativity: false
            remove_all_comments: false
            remove_custom_topics: false
            custom_topics_list: []
            remove_urls: false
            remove_emails: false
            remove_phones: false
            remove_mentions: false
            mentions_list: []
            remove_hashtags: false
            hashtags_list: []
            remove_keywords: false
            keywords_list: []
            ai_reply: false
          is_comment_moderation_enabled: false
          credits: 240
        labels: []
        campaign: null
        platforms:
          - platform: instagram
            account_id: 301
            posted_on: []
            status: PENDING
            settings:
              post_type: POST
              caption: null
              reel_trial_enabled: false
              graduation_strategy: MANUAL
              collaborators: []
            notes: []
          - platform: linkedin
            account_id: 302
            posted_on: []
            status: PENDING
            settings:
              visibility: PUBLIC
              link: null
              title: null
            notes: []
        auto_plug: null
  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.