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

# Delete a post

> Delete a post in PostSyncer and, where it was published, on the networks too.

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

Deletes the post and stops anything still scheduled. Where the post was published, it is deleted on the network too, except on Instagram and TikTok, which don't let apps delete posts, and on an account whose sign-in has expired. There it stays up, and you delete it in the network's app. This can't be undone.

Some deletes are partial, and some refusals fail the request. On X, Threads, Bluesky and Mastodon only a thread's first post is deleted, and on Telegram only an album's first photo or video. A refusal on LinkedIn, Bluesky or Mastodon is only logged, and the post stays up there. On X, Threads, Facebook, YouTube, Pinterest, Telegram and Google Business Profile, a refusal answers `500`: the post stays in PostSyncer, and the accounts handled before the refusal are already removed from it. [Test safely](/docs/test-safely.md#what-cant-be-undone) has the table.

To stop a post without deleting it, [update it](/docs/api-reference/posts/update.md) with `schedule_type: draft`.

When one API key or agent deletes 10 or more scheduled posts, or takes them off the schedule, within an hour, the workspace owner and managers get an email and a [`posts.bulk_removed`](/docs/api-reference/webhooks/overview#other-events) webhook is sent. Deleted posts are gone and can't be put back: the email only says how many were deleted. Only the posts taken off the schedule can be put back, with the email's link. A deleted post also sends `post.deleted`.

## Errors

| Status | `error` | When | Retry? |
| - | - | - | - |
| 401 | | No API key, or not a valid one. | No: fix the key. |
| 403 | | The key lacks `posts:delete`, or its user is inactive. | No: grant it in Settings → API. |
| 403 | | Your role in the post's workspace can't delete posts. | No. |
| 404 | | No post with that id in the workspaces the key can reach, or it is already deleted. | No. |
| 429 | | More than 60 requests a minute. | Yes, after `Retry-After` seconds. |
| 500 | | A network refused the delete. The post stays in PostSyncer; the accounts handled before it are removed. | Once, after a moment: the accounts already removed aren't asked again. |

## Related

* [Update a post](/docs/api-reference/posts/update.md): take it off the schedule instead.
* [Post events](/docs/api-reference/webhooks/overview.md#post-events): `post.deleted`.


## OpenAPI

````yaml DELETE /posts/{id}
openapi: 3.0.3
info:
  title: PostSyncer API
  description: >-
    Post to 12 social networks from your code: posts, media, comments,
    analytics, webhooks and more.
  version: 1.0.0
servers:
  - url: https://postsyncer.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: The workspaces the key can reach.
  - name: Accounts
    description: Connected social accounts, links to connect more, and disconnecting them.
  - name: Posts
    description: Drafts, scheduled and published posts, approvals and a post's history.
  - name: Post settings
    description: A post's auto-plug, comment moderation and contact collection.
  - name: Media
    description: >-
      The media library: file uploads, URL imports, and reading videos and
      social posts' files.
  - name: Folders
    description: Folders that organise the media library.
  - name: Comments
    description: >-
      Comments on your posts: reading, replying, editing, hiding, deleting and
      syncing them.
  - name: Reviews
    description: Google Business Profile reviews and your replies to them.
  - name: Analytics
    description: Workspace, account and post performance.
  - name: Brand
    description: >-
      A workspace's brand: identity, voice, look, accounts, competitors,
      learnings and rules.
  - name: Labels
    description: Labels used to tag posts.
  - name: Campaigns
    description: Campaigns used to group posts.
  - name: Snippets
    description: Saved snippets and hashtag groups to drop into posts.
  - name: Webhooks
    description: Signed webhook endpoints that get your notification events.
  - name: Billing
    description: >-
      The owner's plan, invoices and the links that pay for, change or cancel
      it.
  - name: Team
    description: A workspace's teammates and invitations, and their roles.
  - name: Notifications
    description: >-
      Your bell and notification settings, and the workspace's Slack, Discord
      and Telegram channels.
  - name: Blog-to-social
    description: Blog feeds that turn a workspace's new articles into posts.
  - name: Products
    description: Products the workspace's posts can promote.
  - name: Contacts
    description: People who commented on the workspace's posts, and the lists they are on.
  - name: Profile
    description: 'The key''s user: their name and sign-in email.'
  - name: API keys
    description: 'Your API keys: listing and deleting them.'
  - name: Agent sign-up
    description: >-
      An AI agent signs a person up with a code emailed to them, and gets their
      first key. No key needed.
paths:
  /posts/{id}:
    delete:
      tags:
        - Posts
      summary: Delete a post
      description: >-
        Needs `posts:delete`. Deletes the post in PostSyncer and, where it was
        published, on the networks too. It stays up on Instagram and TikTok,
        which don't let apps delete posts, and on an account whose sign-in has
        expired. On X, Threads, Bluesky and Mastodon only a thread's first post
        is deleted, and on Telegram only an album's first photo or video. A
        refusal on LinkedIn, Bluesky or Mastodon is only logged, and the post
        stays up there; on X, Threads, Facebook, YouTube, Pinterest, Telegram or
        Google Business Profile it answers `500`, and the post stays in
        PostSyncer without the accounts handled before the refusal. See [Test
        safely](/test-safely#what-cant-be-undone). This can't be undone.
      operationId: deletePost
      parameters:
        - name: id
          in: path
          required: true
          description: The post's id.
          schema:
            type: integer
      responses:
        '200':
          description: The post was deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                default:
                  summary: Deleted
                  value:
                    message: Post deleted successfully
        '401':
          $ref: '#/components/responses/Unauthorized401'
        '403':
          description: >-
            The key lacks `posts:delete`, its user is inactive, or your role in
            the post's workspace can't delete posts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_permission:
                  summary: The key lacks posts:delete
                  value:
                    message: >-
                      This API key does not have the "posts:delete" permission.
                      Edit the key in PostSyncer under Settings → API to grant
                      it.
                role:
                  summary: The role can't delete posts
                  value:
                    message: >-
                      Your role in the workspace "Halden Coffee" does not allow
                      you to delete posts. 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'
        '429':
          $ref: '#/components/responses/RateLimited429'
        '500':
          description: >-
            A network refused the delete (X, Threads, Facebook, YouTube,
            Pinterest, Telegram or Google Business Profile). The post stays in
            PostSyncer; the accounts handled before the refusal are already
            removed from it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                network_refused:
                  summary: A network 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.