> ## 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 Draft

> Manage saved unpublished posts without choosing a publish date.

Saved drafts are available to all users. Normal publishing and scheduling rules apply when submitting.

Drafts stay separate from scheduled and published posts. Saving does not publish or use your posting allowance. Text, media, destinations, and platform settings can be unfinished.

Use the draft UUID from the save response. Read the draft's current `revision` before editing, deleting, or submitting, then send it as `expected_revision`. A `409` means the draft changed or was submitted; read it again before continuing.

Only the submit endpoint publishes or schedules. It runs the same account, plan, content, and platform checks as [Create Post](/api-reference/endpoint/create). If validation fails, the draft stays saved. After a successful submission, the draft read includes `submission` with the original jobs. Repeating the same submission revision and schedule returns those same jobs.

Use `profile_id` for a non-default connection profile. A draft uses one profile. Lists include only unpublished drafts in that profile.

See the [draft workflow](/home/drafts) for dashboard, API, MCP, and CLI examples.


## OpenAPI

````yaml DELETE /api/v1/drafts/{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.

    - Per-platform account caps by plan: Free 1, Starter 4, Pro 10, Business 50.


    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/drafts/{id}:
    delete:
      tags:
        - Drafts
      summary: Delete an unpublished draft
      description: >-
        Requires its current revision. Submitted drafts cannot be deleted here.
        Does not delete uploaded media or any social post. Available to all
        users. Requires mallary.publish for OAuth.
      operationId: deleteDraft
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: profile_id
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/ProfileId'
          description: >-
            Omit to use the default profile on lists. On reads, deletes and
            submissions, optionally verify the draft belongs to this profile.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DraftRevisionRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteDraftResponse'
        '400':
          description: >-
            Invalid fields or publishing validation failed. The draft stays
            saved.
        '401':
          description: Authentication required
        '403':
          description: >-
            Required OAuth scope missing, or submission blocked by normal
            publishing or scheduling rules. Draft management is available to all
            users.
        '404':
          description: Draft or profile not found for this user
        '409':
          description: >-
            Draft changed or was submitted. Read it again before editing,
            deleting or submitting.
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`.
    DraftRevisionRequest:
      type: object
      additionalProperties: false
      required:
        - expected_revision
      properties:
        expected_revision:
          type: integer
          minimum: 1
          description: Current revision from a draft read or save.
    DeleteDraftResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - ok
        data:
          type: object
          properties:
            id:
              type: string
              format: uuid
            deleted:
              type: boolean
  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.