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

# List domains

> Fetch a list of all domains associated with this API key.




## OpenAPI

````yaml /inbound/api-reference/openapi.yaml get /domains
openapi: 3.0.3
info:
  title: Inbound API
  description: |
    Manage domains for MailChannels Inbound.

    ### Rate Limits
    This API is limited to 100 queries per second, per customer.
    Queries that exceed this rate may be rejected with the
    `503 Service Temporarily Unavailable` HTTP response.
  version: 1.3.0
servers:
  - url: https://api.mailchannels.net/inbound/v1
security:
  - APIKeyHeader: []
tags:
  - name: Domains
  - name: Lists
  - name: Recipients
  - name: Login links
  - name: Reporting
  - name: Account
paths:
  /domains:
    get:
      tags:
        - Domains
      summary: List domains
      description: |
        Fetch a list of all domains associated with this API key.
      parameters:
        - name: domains
          description: >
            A list of domains to fetch.  If this parameter is present, only
            domains whose

            name matches an item in this list are returned.
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              format: hostname
        - name: limit
          description: |
            The maximum number of domains included in the response.
            If not specified, defaults to 10.
          in: query
          required: false
          schema:
            type: integer
            format: int32
            maximum: 5000
        - name: offset
          description: >-
            Offset into the list of domains to return. If not specified,
            defaults to 0.
          in: query
          required: false
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: Successfully found the domain
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDomainsResponse'
        '400':
          description: >
            Bad Request, returned in the case that an error occurs while
            converting an A-label domain to a U-label domain name.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    GetDomainsResponse:
      required:
        - domains
        - total
      properties:
        domains:
          description: A list of domains
          type: array
          items:
            $ref: '#/components/schemas/Domain'
        total:
          description: >
            The total number of domains that are accessible with the given API
            key

            that match the list of domains in the 'domains' parameter.  If there
            is

            no 'domains' parameter, this field is the total number of domains
            that

            are accessible with with this API key.  A domain is accessible with
            a

            given API key if it is associated with that API key, or if it is not

            associated with any API key.
          type: integer
          format: int32
    ErrorResponse:
      required:
        - errors
      properties:
        code:
          type: integer
        message:
          type: string
        errors:
          type: array
          items:
            type: string
    Domain:
      required:
        - domain
        - subscriptionHandle
        - admins
        - aliases
        - downstreamAddresses
      properties:
        domain:
          description: The domain name.
          type: string
          format: hostname
        subscriptionHandle:
          description: >
            The subscription 'handle' that identifies the subscription that this
            domain should be

            provisioned against.  Subscription handles can be retrieved from the
            `/subscriptions`

            endpoint.
          type: string
        settings:
          $ref: '#/components/schemas/DomainSettings'
        admins:
          description: A list of email addresses that are the domain admins for the domain.
          type: array
          items:
            type: string
        downstreamAddresses:
          description: |
            The locations of mail servers to which messages will be delivered
            after filtering.
          type: array
          items:
            $ref: '#/components/schemas/DownstreamAddress'
        aliases:
          description: >
            A list of aliases for the domain. Mail is accepted for these domains
            and

            routed to the downstreamAddresses defined for the domain.
          type: array
          items:
            type: string
    DomainSettings:
      properties:
        abusePolicy:
          description: The abuse policy
          type: string
          enum:
            - block
            - flag
            - quarantine
          nullable: true
          minLength: 1
        abusePolicyOverride:
          description: If true, this abuse policy overrides the recipient abuse policy.
          nullable: true
          type: boolean
        spamHeaderName:
          description: The spam header name to use if the abuse policy is set to 'flag'.
          type: string
          nullable: true
          minLength: 1
        spamHeaderValue:
          description: The spam header value to use if the abuse policy is set to 'flag'.
          type: string
          nullable: true
          minLength: 1
    DownstreamAddress:
      type: object
      required:
        - priority
        - weight
        - port
        - target
      properties:
        priority:
          description: >
            The priority of the dowsntream address.  Only addresses with the
            highest priority (the lowest numerical

            value) are selected.
          type: integer
          minimum: 0
        weight:
          description: >
            Downstream addresses are selected in proportion to their weights. 
            For example, if there are two

            downstream addresses, A with weight 40, and B with weight 10, then A
            is selected 80% of the time

            and B is selected 20% of the time.
          type: integer
          minimum: 0
        port:
          description: TCP port on which the downstream mail server is listening.
          type: integer
          minimum: 0
        target:
          description: >-
            The canonical hostname of the host providing the service, ending in
            a dot.
          type: string
          maxLength: 255
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````