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

# Скачать вложение

> Файл вложения. `index` — из списка `attachments` письма.



## OpenAPI

````yaml /openapi.json get /api/mail/messages/{message_id}/attachments/{index}
openapi: 3.1.0
info:
  title: Taimly API
  version: 1.3.0
  description: >-
    API Taimly: проверка доставляемости email (Spam Check) и временные почты для
    приёма писем.
servers:
  - url: https://taimly.net
    description: Production
security:
  - BearerAuth: []
paths:
  /api/mail/messages/{message_id}/attachments/{index}:
    get:
      tags:
        - Временные почты
      summary: Скачать вложение
      description: Файл вложения. `index` — из списка `attachments` письма.
      operationId: getAttachment
      parameters:
        - name: message_id
          in: path
          required: true
          description: '`id` письма'
          schema:
            type: string
            example: 9f2c4e1a7b3d5f60
        - name: index
          in: path
          required: true
          description: '`index` вложения из `attachments`'
          schema:
            type: integer
            minimum: 0
            example: 0
      responses:
        '200':
          description: Файл вложения
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '401':
          description: Невалидный или отсутствующий API-ключ
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                detail: Invalid or missing API key
        '404':
          description: Письмо или вложение не найдено
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                no_message:
                  summary: Письмо не найдено
                  value:
                    detail: Message not found
                no_attachment:
                  summary: Вложение не найдено
                  value:
                    detail: Attachment not found
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        detail:
          type: string
          description: Описание ошибки
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API-ключ. Передаётся в заголовке `Authorization: Bearer <ваш_ключ>`.
        Ключ выдаётся администратором Taimly.

````

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