---
title: "Update team notification rule"
method: PUT
path: "/api/v2/team/{team_id}/notification-rules/{rule_id}"
tags: ["Teams"]
---

# Update team notification rule

`PUT /api/v2/team/{team_id}/notification-rules/{rule_id}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/team/{team_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` scopes: `teams_read`

## Path parameters

- `team_id` string, required
- `rule_id` string, required

## Request body

- TeamNotificationRuleRequest: Request to create or update a team notification rule
  - `data` TeamNotificationRule, required: Team notification rule
    - `attributes` TeamNotificationRuleAttributes, required: Team notification rule attributes
      - `email` TeamNotificationRuleAttributesEmail: Email notification settings for the team
        - `enabled` boolean: Flag indicating email notification
      - `ms_teams` TeamNotificationRuleAttributesMsTeams: MS Teams notification settings for the team
        - `connector_name` string: Handle for MS Teams
      - `pagerduty` TeamNotificationRuleAttributesPagerduty: PagerDuty notification settings for the team
        - `service_name` string: Service name for PagerDuty
      - `slack` TeamNotificationRuleAttributesSlack: Slack notification settings for the team
        - `channel` string: Channel for Slack notification
        - `workspace` string: Workspace for Slack notification
    - `id` string: The identifier of the team notification rule
    - `type` 'team_notification_rules', required: Team notification rule type

## Response `200`

OK

- TeamNotificationRuleResponse: Team notification rule response
  - `data` TeamNotificationRule: Team notification rule
    - `attributes` TeamNotificationRuleAttributes, required: Team notification rule attributes
      - `email` TeamNotificationRuleAttributesEmail: Email notification settings for the team
        - `enabled` boolean: Flag indicating email notification
      - `ms_teams` TeamNotificationRuleAttributesMsTeams: MS Teams notification settings for the team
        - `connector_name` string: Handle for MS Teams
      - `pagerduty` TeamNotificationRuleAttributesPagerduty: PagerDuty notification settings for the team
        - `service_name` string: Service name for PagerDuty
      - `slack` TeamNotificationRuleAttributesSlack: Slack notification settings for the team
        - `channel` string: Channel for Slack notification
        - `workspace` string: Workspace for Slack notification
    - `id` string: The identifier of the team notification rule
    - `type` 'team_notification_rules', required: Team notification rule type

## Other responses

- `403`: Forbidden
- `404`: API error response.
- `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)
