> Documentation index for AI agents: https://docs.pagerduty.com/llms.txt

# Update a user's notification rule

`PUT https://api.pagerduty.com/users/{id}/notification_rules/{notification_rule_id}`

Update a user's notification rule.

Users are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.

For more information see the [API Concepts Document](https://docs.pagerduty.com/developer/api-concepts#users)

Scoped OAuth requires: `users:contact_methods.write`

## Authorization

- **api_key** (apiKey) — `Authorization` header. The API Key with format `Token token=<API_KEY>`

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | The ID of the resource. |
| `notification_rule_id` | string | yes | The notification rule ID on the user. |

## Header parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `Accept` | string | yes | The `Accept` header is used as a versioning header. Default: `application/vnd.pagerduty+json;version=2`. |

## Request body (`application/json`)

The user's notification rule to be updated.

| Field | Type | Required | Description |
|---|---|---|---|
| `notification_rule` | object | yes |  |
| `notification_rule.id` | string |  | Read-only. |
| `notification_rule.summary` | string \| null |  | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier. Read-only. |
| `notification_rule.type` | string | yes | The type of object being created. One of: `assignment_notification_rule`. Default: `assignment_notification_rule`. |
| `notification_rule.self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `notification_rule.html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `notification_rule.start_delay_in_minutes` | integer | yes | The delay before firing the rule, in minutes. Minimum: 0. |
| `notification_rule.contact_method` | object | yes |  |
| `notification_rule.contact_method.id` | string | yes | Read-only. |
| `notification_rule.contact_method.summary` | string \| null |  | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier. Read-only. |
| `notification_rule.contact_method.type` | string | yes | One of: `email_contact_method_reference`, `phone_contact_method_reference`, `push_notification_contact_method_reference`, `sms_contact_method_reference`, `whatsapp_contact_method_reference`. |
| `notification_rule.contact_method.self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `notification_rule.contact_method.html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `notification_rule.urgency` | string | yes | Which incident urgency this rule is used for. Account must have the `urgencies` ability to have a low urgency notification rule. One of: `high`, `low`. |

Example: Request Example

```json
{
  "notification_rule": {
    "type": "assignment_notification_rule",
    "start_delay_in_minutes": 0,
    "contact_method": {
      "id": "PXPGF42",
      "type": "email_contact_method"
    },
    "urgency": "high"
  }
}
```

## Response 200

The user's notification rule that was updated.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `notification_rule` | object |  | Same fields as `notification_rule` above. |

Example: Response Example

```json
{
  "notification_rule": {
    "id": "PXPGF42",
    "type": "assignment_notification_rule",
    "summary": "Work",
    "self": "https://api.pagerduty.com/users/PXPGF42/notification_rules/PPSCXAN",
    "start_delay_in_minutes": 0,
    "contact_method": {
      "id": "PXPGF42",
      "type": "email_contact_method_reference",
      "summary": "Work",
      "self": "https://api.pagerduty.com/users/PXPGF42/contact_methods/PXPGF42"
    },
    "created_at": "2016-02-01T16:06:27-05:00",
    "urgency": "high"
  }
}
```

## Response 400

Caller provided invalid arguments. Please review the response for error details. Retrying with the same arguments will *not* work.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 401

Caller did not supply credentials or did not provide the correct credentials.
If you are using an API key, it may be invalid or your Authorization header may be malformed.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 402

Account does not have the abilities to perform the action. Please review the response for the required abilities.
You can also use the [Abilities API](#resource_Abilities) to determine what features are available to your account.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 403

Caller is not authorized to view the requested resource.
While your authentication is valid, the authenticated user or token does not have permission to perform this action.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 404

The requested resource was not found.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 429

Too many requests have been made, the rate limit has been reached.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Developer Agreement

Your access to and use of the PagerDuty Developer Services is governed by the [PagerDuty Developer Agreement](https://docs.pagerduty.com/developer/pagerduty-developer-agreement).
