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

# List domains

> **Endpoint:** `v1/domains`

List all domains associated with your account.




## OpenAPI

````yaml api-reference/openapi.yml get /domains
openapi: 3.1.0
info:
  title: Send Email API
  description: >
    Send transactional emails through MailDiver.


    ### Base URL

    All API endpoints are prefixed with `api.` subdomain:

    ```

    https://api.maildiver.com

    ```


    For the self-hosted version, if your domain is `example.com`:

    ```

    https://api.example.com

    ```


    ### Endpoint

    ```

    v1/emails

    ```


    ### Authentication

    All API requests require authentication using your API key in the
    Authorization header:

    ```

    Authorization: Bearer your-api-key

    ```
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: https://api.maildiver.com/v1
    description: Production server
    variables:
      domain:
        default: yourdomain.com
        description: Your domain (without the api. prefix)
security:
  - bearerAuth: []
paths:
  /domains:
    get:
      tags:
        - Domain
      summary: List domains
      description: |
        **Endpoint:** `v1/domains`

        List all domains associated with your account.
      operationId: listDomains
      parameters:
        - name: cursor
          in: query
          required: false
          description: >
            Pagination cursor. The cursor will always be returned in the
            response:

            - If there are more domains, it will contain the ID of the last
            domain in the current page

            - If there are no more domains, it will be null
          schema:
            type: string
            nullable: true
          example: 01959fc8-f2bf-7231-aa14-69908f79f153
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                success:
                  summary: Success response
                  value:
                    domains:
                      - id: 0195a927-b706-725a-94dd-372770d920f2
                        name: onboarding.maildiver.com
                        verified_for_sending_status: true
                        verification_info:
                          last_checked_timestamp: '2025-03-25T11:16:20.217Z'
                          last_success_timestamp: '2025-03-25T11:16:20.499Z'
                          error_type: HOST_NOT_FOUND
                          soa_record: {}
                        public_key: >-
                          MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC7Zdux3HKFr8FkO6S0E5PKtY2KaAk8iqwKmw3ak9KwvwYExYLmguKGCqQb0jHshR/z1i9DEcSV+3rKoLL3R3Rn7A+Ua0zfJoFwOoOVwSGe9CgZ4geAzuSfo1wNSmaJzbtYZ1dOqSV0sbp8lKCeiLO5eDRIBVMcbULcVJA+/dAQfQIDAQAB
                        status: SUCCESS
                        dns_records:
                          - name: dkim._domainkey.onboarding
                            for: DKIM
                            type: TXT
                            value: >-
                              p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC7Zdux3HKFr8FkO6S0E5PKtY2KaAk8iqwKmw3ak9KwvwYExYLmguKGCqQb0jHshR/z1i9DEcSV+3rKoLL3R3Rn7A+Ua0zfJoFwOoOVwSGe9CgZ4geAzuSfo1wNSmaJzbtYZ1dOqSV0sbp8lKCeiLO5eDRIBVMcbULcVJA+/dAQfQIDAQAB
                            required: true
                          - name: send.onboarding
                            for: MAIL FROM domain
                            type: MX
                            priority: 10
                            value: feedback-smtp.eu-central-1.amazonses.com
                            required: true
                          - name: send.onboarding
                            for: MAIL FROM domain
                            type: TXT
                            value: '"v=spf1 include:amazonses.com ~all"'
                            required: true
                          - name: _dmarc.onboarding
                            for: DMARC (highly recommended)
                            type: TXT
                            value: v=DMARC1; p=none;
                            required: false
                        created: 1742299707142
                        is_warmed_up: false
                        warmed_up_at: null
                        created_by:
                          email: admin@company.com
                          first_name: null
                          last_name: null
                          profile_picture: https://cdn.company.com/profiles/admin-avatar.jpg
                    count: 4
                    cursor: null
        '403':
          description: Forbidden (API key is missing or invalid)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        message:
          type: string
          description: Error description
      description: |
        Error response with message.

        ### Common Errors

        #### 400 Bad Request
        Validation errors return only the error message:
        ```json
        {
          "message": "from field is required"
        }
        ```

        Common validation messages:
        - `"from field is required"`
        - `"to field is required"`
        - `"subject field is required"`
        - `"html content size (42MB) exceeds maximum of 40MB"`
        - `"Too many recipients: 51. Maximum allowed is 50"`
        - `"Invalid email format in from field"`
        - `"template_id cannot be used together with html"`

        #### 403 Forbidden
        Authentication errors include both message and code:
        ```json
        {
          "message": "Invalid API key",
          "code": "invalid_api_key"
        }
        ```
        ```json
        {
          "message": "Invalid authorization header",
          "code": "invalid_authorization_header"
        }
        ```

        #### 404 Not Found
        ```json
        {
          "message": "Template 'welcome-email' not found"
        }
        ```
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key with format "Bearer {your-api-key}"

````