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

# List email drafts

> List unsent drafts across the organisation, newest first. Scoped API keys see only drafts assigned to inboxes within their scope. Drafts are separate from sent messages and threads.



## OpenAPI

````yaml https://api.openmail.sh/openapi.json get /v1/drafts
openapi: 3.0.3
info:
  title: OpenMail API
  description: >-
    Email infrastructure API for AI agents. Create inboxes, send and receive
    email, and get real-time notifications via webhooks.
  version: 1.0.0
  license:
    name: Proprietary
servers:
  - url: https://api.openmail.sh
security:
  - bearerAuth: []
tags:
  - name: pods
    description: Isolated sub-accounts for your end users or tenants
  - name: inboxes
    description: Email inboxes and their webhook configuration
  - name: domains
    description: >-
      Custom domains: add your own sending/receiving domain, publish DNS, and
      verify it
  - name: owned-domains
    description: >-
      Domains your organisation controls but does not send from. Prove ownership
      with one TXT record and mail to their addresses stops counting toward the
      cold outreach limits.
  - name: messages
    description: Sending and listing messages
  - name: drafts
    description: Create, view, edit and send saved email drafts
  - name: threads
    description: Conversation threads and read status
  - name: attachments
    description: Downloading and extracting text from attachments
  - name: policy
    description: >-
      Correspondent policy — provider-enforced allow/block rules and allowlist
      mode, scoped per account, pod, or inbox. Account-wide key only.
  - name: limits
    description: >-
      Sending limits: today's cold outreach caps on new recipients, per account,
      inbox, and domain, and what raises them
  - name: webhooks
    description: >-
      Webhook endpoints: where events are sent, how each request is
      authenticated, and the delivery log. Account-wide key only.
  - name: feedback
    description: Reporting bugs, friction, and feature requests to the OpenMail team
paths:
  /v1/drafts:
    get:
      tags:
        - drafts
      summary: List email drafts
      description: >-
        List unsent drafts across the organisation, newest first. Scoped API
        keys see only drafts assigned to inboxes within their scope. Drafts are
        separate from sent messages and threads.
      operationId: listDrafts
      parameters:
        - schema:
            type: string
            minLength: 1
          in: query
          name: inboxId
          required: false
          description: Filter by sending inbox.
        - schema:
            type: string
            minLength: 1
          in: query
          name: sourceThreadId
          required: false
          description: Filter by the conversation the draft was composed from.
        - schema:
            type: string
            minLength: 1
          in: query
          name: podId
          required: false
          description: Filter by the pod containing the sending inbox.
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
          in: query
          name: limit
          required: false
        - schema:
            type: integer
            minimum: 0
            default: 0
          in: query
          name: offset
          required: false
        - schema:
            type: string
            maxLength: 1000
          in: query
          name: q
          required: false
          description: Search draft subject, recipient, and plain-text body.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - total
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - inboxId
                        - to
                        - cc
                        - bcc
                        - subject
                        - bodyText
                        - bodyHtml
                        - createdAt
                        - updatedAt
                      properties:
                        id:
                          type: string
                        inboxId:
                          type: string
                        threadId:
                          type: string
                          description: Thread this draft will reply to when sent.
                          nullable: true
                        sourceThreadId:
                          type: string
                          description: Conversation this draft was composed from.
                          nullable: true
                        attachments:
                          type: array
                          items:
                            type: object
                            required:
                              - filename
                              - contentType
                              - sizeBytes
                            properties:
                              filename:
                                type: string
                              contentType:
                                type: string
                              sizeBytes:
                                type: integer
                              contentId:
                                type: string
                                description: >-
                                  Identifier referenced by cid: in bodyHtml for
                                  an inline attachment.
                              url:
                                type: string
                        to:
                          type: string
                          nullable: true
                        cc:
                          type: array
                          items:
                            type: string
                        bcc:
                          type: array
                          items:
                            type: string
                        subject:
                          type: string
                        bodyText:
                          type: string
                          nullable: true
                        bodyHtml:
                          type: string
                          nullable: true
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                  total:
                    type: integer
        '400':
          description: Invalid draft or pagination
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, invalid, or expired credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Inbox is outside the API key scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Inbox or draft not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      additionalProperties: true
      properties:
        error:
          type: string
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````

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