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

# Update an On-Call notification rule for a user

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

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/on-call/users/{user_id}/notification-rules/{rule_id}`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token`

Update a 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
- `rule_id` string, required

## Query parameters

- `include` string

## Request body

- UpdateOnCallNotificationRuleRequest: A top-level wrapper for updating a notification rule for a user
  - `data` UpdateOnCallNotificationRuleRequestData, required: Data for updating an on-call notification rule
    - `attributes` UpdateOnCallNotificationRuleRequestAttributes: 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
    - `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'.

## Response `200`

OK

- 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.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
