---
title: "Sets Domain Allowlist"
method: PATCH
path: "/api/v2/domain_allowlist"
tags: ["Domain Allowlist"]
---

# Sets Domain Allowlist

`PATCH /api/v2/domain_allowlist`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/domain_allowlist`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `org_management`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `monitors_write`

Update the domain allowlist for an organization.

## Request body

- DomainAllowlistRequest: Request containing the desired email domain allowlist configuration.
  - `data` DomainAllowlist, required: The email domain allowlist for an org.
    - `attributes` DomainAllowlistAttributes: The details of the email domain allowlist.
      - `domains` string[]: The list of domains in the email domain allowlist.
      - `enabled` boolean: Whether the email domain allowlist is enabled for the org.
    - `id` string, nullable: The unique identifier of the org.
    - `type` 'domain_allowlist', required: Email domain allowlist allowlist type.

## Response `200`

OK

- DomainAllowlistResponse: Response containing information about the email domain allowlist.
  - `data` DomainAllowlistResponseData: The email domain allowlist response for an org.
    - `attributes` DomainAllowlistResponseDataAttributes: The details of the email domain allowlist.
      - `domains` string[]: The list of domains in the email domain allowlist.
      - `enabled` boolean: Whether the email domain allowlist is enabled for the org.
    - `id` string, nullable: The unique identifier of the org.
    - `type` 'domain_allowlist', required: Email domain allowlist allowlist type.

## Other responses

- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
