> ## 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.

# Получить письмо

> Письмо целиком: текст, HTML, заголовки и список вложений. Письмо отмечается прочитанным.



## OpenAPI

````yaml /openapi.json get /api/mail/messages/{message_id}
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}:
    get:
      tags:
        - Временные почты
      summary: Получить письмо
      description: >-
        Письмо целиком: текст, HTML, заголовки и список вложений. Письмо
        отмечается прочитанным.
      operationId: getMessage
      parameters:
        - name: message_id
          in: path
          required: true
          description: '`id` письма'
          schema:
            type: string
            example: 9f2c4e1a7b3d5f60
      responses:
        '200':
          description: Письмо
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageFull'
              example:
                id: 9f2c4e1a7b3d5f60
                to: anna.smith42+github@example.com
                from_name: GitHub
                from_email: noreply@github.com
                subject: '[GitHub] Please verify your device'
                intro: 'Verification code: 482913. If you did not attempt to sign in…'
                code: '482913'
                has_attachments: false
                size: 14820
                seen: true
                received_at: '2026-10-26T12:03:41Z'
                text: |-
                  Verification code: 482913

                  If you did not attempt to sign in…
                html: <html>…</html>
                reply_to: []
                cc: []
                attachments: []
                headers:
                  - name: From
                    value: GitHub <noreply@github.com>
                  - name: Subject
                    value: '[GitHub] Please verify your device'
        '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'
              example:
                detail: Message not found
components:
  schemas:
    MessageFull:
      allOf:
        - $ref: '#/components/schemas/Message'
        - type: object
          properties:
            text:
              type:
                - string
                - 'null'
              description: >-
                Текст письма. Если в письме только HTML — текст, извлечённый из
                него
            html:
              type:
                - string
                - 'null'
              description: HTML письма как есть
            reply_to:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: Имя (может быть пустым)
                  address:
                    type: string
                    format: email
              description: Reply-To
            cc:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: Имя (может быть пустым)
                  address:
                    type: string
                    format: email
              description: Копия (Cc)
            attachments:
              type: array
              description: Вложения
              items:
                type: object
                properties:
                  index:
                    type: integer
                    description: >-
                      Номер для [Скачать
                      вложение](/api-reference/mail/get-attachment)
                  filename:
                    type: string
                  content_type:
                    type: string
                  size:
                    type: integer
                    description: Размер в байтах
            headers:
              type: array
              description: Все заголовки письма по порядку
              items:
                type: object
                properties:
                  name:
                    type: string
                  value:
                    type: string
    ErrorResponse:
      type: object
      properties:
        detail:
          type: string
          description: Описание ошибки
    Message:
      type: object
      properties:
        id:
          type: string
          description: Идентификатор письма
        to:
          type:
            - string
            - 'null'
          description: Адрес, на который пришло письмо, вместе с `+тегом`
        from_name:
          type:
            - string
            - 'null'
          description: Имя отправителя
        from_email:
          type:
            - string
            - 'null'
          description: Адрес отправителя
        subject:
          type: string
          description: Тема
        intro:
          type: string
          description: Начало текста письма
        code:
          type:
            - string
            - 'null'
          description: >-
            Код подтверждения, если он найден в письме. `null` — кода нет или он
            не распознан
        has_attachments:
          type: boolean
          description: Есть ли вложения
        size:
          type: integer
          description: Размер оригинала в байтах
        seen:
          type: boolean
          description: Прочитано ли письмо
        received_at:
          type: string
          format: date-time
          description: Когда получено (UTC)
  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.