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

# Validate email address

> Validate an email address with SMTP deliverability validation, disposable domain checks, MX record checks, random input detection, typo suggestions, and credit consumption details.



## OpenAPI

````yaml openapi.json POST /v1/verify
openapi: 3.0.3
info:
  title: MailGlyph API
  description: >-
    Email platform API for transactional emails, campaigns, and marketing
    automation
  version: 1.0.0
  contact:
    name: MailGlyph Support
    url: https://mailglyph.com
servers:
  - url: https://api.mailglyph.com
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Public API
    description: Public API endpoints for sending emails and tracking events
  - name: Events
    description: Event ingestion and querying
  - name: Contacts
    description: Contact management operations
  - name: Templates
    description: Email template management
  - name: Campaigns
    description: Email campaign management
  - name: Segments
    description: Audience segmentation
  - name: Workflows
    description: Workflow automation
paths:
  /v1/verify:
    post:
      tags:
        - Public API
      summary: Validate email address
      description: >-
        Validate an email address, run SMTP deliverability validation when
        available, check disposable and personal domains, verify MX records,
        detect random string patterns, and detect potential typos with
        suggestions.
      operationId: verifyEmail
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - email
              properties:
                email:
                  type: string
                  format: email
                  description: Email address to validate
            examples:
              validEmail:
                summary: Valid email address
                value:
                  email: user@gmail.com
              typoEmail:
                summary: Email with potential typo
                value:
                  email: user@gmial.com
              disposableEmail:
                summary: Disposable email address
                value:
                  email: user@tempmail.com
      responses:
        '200':
          description: Email validation completed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Always true for successful requests
                  data:
                    type: object
                    properties:
                      email:
                        type: string
                        format: email
                        description: Email address that was validated
                      valid:
                        type: boolean
                        description: Whether the email appears to be valid overall
                      validationMethod:
                        type: string
                        enum:
                          - local
                          - smtp
                        description: >-
                          Validation method used for this result. smtp means
                          mailbox-level SMTP validation was attempted.
                      smtpStatus:
                        type: string
                        enum:
                          - Valid
                          - Invalid
                          - Unknown
                          - Catch All
                          - Grey-listed
                        description: >-
                          Mailbox-level SMTP validation status when SMTP
                          validation is available.
                        nullable: true
                      smtpDiagnosis:
                        type: string
                        description: >-
                          Human-readable SMTP validation diagnosis when
                          available.
                        nullable: true
                      isDisposable:
                        type: boolean
                        description: >-
                          Whether the email is from a disposable/temporary email
                          domain
                      isAlias:
                        type: boolean
                        description: Whether the email is from a forwarding/alias service
                      isTypo:
                        type: boolean
                        description: >-
                          Whether a potential typo was detected in the email
                          address
                      isPlusAddressed:
                        type: boolean
                        description: >-
                          Whether the email uses plus addressing (contains a +
                          in the local part)
                      isRandomInput:
                        type: boolean
                        description: >-
                          Whether the local-part appears randomly generated
                          (token/UUID-like patterns)
                      isPersonalEmail:
                        type: boolean
                        description: >-
                          Whether the email is from a personal/free email
                          provider (Gmail, Hotmail, Yahoo, etc.)
                      isCatchAll:
                        type: boolean
                        description: >-
                          Whether SMTP validation detected a catch-all domain
                          where the exact mailbox cannot be fully verified
                      isGreylisted:
                        type: boolean
                        description: >-
                          Whether SMTP validation was temporarily deferred by
                          greylisting
                      domainExists:
                        type: boolean
                        description: Whether the domain exists in DNS (has NS records)
                      hasWebsite:
                        type: boolean
                        description: >-
                          Whether the domain has a website (has DNS A or AAAA
                          records) - informational only
                      hasMxRecords:
                        type: boolean
                        description: >-
                          Whether the domain has MX records configured for email
                          delivery
                      suggestedEmail:
                        type: string
                        format: email
                        description: Suggested correction if a typo was detected (optional)
                        nullable: true
                      reasons:
                        type: array
                        items:
                          type: string
                        description: >-
                          Array of human-readable reasons describing the
                          validation results
                      creditsConsumed:
                        type: integer
                        minimum: 0
                        maximum: 1
                        description: >-
                          Net email validation credits consumed by this request.
                          Valid, Invalid, Catch All, and Grey-listed results
                          consume 1 credit. Unknown results consume 0 credits
                          after automatic refund.
                        example: 1
                    required:
                      - email
                      - valid
                      - validationMethod
                      - isDisposable
                      - isAlias
                      - isTypo
                      - isPlusAddressed
                      - isRandomInput
                      - isPersonalEmail
                      - isCatchAll
                      - isGreylisted
                      - domainExists
                      - hasWebsite
                      - hasMxRecords
                      - reasons
              examples:
                validEmail:
                  summary: Valid email result
                  value:
                    success: true
                    data:
                      email: user@gmail.com
                      valid: true
                      validationMethod: smtp
                      smtpStatus: Valid
                      smtpDiagnosis: Mailbox exists and can receive mail.
                      creditsConsumed: 1
                      isDisposable: false
                      isAlias: false
                      isTypo: false
                      isPlusAddressed: false
                      isRandomInput: false
                      isPersonalEmail: true
                      isCatchAll: false
                      isGreylisted: false
                      domainExists: true
                      hasWebsite: true
                      hasMxRecords: true
                      reasons: []
                unknownEmail:
                  summary: Unknown result with refunded credit
                  value:
                    success: true
                    data:
                      email: user@example.com
                      valid: false
                      validationMethod: smtp
                      smtpStatus: Unknown
                      smtpDiagnosis: The mailbox could not be confirmed.
                      creditsConsumed: 0
                      isDisposable: false
                      isAlias: false
                      isTypo: false
                      isPlusAddressed: false
                      isRandomInput: false
                      isPersonalEmail: false
                      isCatchAll: false
                      isGreylisted: false
                      domainExists: true
                      hasWebsite: true
                      hasMxRecords: true
                      reasons:
                        - Mailbox could not be confirmed
        '400':
          description: Bad request - invalid email format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: The project does not have an available email validation credit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: BILLING_LIMIT_EXCEEDED
                  message: >-
                    Email validation credits are required to validate email
                    addresses.
                  details:
                    reason: insufficient_verification_credits
components:
  schemas:
    Error:
      type: object
      properties:
        code:
          type: integer
        error:
          type: string
        message:
          type: string
        time:
          type: integer
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API Key authentication. **Secret keys (sk_*)** are required for all
        endpoints except `/v1/track`. **Public keys (pk_*)** only work with the
        `/v1/track` endpoint for client-side event tracking. Workspaces can have
        multiple active keys, and sender-domain operations enforce per-key
        domain scope when configured.

````

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