---
title: "Create an On-Call notification rule for a user"
method: POST
path: "/api/v2/on-call/users/{user_id}/notification-rules"
tags: ["On-Call"]
---

# Create an On-Call notification rule for a user

`POST /api/v2/on-call/users/{user_id}/notification-rules`

Create a new notification rule for a user. The authenticated user must be the target user or have the `on_call_admin` permission

## Path parameters

- `user_id` string, required

## Request body

- CreateOnCallNotificationRuleRequest — A top-level wrapper for creating a notification rule for a user
  - `data` CreateOnCallNotificationRuleRequestData, required — Data for creating an on-call notification rule
    - `attributes` OnCallNotificationRuleRequestAttributes — Attributes for creating or modifying an on-call notification rule.
      - `category` 'high_urgency' | 'low_urgency' — Specifies the category a notification rule will apply to
      - `channel_settings` OnCallNotificationRuleChannelSettings — Configuration for using a phone notification channel in a notification rule
        - `method` 'sms' | 'voice', required — Specifies the method in which a phone is used in a notification rule
        - `type` 'phone', required — Indicates that the notification channel is a phone
      - `delay_minutes` integer — The number of minutes that will elapse before this rule is evaluated. 0 indicates immediate evaluation
    - `relationships` OnCallNotificationRuleRelationships — Relationship object for creating a notification rule
      - `channel` OnCallNotificationRuleChannelRelationship — Relationship object for creating a notification rule
        - `data` OnCallNotificationRuleChannelRelationshipData, required — Channel relationship data for creating a notification rule
          - `id` string — ID of the notification channel
          - `type` 'notification_channels' — Indicates that the resource is of type 'notification_channels'.
    - `type` 'notification_rules', required — Indicates that the resource is of type 'notification_rules'.

## Response `201`

Created

- OnCallNotificationRule — A top-level wrapper for a notification rule
  - `data` OnCallNotificationRuleData, required — Data for an on-call notification rule
    - `attributes` OnCallNotificationRuleAttributes — Attributes for an on-call notification rule.
      - `category` 'high_urgency' | 'low_urgency' — Specifies the category a notification rule will apply to
      - `channel_settings` OnCallNotificationRuleChannelSettings — Configuration for using a phone notification channel in a notification rule
        - `method` 'sms' | 'voice', required — Specifies the method in which a phone is used in a notification rule
        - `type` 'phone', required — Indicates that the notification channel is a phone
      - `delay_minutes` integer — The number of minutes that will elapse before this rule is evaluated. 0 indicates immediate evaluation
    - `id` string — Unique identifier for the rule
    - `relationships` OnCallNotificationRuleRelationships — Relationship object for creating a notification rule
      - `channel` OnCallNotificationRuleChannelRelationship — Relationship object for creating a notification rule
        - `data` OnCallNotificationRuleChannelRelationshipData, required — Channel relationship data for creating a notification rule
          - `id` string — ID of the notification channel
          - `type` 'notification_channels' — Indicates that the resource is of type 'notification_channels'.
    - `type` 'notification_rules', required — Indicates that the resource is of type 'notification_rules'.
  - `included` OnCallNotificationRulesIncluded[]
    - `attributes` NotificationChannelAttributes — Attributes for an on-call notification channel.
      - `active` boolean — Whether the notification channel is currently active.
      - `config` union — Defines the configuration for an On-Call notification channel
        - NotificationChannelPhoneConfig — Phone notification channel configuration
          - `formatted_number` string, required — The formatted international version of Number (e.g. +33 7 1 23 45 67).
          - `number` string, required — The E-164 formatted phone number (e.g. +3371234567)
          - `region` string, required — The ISO 3166-1 alpha-2 two-letter country code.
          - `sms_subscribed_at` string, date-time, nullable — If present, the date the user subscribed this number to SMS messages
          - `type` 'phone', required — Indicates that the notification channel is a phone
          - `verified` boolean, required — Indicates whether this phone has been verified by the user in Datadog On-Call
        - NotificationChannelEmailConfig — Email notification channel configuration
          - `address` string, required — The e-mail address to be notified
          - `formats` NotificationChannelEmailFormatType[], required — Preferred content formats for notifications.
          - `type` 'email', required — Indicates that the notification channel is an e-mail address
        - NotificationChannelPushConfig — Push notification channel configuration
          - `application_name` string, required — The name of the application used to receive push notifications
          - `device_name` string, required — The name of the mobile device being used
          - `type` 'push', required — Indicates that the notification channel is a mobile device for push notifications
    - `id` string — Unique identifier for the channel
    - `type` 'notification_channels', required — Indicates that the resource is of type 'notification_channels'.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
