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

# List comments

> Get one post's comments, oldest first, with their replies nested.

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

Gives the comments of the post in `post_id`, 20 a page. `source` picks which kind: `SOCIAL` (the default) for the networks' comments and your replies, `INTERNAL` for team, approval and share-link comments together.

With `source=SOCIAL`, page 1 reads the networks first, as opening the post's comments in the app does. A copy whose read was started in the last 2 minutes (X: 5), even one that failed, or is running now, is not read again. Instagram and Threads send their comments as they are written, and TikTok, Pinterest, Telegram and Google Business Profile comments are not read. On Free, X comments come from a daily allowance; once it is used up, the saved ones are listed with no error.

On X, Threads, Bluesky and Mastodon, the parts of a post published as a thread are not comments, so they are not listed. That covers the parts PostSyncer posted and the account's own replies that continue the thread within 15 minutes of the part before. The post's first comment is listed.

Each comment's `media` holds its photos, GIFs, videos and audio clips, each with `kind` and `sensitive`. `media_hidden_by_platform` is `true` on an Instagram comment that holds a GIF, sticker or photo Instagram doesn't share. On Threads, a GIF in a reply with text isn't kept. `moderation_reason` says which rule [comment moderation](/docs/api-reference/posts/comment-moderation.md) acted on, or is `null`.

`is_resolved`, `is_approved` and `include_replies` take the words `true` and `false`, not `1` and `0`.

## Errors

| Status | `error` | When | Retry? |
| - | - | - | - |
| 401 | | No API key, or not a valid one. | No: fix the key. |
| 403 | | The key lacks `comments:read`, or its user is inactive. | No: grant it in Settings → API. |
| 404 | | The post isn't in a workspace the key can reach. | No. |
| 422 | | `post_id` is missing or no post has it, `is_resolved`, `is_approved` or `include_replies` isn't `true` or `false`, or `page` or `per_page` is out of range. | No: fix the request. |
| 429 | | More than 60 requests a minute. | Yes, after `Retry-After` seconds. |

## Related

* [Sync comments](/docs/api-reference/comments/sync.md): read the networks now and see what was read.
* [Get a comment](/docs/api-reference/comments/get.md): one comment, with every field described.
* [Answer comments](/docs/guides/comments.md): find the ones that need a reply and answer them.


## OpenAPI

````yaml GET /comments
openapi: 3.0.3
info:
  title: PostSyncer API
  description: >-
    Post to 12 social networks from your code: posts, media, comments,
    analytics, webhooks and more.
  version: 1.0.0
servers:
  - url: https://postsyncer.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: The workspaces the key can reach.
  - name: Accounts
    description: Connected social accounts, links to connect more, and disconnecting them.
  - name: Posts
    description: Drafts, scheduled and published posts, approvals and a post's history.
  - name: Post settings
    description: A post's auto-plug, comment moderation and contact collection.
  - name: Media
    description: >-
      The media library: file uploads, URL imports, and reading videos and
      social posts' files.
  - name: Folders
    description: Folders that organise the media library.
  - name: Comments
    description: >-
      Comments on your posts: reading, replying, editing, hiding, deleting and
      syncing them.
  - name: Reviews
    description: Google Business Profile reviews and your replies to them.
  - name: Analytics
    description: Workspace, account and post performance.
  - name: Brand
    description: >-
      A workspace's brand: identity, voice, look, accounts, competitors,
      learnings and rules.
  - name: Labels
    description: Labels used to tag posts.
  - name: Campaigns
    description: Campaigns used to group posts.
  - name: Snippets
    description: Saved snippets and hashtag groups to drop into posts.
  - name: Webhooks
    description: Signed webhook endpoints that get your notification events.
  - name: Billing
    description: >-
      The owner's plan, invoices and the links that pay for, change or cancel
      it.
  - name: Team
    description: A workspace's teammates and invitations, and their roles.
  - name: Notifications
    description: >-
      Your bell and notification settings, and the workspace's Slack, Discord
      and Telegram channels.
  - name: Blog-to-social
    description: Blog feeds that turn a workspace's new articles into posts.
  - name: Products
    description: Products the workspace's posts can promote.
  - name: Contacts
    description: People who commented on the workspace's posts, and the lists they are on.
  - name: Profile
    description: 'The key''s user: their name and sign-in email.'
  - name: API keys
    description: 'Your API keys: listing and deleting them.'
  - name: Agent sign-up
    description: >-
      An AI agent signs a person up with a code emailed to them, and gets their
      first key. No key needed.
