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

# Create team notification rule

`POST /api/v2/team/{team_id}/notification-rules`

## Path parameters

- `team_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 `201`

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.
- `409` — API error response.
- `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/versions/da68bf029e4c/schema)
