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

# Create an On-Call notification channel for a user

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

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/on-call/users/{user_id}/notification-channels`
- 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`

Create a new notification channel 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

- CreateUserNotificationChannelRequest: A top-level wrapper for creating a notification channel for a user
  - `data` CreateNotificationChannelData, required: Data for creating an on-call notification channel
    - `attributes` CreateNotificationChannelAttributes: Attributes for creating an on-call notification channel.
      - `config` union: Defines the configuration for creating an On-Call notification channel
        - CreatePhoneNotificationChannelConfig: Configuration to create a phone notification channel
          - `number` string, required: The E-164 formatted phone number (e.g. +3371234567)
          - `type` 'phone', required: Indicates that the notification channel is a phone
        - CreateEmailNotificationChannelConfig: Configuration to create an e-mail notification channel
          - `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
    - `type` 'notification_channels', required: Indicates that the resource is of type 'notification_channels'.

## Response `201`

Created

- NotificationChannel: A top-level wrapper for a user notification channel
  - `data` NotificationChannelData: Data for an on-call notification channel
    - `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)