paths:
  /comments:
    get:
      tags:
        - Comments
      summary: List comments
      description: >-
        Needs `comments:read`. Gives one post's comments, oldest first, 20 a
        page. `source` picks which: `SOCIAL` (the default) for the networks'
        comments and your replies to them, `INTERNAL` for team comments with
        approval notes and share-link comments, `APPROVAL` or `PUBLIC_SHARE` for
        just those. With `source=SOCIAL`, page 1 reads the networks first, as
        opening the post's comments in the app does: X, LinkedIn, Bluesky,
        YouTube, Mastodon and Facebook (not Facebook Stories) are read;
        Instagram and Threads send their comments to PostSyncer as they are
        written; TikTok, Pinterest, Telegram and Google Business Profile
        comments are not read. A copy whose read was started in the last 2
        minutes (X: 5), even one that failed, or is running now, is not read
        again. On Free, X comments are read from a daily allowance shared by all
        Free posts; once today's is used up, the comments already saved are
        listed and X is read again after midnight UTC. With `include_replies`
        (the default) the page holds top-level comments with their replies
        nested in `replies`; `include_replies=false` lists every comment flat.
        Works on every plan.
      operationId: listComments
      parameters:
        - name: post_id
          in: query
          required: true
          description: The post. It must be in a workspace the key can reach.
          schema:
            type: integer
            example: 4182
        - name: source
          in: query
          required: false
          description: >-
            `SOCIAL` for comments from the networks, `INTERNAL` for team,
            approval and share-link comments together, `APPROVAL` or
            `PUBLIC_SHARE` for one kind.
          schema:
            type: string
            enum:
              - SOCIAL
              - INTERNAL
              - APPROVAL
              - PUBLIC_SHARE
            default: SOCIAL
        - name: provider
          in: query
          required: false
          description: >-
            Only this network's comments, like `facebook`. With `source=SOCIAL`,
            only that network is read first.
          schema:
            type: string
        - name: is_resolved
          in: query
          required: false
          description: >-
            `true` keeps resolved comments, `false` the others. Send the word:
            `1` and `0` are refused with `422`.
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
        - name: is_approved
          in: query
          required: false
          description: >-
            `true` or `false` keeps the comments with that `is_approved` (a
            comment without one matches neither). `1` and `0` are refused with
            `422`.
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
        - name: include_replies
          in: query
          required: false
          description: >-
            `true`: top-level comments, each with its replies nested. `false`:
            every comment, flat. `1` and `0` are refused with `422`.
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'true'
        - name: per_page
          in: query
          required: false
          description: >-
            Items a page, 1 to 100. 20 when left out. Outside 1 to 100 it is
            refused with `422`.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - name: page
          in: query
          required: false
          description: The page, from 1.
          schema:
            type: integer
            minimum: 1
            default: 1
      responses:
        '200':
          description: >-
            data array and pagination object. Each comment has needs_reply (true
            on a top-level social comment that asks something, with ?, ؟ or ？,
            and no reply from the workspace yet), quote, anchor and mentions
            ({id, name, avatar}). A social comment also has account_id and
            account ({id, name, username, avatar}): 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); and likes_count: the likes
            the network counted when PostSyncer last read the comment, or null
            when not known (team and client comments, replies sent from
            PostSyncer, Instagram and Threads). Its media lists the photos,
            GIFs, videos and audio clips in it, each with kind and sensitive (a
            team comment's media is its attachments); media_hidden_by_platform
            is true on an Instagram comment that holds a GIF, sticker or photo
            Instagram doesn't share. On Threads, a GIF in a reply with text
            isn't kept. moderation_reason says why moderation acted on it.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - pagination
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/APIComment'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
              examples:
                default:
                  summary: Social comments, with replies
                  value:
                    data:
                      - id: 88231
                        user_id: null
                        crm_contact_id: null
                        post_id: 4182
                        platform_post_id: 7801
                        parent_comment_id: null
                        source: SOCIAL
                        comment_url: https://www.instagram.com/p/DHk2mQ7sLtA/
                        platform: instagram
                        platform_post_comment_id: '18045123456789012'
                        author_name: rowan.example
                        author_avatar_url: https://cdn.postsyncer.com/examples/avatar-rowan.jpg
                        content: Is the lavender oat latte dairy-free?
                        moderation_message: null
                        moderation_reason: null
                        is_resolved: false
                        is_approved: null
                        is_deleted_on_platform: false
                        is_hidden_on_platform: false
                        media_hidden_by_platform: false
                        needs_reply: false
                        quote: null
                        anchor: null
                        mentions: []
                        account_id: 301
                        account:
                          id: 301
                          name: Halden Coffee
                          username: haldencoffee
                          avatar: >-
                            https://cdn.postsyncer.com/examples/halden-coffee-logo.png
                        likes_count: null
                        created_at: '2030-03-15T10:12:00.000000Z'
                        updated_at: '2030-03-15T10:12:00.000000Z'
                        replies:
                          - id: 88232
                            user_id: 7
                            crm_contact_id: null
                            post_id: 4182
                            platform_post_id: 7801
                            parent_comment_id: 88231
                            source: SOCIAL
                            comment_url: null
                            platform: instagram
                            platform_post_comment_id: '18045123456789013'
                            author_name: Alex Example
                            author_avatar_url: null
                            content: Yes! It's made with oat milk, so it's dairy-free.
                            moderation_message: null
                            moderation_reason: null
                            is_resolved: false
                            is_approved: null
                            is_deleted_on_platform: false
                            is_hidden_on_platform: false
                            media_hidden_by_platform: false
                            needs_reply: false
                            quote: null
                            anchor: null
                            mentions: []
                            account_id: 301
                            account:
                              id: 301
                              name: Halden Coffee
                              username: haldencoffee
                              avatar: >-
                                https://cdn.postsyncer.com/examples/halden-coffee-logo.png
                            likes_count: null
                            created_at: '2030-03-15T10:40:00.000000Z'
                            updated_at: '2030-03-15T10:40:00.000000Z'
                            replies: []
                            media: []
                            user:
                              id: 7
                              name: Alex Example
                              avatar: null
                        media: []
                      - id: 88236
                        user_id: null
                        crm_contact_id: null
                        post_id: 4182
                        platform_post_id: 7802
                        parent_comment_id: null
                        source: SOCIAL
                        comment_url: >-
                          https://www.linkedin.com/feed/update/urn:li:share:7306000000000000001/
                        platform: linkedin
                        platform_post_comment_id: >-
                          urn:li:comment:(urn:li:share:7306000000000000001,7306100000000000002)
                        author_name: Jordan Example
                        author_avatar_url: https://cdn.postsyncer.com/examples/avatar-jordan.jpg
                        content: Do you ship your beans to Leeds?
                        moderation_message: null
                        moderation_reason: null
                        is_resolved: false
                        is_approved: null
                        is_deleted_on_platform: false
                        is_hidden_on_platform: false
                        media_hidden_by_platform: false
                        needs_reply: true
                        quote: null
                        anchor: null
                        mentions: []
                        account_id: 302
                        account:
                          id: 302
                          name: Halden Coffee
                          username: halden-coffee
                          avatar: >-
                            https://cdn.postsyncer.com/examples/halden-coffee-logo.png
                        likes_count: 3
                        created_at: '2030-03-15T11:05:00.000000Z'
                        updated_at: '2030-03-15T11:05:00.000000Z'
                        replies: []
                        media: []
                    pagination:
                      current_page: 1
                      last_page: 1
                      per_page: 20
                      total: 2
                      has_more_pages: false
                team:
                  summary: Team comments (source=INTERNAL)
                  value:
                    data:
                      - id: 88240
                        user_id: 9
                        crm_contact_id: null
                        post_id: 4182
                        platform_post_id: null
                        parent_comment_id: null
                        source: INTERNAL
                        comment_url: null
                        platform: null
                        platform_post_comment_id: null
                        author_name: Sam Example
                        author_avatar_url: https://cdn.postsyncer.com/examples/avatar-sam.jpg
                        content: Alex, should we say the bun is back on weekends only?
                        moderation_message: null
                        moderation_reason: null
                        is_resolved: false
                        is_approved: null
                        is_deleted_on_platform: false
                        is_hidden_on_platform: false
                        media_hidden_by_platform: false
                        needs_reply: false
                        quote: so is the rhubarb bun
                        anchor:
                          thread: 0
                          network: null
                        mentions:
                          - id: 7
                            name: Alex Example
                            avatar: null
                        account_id: null
                        account: null
                        likes_count: null
                        created_at: '2030-03-14T16:20:00.000000Z'
                        updated_at: '2030-03-14T16:20:00.000000Z'
                        replies: []
                        media: []
                        user:
                          id: 9
                          name: Sam Example
                          avatar: https://cdn.postsyncer.com/examples/avatar-sam.jpg
                    pagination:
                      current_page: 1
                      last_page: 1
                      per_page: 20
                      total: 1
                      has_more_pages: false
        '401':
          $ref: '#/components/responses/Unauthorized401'
        '403':
          description: The key lacks `comments:read`, or its user is inactive.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_permission:
                  summary: The key lacks comments:read
                  value:
                    message: >-
                      This API key does not have the "comments:read" permission.
                      Edit the key in PostSyncer under Settings → API to grant
                      it.
                inactive_account:
                  summary: The key's user is inactive
                  value:
                    message: Your account is inactive.
        '404':
          $ref: '#/components/responses/NotFound404'
        '422':
          description: >-
            `post_id` is missing or no post has it, a filter isn't one of its
            values, or `page` or `per_page` is out of range.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
              examples:
                post_id_missing:
                  summary: No post_id
                  value:
                    message: The post id field is required.
                    errors:
                      post_id:
                        - The post id field is required.
                post_id_unknown:
                  summary: No post with that id
                  value:
                    message: The selected post id is invalid.
                    errors:
                      post_id:
                        - The selected post id is invalid.
                flag_not_a_word:
                  summary: is_resolved=1 instead of true
                  value:
                    message: The selected is resolved is invalid.
                    errors:
                      is_resolved:
                        - The selected is resolved is invalid.
                per_page_too_big:
                  summary: per_page over 100
                  value:
                    message: The per page field must not be greater than 100.
                    errors:
                      per_page:
                        - The per page field must not be greater than 100.
                per_page_too_small:
                  summary: per_page below 1
                  value:
                    message: The per page field must be at least 1.
                    errors:
                      per_page:
                        - The per page field must be at least 1.
        '429':
          $ref: '#/components/responses/RateLimited429'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://postsyncer.com/api/v1/comments?post_id=4182' \
              --header 'Authorization: Bearer <token>'
        - lang: javascript
          label: JavaScript
          source: >-
            const options = {method: 'GET', headers: {Authorization: 'Bearer
            <token>'}};


            fetch('https://postsyncer.com/api/v1/comments?post_id=4182',
            options)
              .then(res => res.json())
              .then(res => console.log(res))
              .catch(err => console.error(err));
        - lang: python
          label: Python
          source: |-
            import requests

            url = "https://postsyncer.com/api/v1/comments?post_id=4182"

            headers = {"Authorization": "Bearer <token>"}

            response = requests.get(url, headers=headers)

            print(response.text)
        - lang: php
          label: PHP
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://postsyncer.com/api/v1/comments?post_id=4182",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "Authorization: Bearer <token>"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
components:
  schemas:
    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.
        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; else the name or handle
            the network gives.
        author_avatar_url:
          type: string
          nullable: true
        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.
        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.
    Pagination:
      type: object
      description: Where this page sits in the whole list (comments and reviews).
      required:
        - current_page
        - last_page
        - per_page
        - total
        - has_more_pages
      properties:
        current_page:
          type: integer
        last_page:
          type: integer
        per_page:
          type: integer
        total:
          type: integer
          description: Items in the whole list.
        has_more_pages:
          type: boolean
          description: True when a next page has items.
    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
    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.
    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.
  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.