---
title: Reroute On-Call Page
description: Reroutes an On-Call Page.
breadcrumbs: Docs > API > Reroute On-Call Page
---

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

# Reroute On-Call Page

## v2 (latest)

| Datadog site      | API endpoint                                                                     |
| ----------------- | -------------------------------------------------------------------------------- |
| app.datadoghq.com | POST https://navy.oncall.datadoghq.com/api/v2/on-call/pages/{page_id}/reroute    |
| us3.datadoghq.com | POST https://teal.oncall.datadoghq.com/api/v2/on-call/pages/{page_id}/reroute    |
| us5.datadoghq.com | POST https://coral.oncall.datadoghq.com/api/v2/on-call/pages/{page_id}/reroute   |
| app.datadoghq.eu  | POST https://beige.oncall.datadoghq.eu/api/v2/on-call/pages/{page_id}/reroute    |
| ap1.datadoghq.com | POST https://saffron.oncall.datadoghq.com/api/v2/on-call/pages/{page_id}/reroute |
| ap2.datadoghq.com | POST https://lava.oncall.datadoghq.com/api/v2/on-call/pages/{page_id}/reroute    |
| uk1.datadoghq.com | POST https://scarlet.oncall.datadoghq.com/api/v2/on-call/pages/{page_id}/reroute |
| app.ddog-gov.com  | POST https://navy.oncall.datadoghq.com/api/v2/on-call/pages/{page_id}/reroute    |
| us2.ddog-gov.com  | POST https://navy.oncall.datadoghq.com/api/v2/on-call/pages/{page_id}/reroute    |

### Overview

Reroutes an On-Call Page.

### Arguments

#### Path Parameters

| Field                | Type   | Description  |
| -------------------- | ------ | ------------ |
| page_id [*required*] | string | The page ID. |

### Request

#### Body Data (required)

{% tabs %}
{% tab label="Model" %}
| Parent field | Field                   | Type   | Description                                                                                                          |
| ------------ | ----------------------- | ------ | -------------------------------------------------------------------------------------------------------------------- |
|              | data [*required*]       | object | The data for rerouting an On-Call Page, including attributes and resource type.                                      |
| data         | attributes [*required*] | object | Details about where to reroute the On-Call Page.                                                                     |
| attributes   | comment                 | string | An optional comment explaining why the page is being rerouted.                                                       |
| attributes   | target [*required*]     | object | Information about the target to notify (such as a team or user).                                                     |
| target       | identifier              | string | Identifier for the target (for example, team handle or user ID).                                                     |
| target       | type                    | enum   | The kind of target, `team_id` | `team_handle` | `user_id`. Allowed enum values: `team_id`, `team_handle`, `user_id`. |
| data         | type [*required*]       | enum   | The type of resource used when rerouting an On-Call Page. Allowed enum values: `reroute`. Default: `reroute`.        |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": {
    "attributes": {
      "comment": "Rerouting to the database team.",
      "target": {
        "identifier": "string",
        "type": "team_id"
      }
    },
    "type": "reroute"
  }
}
```
{% /tab %}
{% /tabs %}

### Response

{% tabs %}
{% tab label="204" %}
No Content.
{% /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="401" %}
Unauthorized

{% 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="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 page_id="15e74b8b-f865-48d0-bcc5-453323ed2c8f"

# Set your Datadog credentials
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

# For sites other than datadoghq.com, replace the host below with: teal.oncall.datadoghq.com (us3.datadoghq.com), coral.oncall.datadoghq.com (us5.datadoghq.com), beige.oncall.datadoghq.eu (datadoghq.eu), saffron.oncall.datadoghq.com (ap1.datadoghq.com), lava.oncall.datadoghq.com (ap2.datadoghq.com), scarlet.oncall.datadoghq.com (uk1.datadoghq.com), navy.oncall.datadoghq.com (ddog-gov.com), navy.oncall.datadoghq.com (us2.ddog-gov.com)
curl -X POST "https://navy.oncall.datadoghq.com/api/v2/on-call/pages/${page_id}/reroute" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "comment": "Rerouting to the database team.",
      "target": {
        "identifier": "my-team",
        "type": "team_handle"
      }
    },
    "type": "reroute"
  }
}
EOF
```
{% /tab %}
{% /tabs %}
