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

# List Drafts

> Lists unsent drafts in one inbox.

Lists unsent drafts in one inbox. Returns `count`, `limit`, `next_page_token` and `drafts`; page with `next_page_token`. Each draft carries `draft_id`, `labels`, `to`, `cc`, `bcc`, `subject`, `preview`, `attachments`, `in_reply_to`, `send_status`, `send_at` and `updated_at`. List items carry `preview` only — `text` and `html` come from `get_agentmail_inbox_draft`. Drafts are not sent until `post_agentmail_inbox_draft_send`. The account-wide view is `get_agentmail_drafts`.

## Example

<CodeGroup>
  ```bash REST theme={null}
  curl -X GET "https://api.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/drafts" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```jsonc MCP theme={null}
  // Copy this whole block into Claude Code, Codex, Cursor or any coding agent.
  // It carries everything needed to connect, authorize and run this example —
  // no key to paste, one click of Allow in the browser.
  {
    "operation_id": "get_agentmail_inbox_drafts",
    "arguments": {},
    "max_price_usd": 0.05
  }
  // ── for the agent ─────────────────────────────────────────────────────────
  // Register the AIsa MCP server, then call its `use` tool with the JSON above.
  //   name       aisa
  //   endpoint   https://mcp.aisa.one/mcp
  //   transport  streamable-http
  //   auth       OAuth. The server publishes RFC 9728 metadata, so open a
  //              browser and the user clicks Allow once — nothing to paste.
  //              If AISA_API_KEY is set, send it as a bearer header instead.
  // Use your own MCP mechanism, not a hand-edited config file:
  //   Codex        codex mcp add aisa --url https://mcp.aisa.one/mcp
  //   Claude Code  claude mcp add --transport http -s user aisa https://mcp.aisa.one/mcp
  //   Cursor / VS Code   a "url" entry for https://mcp.aisa.one/mcp in the MCP config
  // The server lists five tools over https://mcp.aisa.one/servers worth of APIs:
  // search, get_details, use, batch_use, list_categories. search and
  // get_details are free; use is billed per call and max_price_usd refuses
  // anything above the cap before spending. This operation's full contract —
  // every argument, the response shape, the price and the pitfalls — is at
  //   https://aisa.one/docs/api-reference/agentmail/get_agentmail-inboxes-inbox-id-drafts.md
  // Then run the call and show me the result.
  ```
</CodeGroup>

<Note>
  **First time?** Point any MCP client at `https://mcp.aisa.one/mcp` — Claude
  Code, Codex, Cursor, VS Code and the rest. Authorization is OAuth: the client
  opens a browser, you click Allow once, and there is no key to paste. The
  commands per client, and what each call costs, are on
  [aisa.one/mcp](https://aisa.one/mcp#connect).
</Note>

[Set this endpoint up in your agent →](https://aisa.one/mcp?from=/api-reference/agentmail/get_agentmail-inboxes-inbox-id-drafts)


## OpenAPI

````yaml openapi/agentmail.json GET /agentmail/inboxes/{inbox_id}/drafts
openapi: 3.1.0
info:
  title: AgentMail API
  version: 1.0.0
  description: >-
    AgentMail email API endpoints exposed through the AIsa unified gateway.
    Adapted from the upstream docs.agentmail.to OpenAPI spec.
servers:
  - url: https://api.aisa.one/apis/v1
security:
  - Bearer: []
paths:
  /agentmail/inboxes/{inbox_id}/drafts:
    get:
      tags:
        - subpackage_inboxes.subpackage_inboxes/drafts
      summary: List Drafts
      description: >-
        Lists unsent drafts in one inbox. Returns `count`, `limit`,
        `next_page_token` and `drafts`; page with `next_page_token`. Each draft
        carries `draft_id`, `labels`, `to`, `cc`, `bcc`, `subject`, `preview`,
        `attachments`, `in_reply_to`, `send_status`, `send_at` and `updated_at`.
        List items carry `preview` only — `text` and `html` come from
        `get_agentmail_inbox_draft`. Drafts are not sent until
        `post_agentmail_inbox_draft_send`. The account-wide view is
        `get_agentmail_drafts`.
      operationId: get_agentmail_inbox_drafts
      parameters:
        - name: inbox_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/type_inboxes_InboxId'
        - name: limit
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/type__Limit'
        - name: page_token
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/type__PageToken'
        - name: labels
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/type__Labels'
        - name: before
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/type__Before'
        - name: after
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/type__After'
        - name: ascending
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/type__Ascending'
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_drafts_ListDraftsResponse'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
components:
  schemas:
    type_inboxes_InboxId:
      type: string
      description: The ID of the inbox.
      title: InboxId
    type__Limit:
      type: integer
      description: Limit of number of items returned.
      title: Limit
    type__PageToken:
      type: string
      description: Page token for pagination.
      title: PageToken
    type__Labels:
      type: array
      items:
        type: string
      description: Labels to filter by.
      title: Labels
    type__Before:
      type: string
      format: date-time
      description: Timestamp before which to filter by.
      title: Before
    type__After:
      type: string
      format: date-time
      description: Timestamp after which to filter by.
      title: After
    type__Ascending:
      type: boolean
      description: Sort in ascending temporal order.
      title: Ascending
    type_drafts_ListDraftsResponse:
      type: object
      properties:
        count:
          $ref: '#/components/schemas/type__Count'
        limit:
          $ref: '#/components/schemas/type__Limit'
        next_page_token:
          $ref: '#/components/schemas/type__PageToken'
        drafts:
          type: array
          items:
            $ref: '#/components/schemas/type_drafts_DraftItem'
          description: Ordered by `updated_at` descending.
      required:
        - count
        - drafts
      title: ListDraftsResponse
    type__ErrorResponse:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/type__ErrorName'
        message:
          $ref: '#/components/schemas/type__ErrorMessage'
      required:
        - name
        - message
      title: ErrorResponse
    type__Count:
      type: integer
      description: Number of items returned.
      title: Count
    type_drafts_DraftItem:
      type: object
      properties:
        inbox_id:
          $ref: '#/components/schemas/type_inboxes_InboxId'
        draft_id:
          $ref: '#/components/schemas/type_drafts_DraftId'
        labels:
          $ref: '#/components/schemas/type_drafts_DraftLabels'
        to:
          $ref: '#/components/schemas/type_drafts_DraftTo'
        cc:
          $ref: '#/components/schemas/type_drafts_DraftCc'
        bcc:
          $ref: '#/components/schemas/type_drafts_DraftBcc'
        subject:
          $ref: '#/components/schemas/type_drafts_DraftSubject'
        preview:
          $ref: '#/components/schemas/type_drafts_DraftPreview'
        attachments:
          $ref: '#/components/schemas/type_drafts_DraftAttachments'
        in_reply_to:
          $ref: '#/components/schemas/type_drafts_DraftInReplyTo'
        send_status:
          $ref: '#/components/schemas/type_drafts_DraftSendStatus'
        send_at:
          $ref: '#/components/schemas/type_drafts_DraftSendAt'
        updated_at:
          $ref: '#/components/schemas/type_drafts_DraftUpdatedAt'
      required:
        - inbox_id
        - draft_id
        - labels
        - updated_at
      title: DraftItem
    type__ErrorName:
      type: string
      description: Name of error.
      title: ErrorName
    type__ErrorMessage:
      type: string
      description: Error message.
      title: ErrorMessage
    type_drafts_DraftId:
      type: string
      description: ID of draft.
      title: DraftId
    type_drafts_DraftLabels:
      type: array
      items:
        type: string
      description: Labels of draft.
      title: DraftLabels
    type_drafts_DraftTo:
      type: array
      items:
        type: string
      description: >-
        Addresses of recipients. In format `username@domain.com` or `Display
        Name <username@domain.com>`.
      title: DraftTo
    type_drafts_DraftCc:
      type: array
      items:
        type: string
      description: >-
        Addresses of CC recipients. In format `username@domain.com` or `Display
        Name <username@domain.com>`.
      title: DraftCc
    type_drafts_DraftBcc:
      type: array
      items:
        type: string
      description: >-
        Addresses of BCC recipients. In format `username@domain.com` or `Display
        Name <username@domain.com>`.
      title: DraftBcc
    type_drafts_DraftSubject:
      type: string
      description: Subject of draft.
      title: DraftSubject
    type_drafts_DraftPreview:
      type: string
      description: Text preview of draft.
      title: DraftPreview
    type_drafts_DraftAttachments:
      type: array
      items:
        $ref: '#/components/schemas/type_attachments_Attachment'
      description: Attachments in draft.
      title: DraftAttachments
    type_drafts_DraftInReplyTo:
      type: string
      description: ID of message being replied to.
      title: DraftInReplyTo
    type_drafts_DraftSendStatus:
      type: string
      enum:
        - scheduled
        - sending
        - failed
      description: Schedule send status of draft.
      title: DraftSendStatus
    type_drafts_DraftSendAt:
      type: string
      format: date-time
      description: Time at which to schedule send draft.
      title: DraftSendAt
    type_drafts_DraftUpdatedAt:
      type: string
      format: date-time
      description: Time at which draft was last updated.
      title: DraftUpdatedAt
    type_attachments_Attachment:
      type: object
      properties:
        attachment_id:
          $ref: '#/components/schemas/type_attachments_AttachmentId'
        filename:
          $ref: '#/components/schemas/type_attachments_AttachmentFilename'
        size:
          $ref: '#/components/schemas/type_attachments_AttachmentSize'
        content_type:
          $ref: '#/components/schemas/type_attachments_AttachmentContentType'
        content_disposition:
          $ref: '#/components/schemas/type_attachments_AttachmentContentDisposition'
        content_id:
          $ref: '#/components/schemas/type_attachments_AttachmentContentId'
      required:
        - attachment_id
        - size
      title: Attachment
    type_attachments_AttachmentId:
      type: string
      description: ID of attachment.
      title: AttachmentId
    type_attachments_AttachmentFilename:
      type: string
      description: Filename of attachment.
      title: AttachmentFilename
    type_attachments_AttachmentSize:
      type: integer
      description: Size of attachment in bytes.
      title: AttachmentSize
    type_attachments_AttachmentContentType:
      type: string
      description: Content type of attachment.
      title: AttachmentContentType
    type_attachments_AttachmentContentDisposition:
      type: string
      enum:
        - inline
        - attachment
      description: Content disposition of attachment.
      title: AttachmentContentDisposition
    type_attachments_AttachmentContentId:
      type: string
      description: Content ID of attachment.
      title: AttachmentContentId
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````

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