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

# Delete Pending Post

> Delete a grouped post before publishing has started.



## OpenAPI

````yaml DELETE /api/v1/posts/{id}
openapi: 3.0.3
info:
  title: Mallary API
  version: 1.6.0
  description: >
    Public API for multi-platform publishing, analytics, media upload, and
    webhooks.


    Authentication:

    - Use header `Authorization: Bearer {api_key}`.

    - API key identity is authoritative. Do not use `user_id` to identify a
    caller.


    Connection profiles:

    - Omit `profile_id` to use the authenticated user's default profile.

    - Send the profile's random public `profile_id` when you want to publish,
    list posts, read post analytics or audience counts, list platforms, update
    settings, or disconnect a platform for a non-default profile.

    - Use `GET /api/v1/profiles` to list profile IDs.

    - Total social media accounts: Starter 5 ($15/month), Pro 15 ($29/month),
    Business 100 ($95/month). Posts are unlimited. Scheduling, analytics, and AI
    auto-replies are included. X publishing and comments use credits at cost;
    analytics and account lookups use no credits. Existing customers keep their
    current terms; use the authenticated workspace limits.


    Rate limits (per user, per minute) depend on subscription plan:

    - plan_id 1: 75 req/min

    - plan_id 2: 150 req/min

    - plan_id 3: 750 req/min

    - plan_id 4: 1500 req/min
servers:
  - url: https://mallary.ai
    description: Production
security:
  - bearerAuth: []
externalDocs:
  description: Full product docs
  url: https://docs.mallary.ai/
paths:
  /api/v1/posts/{id}:
    delete:
      summary: Delete pending/scheduled post
      description: >-
        Deletes queued/scheduled jobs for a grouped post that has not started
        publishing. With expected_revision, the group must still be a future,
        unattempted schedule.
      operationId: deletePendingPost
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
        - in: query
          name: profile_id
          required: false
          schema:
            $ref: '#/components/schemas/ProfileId'
          description: >-
            Optional current profile. A different or unavailable profile returns
            404.
      requestBody:
        required: false
        description: >-
          Optional concurrency guard. Read the current group revision from GET
          /api/v1/posts/{id}; stale revisions return 409. Omit to retain the
          existing unguarded behavior.
        content:
          application/json:
            schema:
              type: object
              properties:
                expected_revision:
                  type: integer
                  minimum: 1
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletePostResponse'
        '400':
          description: Invalid post id
        '401':
          description: Missing or invalid API key
        '404':
          description: Post not found
        '409':
          description: >-
            Revision changed, or post started publishing or is no longer a
            future schedule
components:
  schemas:
    ProfileId:
      type: string
      pattern: ^[A-Za-z0-9]{6,32}$
      example: AbC123xYz90
      description: Random public connection profile ID returned by `GET /api/v1/profiles`.
    DeletePostResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - ok
        data:
          type: object
          properties:
            deleted_count:
              type: integer
            deleted_job_ids:
              type: array
              items:
                type: integer
            batch_id:
              type: string
              nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Use `Authorization: Bearer {api_key}`'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.