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

# Update domain settings

> Update the abuse policy settings (these settings determine how spam messages are handled),
downstream addresses, admins and aliases for a domain.




## OpenAPI

````yaml /inbound/api-reference/openapi.yaml put /domains/{domain}/settings
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/{domain}/settings:
    put:
      tags:
        - Domains
      summary: Update domain settings
      description: >
        Update the abuse policy settings (these settings determine how spam
        messages are handled),

        downstream addresses, admins and aliases for a domain.
      parameters:
        - name: domain
          description: The domain name.
          in: path
          required: true
          schema:
            type: string
            format: hostname
      requestBody:
        description: >
          The abuse policy settings, downstream addresses, admins and aliases
          for the domains.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompleteDomainSettings'
      responses:
        '200':
          description: The domain settings were successfully updated
        '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'
        '403':
          description: |
            Returned in the case that the domain is associated with an api
            key that is different than the one in the request, the domain is
            associated with a different customer, or the domain in the request
            is an alias domain.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Domain Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CompleteDomainSettings:
      allOf:
        - $ref: '#/components/schemas/DomainSettings'
        - $ref: '#/components/schemas/AdditionalDomainSettings'
    ErrorResponse:
      required:
        - errors
      properties:
        code:
          type: integer
        message:
          type: string
        errors:
          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
    AdditionalDomainSettings:
      properties:
        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
    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

````