---
title: Remove an allowed outreach domain
description: Remove one allowed email domain, by its name.
breadcrumbs: Docs > API > Remove an allowed outreach domain
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Remove an allowed outreach domain

## v2 (latest)

{% alert level="warning" %}
**Note**: This endpoint is in preview and is subject to change.
To request access, contact [Datadog support](https://docs.datadoghq.com/help.md) or your Customer Success Manager.
{% /alert %}

| Datadog site      | API endpoint                                                                                                            |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------- |
| app.datadoghq.com | DELETE https://api.datadoghq.com/api/v2/security_monitoring/security_agent/outreach_policy/allowed_domains/{domain}     |
| us3.datadoghq.com | DELETE https://api.us3.datadoghq.com/api/v2/security_monitoring/security_agent/outreach_policy/allowed_domains/{domain} |
| us5.datadoghq.com | DELETE https://api.us5.datadoghq.com/api/v2/security_monitoring/security_agent/outreach_policy/allowed_domains/{domain} |
| app.datadoghq.eu  | DELETE https://api.datadoghq.eu/api/v2/security_monitoring/security_agent/outreach_policy/allowed_domains/{domain}      |
| ap1.datadoghq.com | DELETE https://api.ap1.datadoghq.com/api/v2/security_monitoring/security_agent/outreach_policy/allowed_domains/{domain} |
| ap2.datadoghq.com | DELETE https://api.ap2.datadoghq.com/api/v2/security_monitoring/security_agent/outreach_policy/allowed_domains/{domain} |
| uk1.datadoghq.com | DELETE https://api.uk1.datadoghq.com/api/v2/security_monitoring/security_agent/outreach_policy/allowed_domains/{domain} |
| app.ddog-gov.com  | DELETE https://api.ddog-gov.com/api/v2/security_monitoring/security_agent/outreach_policy/allowed_domains/{domain}      |
| us2.ddog-gov.com  | DELETE https://api.us2.ddog-gov.com/api/v2/security_monitoring/security_agent/outreach_policy/allowed_domains/{domain}  |

### Overview

Remove one allowed email domain, by its name.

This endpoint requires the `bits_security_analyst_config_write` permission.

OAuth apps require the `bits_security_analyst_config_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#bits-security-analyst) to access this endpoint.

### Arguments

#### Path Parameters

| Field               | Type   | Description                                                                      |
| ------------------- | ------ | -------------------------------------------------------------------------------- |
| domain [*required*] | string | The allowed email domain to remove, for example `example.com`. Case-insensitive. |

### Response

{% tabs %}
{% tab label="200" %}
OK

{% tabs %}
{% tab label="Model" %}
Response with the organization's outreach policy.

| Parent field | Field                   | Type     | Description                                                                                                                                                                                                                                                                               |
| ------------ | ----------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|              | data [*required*]       | object   | The organization's outreach policy.                                                                                                                                                                                                                                                       |
| data         | attributes [*required*] | object   | Attributes of the organization's outreach policy.                                                                                                                                                                                                                                         |
| attributes   | allowed_domains         | [string] | Email domains user outreach can be sent to, at most 20. `null` when none are allowed.                                                                                                                                                                                                     |
| attributes   | mode [*required*]       | enum     | The organization's outreach mode. `off` disables user outreach. `manual` only sends outreach an analyst triggers. `automated` auto-sends automated interviews for rules with outreach enabled, to users whose email domain is allowed. Allowed enum values: `off`, `manual`, `automated`. |
| attributes   | rules                   | [object] | The stored per-rule automation state, including rules that are explicitly disabled. `null` when the organization has no stored rule state.                                                                                                                                                |
| rules        | is_enabled [*required*] | boolean  | Whether the rule auto-sends automated interviews in `automated` mode.                                                                                                                                                                                                                     |
| rules        | rule_id [*required*]    | string   | ID of the detection rule.                                                                                                                                                                                                                                                                 |
| attributes   | suggested_domains       | [string] | Domains the caller could allow next: their own email domain when it is not allowed yet and is not a consumer mailbox provider. Read-only, never stored. `null` when there is no suggestion.                                                                                               |
| data         | id [*required*]         | string   | The organization ID.                                                                                                                                                                                                                                                                      |
| data         | type [*required*]       | enum     | Type of the outreach policy resource. Allowed enum values: `outreach_policy`. Default: `outreach_policy`.                                                                                                                                                                                 |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": {
    "attributes": {
      "allowed_domains": [
        "example.com"
      ],
      "mode": "automated",
      "rules": [
        {
          "is_enabled": true,
          "rule_id": "abc-def-ghi"
        }
      ],
      "suggested_domains": [
        "acme.com"
      ]
    },
    "id": "1234567",
    "type": "outreach_policy"
  }
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="400" %}
Bad Request

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | code                | string   | An application-specific error code.                                             |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "code": "invalid_request",
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="403" %}
Forbidden

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | code                | string   | An application-specific error code.                                             |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "code": "invalid_request",
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="404" %}
Not Found

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | code                | string   | An application-specific error code.                                             |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "code": "invalid_request",
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="409" %}
Conflict

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | code                | string   | An application-specific error code.                                             |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "code": "invalid_request",
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too many requests

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# Path parameters
export domain="example.com"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, us2.ddog-gov.com
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X DELETE "https://api.${DD_SITE}/api/v2/security_monitoring/security_agent/outreach_policy/allowed_domains/${domain}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
```
{% /tab %}
{% /tabs %}
