---
title: Update the outreach mode
description: "Set the organization's outreach mode: off (no user outreach), manual (outreach is only sent when an analyst triggers it), or automated (rules with…"
breadcrumbs: Docs > API > Update the outreach mode
---

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

# Update the outreach mode

## 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 | PUT https://api.datadoghq.com/api/v2/security_monitoring/security_agent/outreach_policy     |
| us3.datadoghq.com | PUT https://api.us3.datadoghq.com/api/v2/security_monitoring/security_agent/outreach_policy |
| us5.datadoghq.com | PUT https://api.us5.datadoghq.com/api/v2/security_monitoring/security_agent/outreach_policy |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v2/security_monitoring/security_agent/outreach_policy      |
| ap1.datadoghq.com | PUT https://api.ap1.datadoghq.com/api/v2/security_monitoring/security_agent/outreach_policy |
| ap2.datadoghq.com | PUT https://api.ap2.datadoghq.com/api/v2/security_monitoring/security_agent/outreach_policy |
| uk1.datadoghq.com | PUT https://api.uk1.datadoghq.com/api/v2/security_monitoring/security_agent/outreach_policy |
| app.ddog-gov.com  | PUT https://api.ddog-gov.com/api/v2/security_monitoring/security_agent/outreach_policy      |
| us2.ddog-gov.com  | PUT https://api.us2.ddog-gov.com/api/v2/security_monitoring/security_agent/outreach_policy  |

### Overview

Set the organization's outreach mode: `off` (no user outreach), `manual` (outreach is only sent when an
analyst triggers it), or `automated` (rules with outreach enabled auto-send automated interviews to users
whose email domain is allowed).

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.

### Request

#### Body Data (required)

The new outreach mode.

{% tabs %}
{% tab label="Model" %}
| Parent field | Field                   | Type   | Description                                                                                                                                                                                                                                                                               |
| ------------ | ----------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|              | data [*required*]       | object | Data of a mode-only policy update request.                                                                                                                                                                                                                                                |
| data         | attributes [*required*] | object | Attributes of a mode-only policy update.                                                                                                                                                                                                                                                  |
| 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`. |
| 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": {
      "mode": "automated"
    },
    "type": "outreach_policy"
  }
}
```
{% /tab %}
{% /tabs %}

### Response

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

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

| Parent field | Field                   | Type   | Description                                                                                                                                                                                                                                                                               |
| ------------ | ----------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|              | data [*required*]       | object | The organization's outreach mode.                                                                                                                                                                                                                                                         |
| data         | attributes [*required*] | object | Attributes of a mode-only policy update.                                                                                                                                                                                                                                                  |
| 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`. |
| 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": {
      "mode": "automated"
    },
    "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="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
# 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 PUT "https://api.${DD_SITE}/api/v2/security_monitoring/security_agent/outreach_policy" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "mode": "automated"
    },
    "type": "outreach_policy"
  }
}
EOF
```
{% /tab %}
{% /tabs %}
