# Apply DMARC records to domains.

This function applies a DMARC record to the specified domain(s)

Endpoint: GET /EmailAuth/apply_dmarc
Version: 11.136.0.4
Security: BasicAuth

## Query parameters:

  - `policy` (string, required)
    The DMARC record to apply to the requested domains.

Note:

Visit the following link for more information about the DMARC record specification: https://dmarc.org/resources/specification/
    Example: "v=DMARC1;p=reject;pct=100;rua=mailto:postmaster@example.com"

  - `domain` (string)
    The domain for which to apply the DMARC record.

Note:

To enable multiple domain DMARC records, duplicate or increment the parameter. For example, to enable DMARC records for three domains, perform either of the following actions:

* Use the domain parameter three times.
* Use the domain, domain-1, and domain-2 parameters.

If you do not include this argument, the system applies the DMARC record to all the user's domains.

You cannot use this function to edit temporary domains' DMARC records.

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "apply_dmarc"

  - `module` (string)
    The name of the module called.
    Example: "EmailAuth"

  - `result` (object)

  - `result.data` (array)
    An array that contains information about the DMARC records applied to domains.

  - `result.data.domain` (string)
    The domain for which the DMARC record was applied.
    Example: "example.com"

  - `result.data.msg` (string)
    The domain's DMARC record status message.
    Example: "[ADD:TXT@_dmarc.example.com:v=DMARC1; p=reject;]"

  - `result.data.status` (integer)
    Whether the system applied a DMARC record to the domain.
* 1 - Applied.
* 0 - The system did not apply a DMARC record.
    Enum: 0, 1

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.status` (integer)
    * 1 - Success.
* 0 - Failed. Check the errors field for more details.
    Enum: 0, 1

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running an API.


