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

# Получить результаты

> Возвращает текущий статус проверки и результаты по каждому аккаунту.

Опрашивайте каждые 5–15 секунд, пока `status` не станет `complete` или `timeout`.

Категории `primary` и `updates` считаются попаданием во **Входящие (Inbox)**. Остальные категории (`promotions`, `social`, `forums`, `spam`, `trash`) — нет.



## OpenAPI

````yaml /openapi.json get /api/spam-check/{check_id}
openapi: 3.1.0
info:
  title: Taimly Spam Check API
  version: 1.0.0
  description: >-
    API для проверки доставляемости email. Определяет, куда попадает ваше
    письмо: во Входящие, Спам, Промоакции или другие категории Gmail.
servers:
  - url: https://taimly.net
    description: Production
security:
  - BearerAuth: []
paths:
  /api/spam-check/{check_id}:
    get:
      tags:
        - Spam Check
      summary: Получить результаты
      description: >-
        Возвращает текущий статус проверки и результаты по каждому аккаунту.


        Опрашивайте каждые 5–15 секунд, пока `status` не станет `complete` или
        `timeout`.


        Категории `primary` и `updates` считаются попаданием во **Входящие
        (Inbox)**. Остальные категории (`promotions`, `social`, `forums`,
        `spam`, `trash`) — нет.
      operationId: getSpamCheckResult
      parameters:
        - name: check_id
          in: path
          required: true
          description: Идентификатор проверки из ответа `POST /api/spam-check/start`
          schema:
            type: string
            example: a1b2c3d4e5f6
      responses:
        '200':
          description: Результаты проверки
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpamCheckResultResponse'
              examples:
                pending:
                  summary: Проверка в процессе
                  value:
                    check_id: a1b2c3d4e5f6
                    status: pending
                    received: 2
                    total: 5
                    results:
                      - email: inbox1@gmail.com
                        category: primary
                      - email: inbox2@gmail.com
                        category: spam
                      - email: inbox3@gmail.com
                        category: pending
                      - email: inbox4@gmail.com
                        category: pending
                      - email: inbox5@gmail.com
                        category: pending
                complete:
                  summary: Проверка завершена
                  value:
                    check_id: a1b2c3d4e5f6
                    status: complete
                    received: 5
                    total: 5
                    results:
                      - email: inbox1@gmail.com
                        category: primary
                      - email: inbox2@gmail.com
                        category: primary
                      - email: inbox3@gmail.com
                        category: updates
                      - email: inbox4@gmail.com
                        category: spam
                      - email: inbox5@gmail.com
                        category: promotions
                timeout:
                  summary: Таймаут (5 минут)
                  value:
                    check_id: a1b2c3d4e5f6
                    status: timeout
                    received: 3
                    total: 5
                    results:
                      - email: inbox1@gmail.com
                        category: primary
                      - email: inbox2@gmail.com
                        category: primary
                      - email: inbox3@gmail.com
                        category: spam
                      - email: inbox4@gmail.com
                        category: pending
                      - email: inbox5@gmail.com
                        category: pending
        '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: Check not found or expired
components:
  schemas:
    SpamCheckResultResponse:
      type: object
      required:
        - check_id
        - status
        - received
        - total
        - results
      properties:
        check_id:
          type: string
          description: Идентификатор проверки
          example: a1b2c3d4e5f6
        status:
          type: string
          enum:
            - pending
            - complete
            - timeout
          description: >-
            `pending` — ожидание писем, `complete` — все получены, `timeout` —
            прошло более 5 минут
        received:
          type: integer
          description: Количество аккаунтов, получивших письмо
          example: 3
        total:
          type: integer
          description: Общее количество тестовых аккаунтов
          example: 5
        results:
          type: array
          description: Результаты по каждому аккаунту
          items:
            $ref: '#/components/schemas/AccountResult'
    ErrorResponse:
      type: object
      properties:
        detail:
          type: string
          description: Описание ошибки
    AccountResult:
      type: object
      required:
        - email
        - category
      properties:
        email:
          type: string
          format: email
          description: Email тестового аккаунта
          example: inbox1@gmail.com
        category:
          type: string
          enum:
            - primary
            - spam
            - promotions
            - updates
            - social
            - forums
            - trash
            - unknown
            - pending
          description: >-
            Категория Gmail. `primary` и `updates` = Inbox. `pending` = письмо
            ещё не получено.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API-ключ. Передаётся в заголовке `Authorization: Bearer <ваш_ключ>`.
        Ключ выдаётся администратором Taimly.

````