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

# Delete post

> Deletes a post group. Optionally removes it from connected social networks.



## OpenAPI

````yaml /public/api.json delete /posts/{post}
openapi: 3.1.0
info:
  title: PostFlow
  version: '1'
  description: >-
    The PostFlow API gives you access to analytics data from your PostFlow
    organization and provides you with tools for scheduling and publishing
    social media posts directly from your own application, automation tool, or
    AI assistant.


    ### What is PostFlow?

    PostFlow is a social media management platform designed to help teams and
    creators plan, collaborate, and publish social media content.


    ### Base URL

    The base URL for the PostFlow API is:


    ```http

    https://api.postflow.app/v1

    ```


    For media requests use base URL:

    ```http

    https://media.postflow.app/api/v1

    ```



    ### Authentication

    All API requests require a bearer token in the Authorization header.


    You can generate an API token from your [PostFlow account
    settings](https://new.postflow.app/settings/account/api). Once you have your
    token, include it in the Authorization header of your API requests as
    follows:



    ```http

    Authorization: Bearer YOUR_API_TOKEN

    ```



    ### Headers


    API requests must include the following headers:


    ```http

    Accept: application/json

    Content-Type: application/json

    ```


    ### Make your first request

    Once you have a token, you can make requests directly to the API. The
    following example returns basic information about your organization:


    ```bash

    curl https://api.postflow.app/v1/organizations \
      -H "Authorization: Bearer YOUR_API_TOKEN" \
      -H "Accept: application/json"
    ```


    ## Rate limits


    The PostFlow API implements rate limiting to ensure fair usage and protect
    against abuse. The default limit is **60 requests per minute** per
    authenticated user.


    Each API response includes the following headers with information about your
    current rate limit status:


    - `X-RateLimit-Limit` - maximum number of requests allowed per minute

    - `X-RateLimit-Remaining` - number of requests remaining in the current
    window

    - `X-RateLimit-Reset` - Unix timestamp when the rate limit resets


    ## PostFlow IDs


    Every object in the PostFlow API has a unique ID. PostFlow uses a system
    called "Snowflake ID" created by Twitter.


    These IDs are **64-bit unsigned integers**. Some programming languages
    (JavaScript) cannot accurately represent 64-bit integers.


    > **Warning:** You must **ALWAYS** use strings for PostFlow IDs in your
    code.



    ### String vs integer in Javascript


    In JavaScript, integers are limited to 53 bits. This causes precision loss
    with large IDs:


    ```javascript

    // This loses precision!

    const id = 10765432100123456789;

    console.log(id.toString()); // "10765432100123458000" — wrong!


    // Use strings instead

    const id = "10765432100123456789";

    console.log(id); // "10765432100123456789" — correct!

    ```


    ### Comparing IDs


    Examples of how you can compare PostFlow IDs:



    ```javascript javascript

    // Use BigInt


    if (BigInt(post1.id) > BigInt(post2.id)) {
        console.log("post1 is newer");
    }

    ```


    ```python python

    # Python handles large integers natively


    if post1.id > post2.id:
        print("post1 is newer")
    ```


    ```php php

    # PHP is safe with 64-bit integers


    if (post1->id > post2->id) {
        dd("post1 is newer");
    }

    ```


    ## Relationships & includes


    Some endpoints support the `include` query parameter to enrich the response
    with related resources. Pass a comma-separated list of relationship names to
    load them alongside the primary data.


    ```http

    GET /posts?include=media

    ```


    Multiple relationships can be included by separating them with a comma:


    ```http

    GET /posts?include=media,labels,postComments

    ```


    ## OpenAPI collection


    The raw OpenAPI specifications for the PostFlow API are available below.
    They can be used with various API tools and code generators that support the
    OpenAPI format.


    - [PostFlow API](https://postflow.app/docs/public/api.json)

    - [Media API](https://postflow.app/docs/public/media.json)


    > You can copy the above URLs to import them into API tools such as Postman.
servers:
  - url: https://api.postflow.app/v1
security:
  - http: []
tags:
  - name: User
  - name: Organization
  - name: Social accounts
  - name: Posts
  - name: Posts bulk
  - name: Post activities
  - name: Post metrics
  - name: Analytics
  - name: Widgets
  - name: Calendar notes
  - name: Groups
  - name: Labels
paths:
  /posts/{post}:
    delete:
      tags:
        - Posts
      summary: Delete post
      description: >-
        Deletes a post group. Optionally removes it from connected social
        networks.
      operationId: post.destroy
      parameters:
        - name: post
          in: path
          required: true
          description: The post ID
          schema:
            type: string
        - name: delete_from_network
          in: query
          description: >-
            The posts will be completely deleted from the social networks and
            also from PostFlow. PostFlow cannot remove the post from Instagram
            TikTok, Threads, 𝕏 (Twitter).
          schema:
            type: boolean
        - name: delete_from_clickup
          in: query
          description: Also delete related ClickUp task.
          schema:
            type: boolean
      responses:
        '204':
          description: No content
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer

````