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

# Get 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 GET /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}:
    get:
      tags:
        - Drafts
      summary: Read a saved draft
      description: >-
        Returns complete content and the revision. Submitted drafts include
        their original publishing result for recovery after a lost response.
        Available to all users. Requires mallary.read for OAuth.
      operationId: getDraft
      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.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DraftResponse'
        '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`.
    DraftResponse:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          enum:
            - ok
        data:
          $ref: '#/components/schemas/Draft'
    Draft:
      type: object
      required:
        - id
        - revision
        - status
        - profile_id
      properties:
        profile_id:
          $ref: '#/components/schemas/ProfileId'
        message:
          type: string
          maxLength: 10000
        platforms:
          type: array
          maxItems: 10
          items:
            type: string
            enum:
              - facebook
              - meta
              - instagram
              - threads
              - twitter
              - x
              - linkedin
              - tiktok
              - youtube
              - pinterest
              - reddit
              - bluesky
        media:
          type: array
          maxItems: 20
          items:
            type: object
            required:
              - url
            properties:
              url:
                type: string
                format: uri
                pattern: ^https://files\.mallary\.ai/
            additionalProperties: true
        comments_under_post:
          type: array
          maxItems: 3
          items:
            oneOf:
              - type: string
                maxLength: 10000
              - type: object
                required:
                  - content
                additionalProperties: false
                properties:
                  content:
                    type: string
                    maxLength: 10000
        platform_options:
          type: object
          nullable: true
          additionalProperties:
            type: object
            additionalProperties: true
        auto_reply_enabled:
          type: boolean
        id:
          type: string
          format: uuid
        revision:
          type: integer
          minimum: 1
        status:
          type: string
          enum:
            - draft
            - submitted
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        submission:
          $ref: '#/components/schemas/CreatePostResponse'
    CreatePostResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - queued
        batch_id:
          type: string
        profile_id:
          type: string
          pattern: ^[A-Za-z0-9]{6,32}$
          nullable: true
        jobs:
          type: array
          items:
            type: object
            properties:
              platform:
                $ref: '#/components/schemas/Platform'
              jobId:
                type: string
              platform_post_id:
                type: string
                nullable: true
                description: >-
                  Platform-returned post ID. `null` until the queued job
                  publishes successfully.
              platform_post_url:
                type: string
                nullable: true
                description: >-
                  Public platform post URL when available. `null` until the
                  queued job publishes successfully or when the platform does
                  not expose a URL.
        warnings:
          type: array
          description: >-
            Non-blocking warnings about provider behavior. A queued post may
            still publish.
          items:
            type: object
            properties:
              platform:
                $ref: '#/components/schemas/Platform'
              code:
                type: string
              severity:
                type: string
                enum:
                  - warning
              message:
                type: string
    Platform:
      type: string
      description: Supported publishing platform identifier.
      enum:
        - twitter
        - x
        - facebook
        - instagram
        - linkedin
        - youtube
        - tiktok
        - pinterest
        - reddit
        - threads
        - bluesky
  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.