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

# List message attachments

> List the stored file attachments for an email message and get a short-lived signed `downloadUrl` for each. Works for both inbound emails (received via `message.inbound`) and outbound emails you sent with attachments. Messages without stored attachments (including SMS, WhatsApp, and other channels) return an empty list. Each `downloadUrl` is generated fresh per request and expires — fetch the file promptly and do not cache the URL.



## OpenAPI

````yaml /openapi.json get /v1/messages/{messageId}/attachments
openapi: 3.0.3
info:
  title: Zavu Unified Messaging Layer API
  version: 0.2.0
  description: >
    Unified multi-channel messaging API for Zavu.


    Supported channels:

    - **SMS**: Simple text messages

    - **WhatsApp**: Rich messaging with media, buttons, lists, CTA URL buttons,
    and templates

    - **Telegram**: Bot messaging with text, media, and interactive elements

    - **Email**: Transactional emails via Amazon SES


    Design goals:

    - Simple `send()` entrypoint for developers

    - Project-level authentication via Bearer token

    - Support for all WhatsApp message types (text, image, video, audio,
    document, sticker, location, contact, buttons, list, cta_url, reaction,
    template)

    - If a non-text message type is sent, WhatsApp channel is used automatically

    - 24-hour WhatsApp conversation window enforcement

    - Universal `to` field accepts phone numbers (E.164), email addresses, or
    numeric chat IDs (Telegram/Instagram/Messenger)
servers:
  - url: https://api.zavu.dev
security:
  - bearerAuth: []
paths:
  /v1/messages/{messageId}/attachments:
    get:
      summary: List message attachments
      description: >-
        List the stored file attachments for an email message and get a
        short-lived signed `downloadUrl` for each. Works for both inbound emails
        (received via `message.inbound`) and outbound emails you sent with
        attachments. Messages without stored attachments (including SMS,
        WhatsApp, and other channels) return an empty list. Each `downloadUrl`
        is generated fresh per request and expires — fetch the file promptly and
        do not cache the URL.
      operationId: listMessageAttachments
      parameters:
        - $ref: '#/components/parameters/MessageIdParam'
      responses:
        '200':
          description: List of attachments.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageAttachmentsResponse'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Message not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  parameters:
    MessageIdParam:
      name: messageId
      in: path
      required: true
      schema:
        type: string
  schemas:
    MessageAttachmentsResponse:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/MessageAttachment'
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: invalid_request
        message:
          type: string
          example: Phone number is invalid
        details:
          type: object
          additionalProperties: true
    MessageAttachment:
      type: object
      description: A stored file attachment for an email message (inbound or outbound).
      required:
        - id
        - filename
        - mimeType
        - size
        - contentId
        - isInline
        - downloadUrl
        - createdAt
      properties:
        id:
          type: string
          example: jd7x2k3m4n5p6q7r8s9t0
        filename:
          type: string
          example: invoice.pdf
        mimeType:
          type: string
          description: MIME type of the attachment.
          example: application/pdf
        size:
          type: integer
          description: Size of the attachment in bytes.
          example: 102400
        contentId:
          type: string
          nullable: true
          description: >-
            Content-ID for inline attachments (referenced in the HTML body as
            `cid:<contentId>`). Null for regular attachments.
          example: logo
        isInline:
          type: boolean
          description: >-
            Whether the attachment is inline (embedded in the HTML body) rather
            than a regular attachment.
        downloadUrl:
          type: string
          format: uri
          nullable: true
          description: >-
            Short-lived signed URL to download the attachment bytes. Freshly
            generated on each request and expires; do not cache it. Null if the
            stored file is no longer available.
        createdAt:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````