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

# Delete a comment

> Delete a team comment in PostSyncer, or a social comment on its network.

> [!NOTE]
>
> Needs `comments:delete`, and a role in the post's workspace that can delete comments. See [Permissions](/docs/essentials/authentication.md#permissions).

A team or share-link comment is deleted in PostSyncer: your own, or one a client wrote. An `APPROVAL` note isn't deleted: the answer is still `200` `Comment deleted successfully`.

A `SOCIAL` comment stays in PostSyncer, with `is_deleted_on_platform: true` when the network removed it, or `is_hidden_on_platform: true` when it was hidden instead. On Bluesky, someone else's reply is marked deleted though it stays up: see the table.

| Network | What a delete does | When it doesn't happen |
| - | - | - |
| Facebook, Instagram | Deletes the comment. One already gone counts as deleted. | `422` with the network's reason |
| Threads | Deletes a reply sent from PostSyncer or written by the account. Hides anyone else's. | `500` |
| X | Deletes a reply the account wrote on X. Hides any other comment, a reply sent from PostSyncer included. | `200`, nothing changes |
| YouTube | Deletes a reply sent from PostSyncer or the channel's own comment. Rejects anyone else's, which removes it for good: it can't be shown again. | `200`, nothing changes |
| LinkedIn | Asks LinkedIn to delete the comment, as the account. | `200`, nothing changes |
| Bluesky | Deletes a reply the account wrote, one sent from PostSyncer included. Anyone else's reply stays on Bluesky, but PostSyncer still marks it `is_deleted_on_platform: true`. | `200`, nothing changes |
| Mastodon | Deletes a reply the account wrote, one sent from PostSyncer included. Mastodon refuses to delete anyone else's, so it stays. | `200`, nothing changes |
| TikTok, Pinterest, Telegram, Google Business Profile | Nothing: PostSyncer can't delete comments there. | `200`, nothing changes |

If the account needs reconnecting, a delete on Facebook, Instagram, Threads, LinkedIn or Mastodon answers `422` with `Token expired or platform post not found`; on X, YouTube and Bluesky it answers `200`. Every `200` says `Comment deleted successfully`, so [get the comment](/docs/api-reference/comments/get.md) to see what happened.

## Errors

| Status | `error` | When | Retry? |
| - | - | - | - |
| 401 | | No API key, or not a valid one. | No: fix the key. |
| 403 | | The key lacks `comments:delete`, or its user is inactive. | No: grant it in Settings → API. |
| 403 | | Another member's team comment (`You are not allowed to delete this comment`), or your role can't delete comments. | No. |
| 404 | | No comment with that id on a post in the workspaces the key can reach. | No. |
| 422 | | Facebook or Instagram refused, or the account must be reconnected first (Facebook, Instagram, Threads, LinkedIn, Mastodon). `message` says why. | Only after fixing the cause, such as reconnecting the account. |
| 429 | | More than 60 requests a minute. | Yes, after `Retry-After` seconds. |
| 500 | | Threads refused the delete, or the hide it does instead. Nothing changed. | Maybe later; [get the comment](/docs/api-reference/comments/get.md) first. |

## Related

* [Hide or show a comment](/docs/api-reference/comments/hide.md): keep it, but out of sight.
* [Answer comments](/docs/guides/comments.md#hide-or-delete-a-comment): which to use on each network.


## OpenAPI

````yaml DELETE /comments/{comment}
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/{comment}:
    delete:
      tags:
        - Comments
      summary: Delete a comment
      description: >-
        Needs `comments:delete`. Your role in the post's workspace must also let
        you delete comments. A team or share-link comment is deleted in
        PostSyncer: your own, or one a client wrote. An approval note isn't
        deleted, but the answer is still `200`. A `SOCIAL` comment stays in
        PostSyncer, with `is_deleted_on_platform: true` when the network removed
        it or `is_hidden_on_platform: true` when it was hidden instead. Facebook
        and Instagram delete it, and one already gone counts as deleted.
        LinkedIn is asked to delete it, as the account. Bluesky deletes a reply
        the account wrote, one sent from PostSyncer included; anyone else's
        reply stays on Bluesky, but PostSyncer still marks it
        `is_deleted_on_platform: true`. Mastodon deletes a reply the account
        wrote, one sent from PostSyncer included, and refuses to delete anyone
        else's, so it stays. Threads deletes a reply sent from PostSyncer or
        written by the account, and hides anyone else's. X deletes a reply the
        account wrote on X, and hides any other comment, a reply sent from
        PostSyncer included. YouTube deletes a reply sent from PostSyncer or the
        channel's own comment, and rejects anyone else's, which removes it for
        good: it can't be shown again. TikTok, Pinterest, Telegram and Google
        Business Profile can't delete comments through PostSyncer. When it
        doesn't happen, Facebook and Instagram answer `422` with the network's
        reason, and a Threads refusal answers `500`. On X, YouTube, LinkedIn,
        Bluesky, Mastodon and the networks that can't delete, the answer is
        `200` and nothing changes. If the account needs reconnecting, Facebook,
        Instagram, Threads, LinkedIn and Mastodon answer `422` with `Token
        expired or platform post not found`; X, YouTube and Bluesky answer
        `200`. Every `200` says `Comment deleted successfully`, so [get the
        comment](/api-reference/comments/get) to see what happened.
      operationId: deleteComment
      parameters:
        - name: comment
          in: path
          required: true
          description: The comment's id.
          schema:
            type: integer
      responses:
        '200':
          description: >-
            Done, or not done on that network (see above): the message is the
            same.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                default:
                  summary: Deleted
                  value:
                    message: Comment deleted successfully
        '401':
          $ref: '#/components/responses/Unauthorized401'
        '403':
          description: >-
            The key lacks `comments:delete`, its user is inactive, it's another
            member's team comment, or your role can't delete comments.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_permission:
                  summary: The key lacks comments:delete
                  value:
                    message: >-
                      This API key does not have the "comments:delete"
                      permission. Edit the key in PostSyncer under Settings →
                      API to grant it.
                not_yours:
                  summary: Another member's team comment
                  value:
                    message: You are not allowed to delete this comment
                role:
                  summary: Your role can't delete comments
                  value:
                    message: >-
                      Your role in the workspace "Halden Coffee" does not allow
                      you to delete comments. Ask the workspace owner or a
                      manager to do it, or to change your role.
                inactive_account:
                  summary: The key's user is inactive
                  value:
                    message: Your account is inactive.
        '404':
          $ref: '#/components/responses/NotFound404'
        '422':
          description: >-
            Facebook or Instagram refused, or on Facebook, Instagram, Threads,
            LinkedIn or Mastodon the account must be reconnected first.
            `message` says why.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                network_refused:
                  summary: Facebook refused
                  value:
                    message: (#200) Permissions error
                reconnect:
                  summary: The sign-in ran out
                  value:
                    message: Token expired or platform post not found
        '429':
          $ref: '#/components/responses/RateLimited429'
        '500':
          description: >-
            Threads refused the delete or the hide. PostSyncer doesn't catch
            that refusal, so the answer is a server error; nothing changed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                threads_refused:
                  summary: Threads refused
                  value:
                    message: Server Error
components:
  schemas:
    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).
  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.