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

# Consultar envio e-mail

> Consulta se foi enviado, entregue ou falhou, e vê os detalhes.



## OpenAPI

````yaml /emails-api/api-reference/openapi-email.json get /v1/email/messages/{id}
openapi: 3.0.3
info:
  title: Notifique API. E-mail
  description: >-
    Envie e-mails, gerencie domínios e consulte status. Autentique com
    `Authorization: Bearer sk_live_...` ou `x-api-key`.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Produção
security:
  - ntfEmailBearerAuth: []
  - ntfEmailApiKeyHeader: []
tags:
  - name: E-mail
    description: Envio e consulta de e-mail
  - name: Domínios
    description: Registro e verificação de domínios para envio de e-mail
paths:
  /v1/email/messages/{id}:
    get:
      tags:
        - E-mail
      summary: Consultar envio e-mail
      description: Consulta se foi enviado, entregue ou falhou, e vê os detalhes.
      operationId: ntfEmail_getV1EmailById
      parameters:
        - name: id
          in: path
          required: true
          description: ID (cuid) do e-mail retornado em POST /v1/email/messages.
          schema:
            type: string
      responses:
        '200':
          description: Dados do e-mail.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfEmail_EmailStatusResponse'
              example:
                success: true
                data:
                  id: clxx123...
                  to: cliente@example.com
                  from: noreply@seudominio.com
                  fromName: Suporte
                  subject: Confirmação
                  status: SENT
                  scheduledFor: null
                  sentAt: '2025-02-16T12:00:00.000Z'
                  deliveredAt: null
                  failedAt: null
                  errorMessage: null
                  createdAt: '2025-02-16T11:59:58.000Z'
        '401':
          description: API Key ausente ou inválida.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfEmail_ErrorResponse'
        '403':
          description: Escopo email:read ausente.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfEmail_ErrorResponse'
        '404':
          description: E-mail não encontrado ou não pertence ao workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfEmail_ErrorResponse'
              example:
                success: false
                error: Not Found
                message: Email not found
                code: NOT_FOUND
components:
  schemas:
    NtfEmail_EmailStatusResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/NtfEmail_EmailListItem'
    NtfEmail_ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: 'Rótulo HTTP do erro (ex.: Unauthorized, Bad Request, Not Found).'
        message:
          type: string
          description: >-
            Mensagem legível para exibir ao usuário (localizada via
            Accept-Language / x-locale quando aplicável).
        code:
          type: string
          description: >-
            Código estável da API v1 (enum). Sempre presente em erros. Use com o
            status HTTP para decidir retry ou correção. Ver [Respostas de
            erro](/guides/conceitos/resposta-de-erros).
        details:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
        data:
          type: object
          description: 'Dados adicionais em alguns erros (ex.: status do e-mail em cancel).'
      required:
        - success
        - error
        - message
        - code
    NtfEmail_EmailListItem:
      type: object
      description: >-
        Metadados de envio retornados na listagem e em GET por ID; a API sempre
        devolve todos estes campos (nullable onde indicado).
      required:
        - id
        - to
        - from
        - fromName
        - subject
        - status
        - scheduledFor
        - sentAt
        - deliveredAt
        - failedAt
        - errorMessage
        - createdAt
      properties:
        id:
          type: string
          description: ID (cuid) do e-mail.
        to:
          type: string
          description: Destinatário.
        from:
          type: string
          description: Remetente (endereço verificado).
        fromName:
          type: string
          nullable: true
        subject:
          type: string
        status:
          type: string
          enum:
            - QUEUED
            - SCHEDULED
            - PROCESSING
            - SENT
            - DELIVERED
            - OPENED
            - CLICKED
            - FAILED
            - CANCELLED
            - COMPLAINED
          description: Status atual do e-mail.
        scheduledFor:
          type: string
          format: date-time
          nullable: true
        sentAt:
          type: string
          format: date-time
          nullable: true
        deliveredAt:
          type: string
          format: date-time
          nullable: true
        failedAt:
          type: string
          format: date-time
          nullable: true
        errorMessage:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
  securitySchemes:
    ntfEmailBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API Key no header Authorization. Exemplo: `Authorization: Bearer
        sk_live_xxxxx`
    ntfEmailApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: 'API Key no header x-api-key. Exemplo: `x-api-key: sk_live_xxxxx`'

````