---
title: Create On-Call schedule overrides
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > On-Call
---

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

{% callout %}
# Important note for users on the following Datadog sites: us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

# Create On-Call schedule overrides{% #create-on-call-schedule-overrides %}

{% tab title="v2" %}

| Datadog site      | API endpoint                                                                        |
| ----------------- | ----------------------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/on-call/schedules/{schedule_id}/overrides |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/on-call/schedules/{schedule_id}/overrides |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/on-call/schedules/{schedule_id}/overrides      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/on-call/schedules/{schedule_id}/overrides      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/on-call/schedules/{schedule_id}/overrides  |
| uk1.datadoghq.com | POST https://api.uk1.datadoghq.com/api/v2/on-call/schedules/{schedule_id}/overrides |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/on-call/schedules/{schedule_id}/overrides     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/on-call/schedules/{schedule_id}/overrides |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/on-call/schedules/{schedule_id}/overrides |

### Overview

Create one or more overrides for the specified On-Call schedule. This endpoint requires any of the following permissions:
`on_call_respond``on_call_write` 


### Arguments

#### Path Parameters

| Name                          | Type   | Description             |
| ----------------------------- | ------ | ----------------------- |
| schedule_id [*required*] | string | The ID of the schedule. |

#### Query Strings

| Name    | Type   | Description                                                                                                             |
| ------- | ------ | ----------------------------------------------------------------------------------------------------------------------- |
| include | string | Comma-separated list of included relationships to be returned. Allowed values: `user`, `overridden_user`, `user.color`. |

### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field    | Field                        | Type      | Description                                                                          |
| --------------- | ---------------------------- | --------- | ------------------------------------------------------------------------------------ |
|                 | data [*required*]       | [object]  | A list of on-call schedule overrides to create.                                      |
| data            | attributes [*required*] | object    | Attributes for creating an on-call schedule override.                                |
| attributes      | end [*required*]        | date-time | The end time of the override.                                                        |
| attributes      | start [*required*]      | date-time | The start time of the override.                                                      |
| data            | relationships                | object    | Relationships to set when creating an on-call schedule override.                     |
| relationships   | overridden_user              | object    | Defines the relationship between an override and one of its associated users.        |
| overridden_user | data [*required*]       | object    | A reference to a user, containing the user's ID and resource type.                   |
| data            | id [*required*]         | string    | The unique identifier of the user.                                                   |
| data            | type [*required*]       | enum      | Indicates that the related resource is of type 'users'. Allowed enum values: `users` |
| relationships   | user                         | object    | Defines the relationship between an override and one of its associated users.        |
| user            | data [*required*]       | object    | A reference to a user, containing the user's ID and resource type.                   |
| data            | id [*required*]         | string    | The unique identifier of the user.                                                   |
| data            | type [*required*]       | enum      | Indicates that the related resource is of type 'users'. Allowed enum values: `users` |
| data            | type [*required*]       | enum      | Indicates that the resource is of type 'overrides'. Allowed enum values: `overrides` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "end": "2021-11-12T11:11:11+00:00",
        "start": "2021-11-11T11:11:11+00:00"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "string",
            "type": "users"
          }
        }
      },
      "type": "overrides"
    }
  ]
}
```

{% /tab %}

### Response

{% tab title="201" %}
Created
{% tab title="Model" %}
The on-call schedule overrides that were created, and any related included resources (such as users).

| Parent field    | Field                  | Type            | Description                                                                                                                                |
| --------------- | ---------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|                 | data [*required*] | [object]        | The on-call schedule overrides that were created.                                                                                          |
| data            | attributes             | object          | Attributes for an on-call schedule override.                                                                                               |
| attributes      | end                    | date-time       | The end time of the override.                                                                                                              |
| attributes      | inactive               | boolean         | Whether the override is inactive (for example, because its time range has ended).                                                          |
| attributes      | start                  | date-time       | The start time of the override.                                                                                                            |
| data            | id [*required*]   | string          | The unique identifier of the override.                                                                                                     |
| data            | relationships          | object          | Relationships for an on-call schedule override.                                                                                            |
| relationships   | overridden_user        | object          | Defines the relationship between an override and one of its associated users.                                                              |
| overridden_user | data [*required*] | object          | A reference to a user, containing the user's ID and resource type.                                                                         |
| data            | id [*required*]   | string          | The unique identifier of the user.                                                                                                         |
| data            | type [*required*] | enum            | Indicates that the related resource is of type 'users'. Allowed enum values: `users`                                                       |
| relationships   | schedule               | object          | Defines the relationship between an override and the schedule it belongs to.                                                               |
| schedule        | data [*required*] | object          | A reference to the schedule the override belongs to, containing the schedule's ID and resource type.                                       |
| data            | id [*required*]   | string          | The unique identifier of the schedule.                                                                                                     |
| data            | type [*required*] | enum            | Indicates that the related resource is of type 'schedules'. Allowed enum values: `schedules`                                               |
| relationships   | user                   | object          | Defines the relationship between an override and one of its associated users.                                                              |
| user            | data [*required*] | object          | A reference to a user, containing the user's ID and resource type.                                                                         |
| data            | id [*required*]   | string          | The unique identifier of the user.                                                                                                         |
| data            | type [*required*] | enum            | Indicates that the related resource is of type 'users'. Allowed enum values: `users`                                                       |
| data            | type [*required*] | enum            | Indicates that the resource is of type 'overrides'. Allowed enum values: `overrides`                                                       |
|                 | included               | [ <oneOf>] | Related resources referenced in the overrides' relationships, such as users.                                                               |
| included        | <type=users>           | object          | Represents a user object in the context of a schedule, including their `id`, type, and basic attributes.                                   |
| <type=users>    | attributes             | object          | Provides basic user information for a schedule, including a name and email address.                                                        |
| attributes      | color                  | string          | The user's on-call color, as a hex code (for example, `#FF0000`). Included only when `user.color` is requested in the `include` parameter. |
| attributes      | email                  | string          | The user's email address.                                                                                                                  |
| attributes      | name                   | string          | The user's name.                                                                                                                           |
| attributes      | status                 | enum            | The user's status. Allowed enum values: `active,deactivated,pending`                                                                       |
| <type=users>    | id [*required*]   | string          | The unique user identifier.                                                                                                                |
| <type=users>    | type [*required*] | enum            | Users resource type. Allowed enum values: `users`                                                                                          |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "end": "2024-01-08T02:53:01.000000000Z",
        "inactive": false,
        "start": "2024-01-07T02:53:01.000000000Z"
      },
      "id": "00000000-0000-0000-0000-000000000000",
      "relationships": {
        "schedule": {
          "data": {
            "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
            "type": "schedules"
          }
        },
        "user": {
          "data": {
            "id": "00000000-aba1-0000-0000-000000000000",
            "type": "users"
          }
        }
      },
      "type": "overrides"
    }
  ],
  "included": [
    {
      "attributes": {
        "email": "jane.doe@example.com",
        "name": "Jane Doe",
        "status": ""
      },
      "id": "00000000-aba1-0000-0000-000000000000",
      "type": "users"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                          \## default
# 
 \# Path parameters export schedule_id="3653d3c6-0c75-11ea-ad28-fb5701eabc7d" \# Use a Personal Access Token or Service Access Token export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"  \# Curl command curl -X POST "https://api.datadoghq.com/api/v2/on-call/schedules/${schedule_id}/overrides" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "attributes": {
        "end": "2024-01-08T02:53:01.000000000Z",
        "start": "2024-01-07T02:53:01.000000000Z"
      },
      "relationships": {
        "user": {
          "data": {
            "id": "00000000-aba1-0000-0000-000000000000",
            "type": "users"
          }
        }
      },
      "type": "overrides"
    }
  ]
}
EOF 
                        
{% /tab %}
