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

# Get attachment

> Returns a 302 redirect to a signed URL for the attachment.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/attachments/{messageId}/{filename}
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: []
paths:
  /v1/attachments/{messageId}/{filename}:
    get:
      summary: Get attachment
      description: Returns a 302 redirect to a signed URL for the attachment.
      operationId: getAttachment
      parameters:
        - name: messageId
          in: path
          required: true
          schema:
            type: string
        - name: filename
          in: path
          required: true
          schema:
            type: string
      responses:
        '302':
          description: Redirect to attachment URL
        '404':
          description: Attachment not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````