Create a notification channel
POST/notification_channels
Create a notification channel.
Request
- application/json
Body
Add a Notification Channel
notification_profile_id string
A UUID reference to the associated Notification Profile.
channel_type_id string
Possible values: [sms
, voice
, email
, webhook
]
A Channel Type ID
channel_destination string
The destination associated with the channel type.
Responses
200: A Notification Channel response
- application/json
default: Unexpected error
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/notification_channels' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"notification_profile_id": "12455643-3cf1-4683-ad23-1cd32f7d5e0a",
"channel_type_id": "sms",
"channel_destination": "+13125550000"
}'
Response samples
{
"data": {
"id": "12455643-3cf1-4683-ad23-1cd32f7d5e0a",
"notification_profile_id": "12455643-3cf1-4683-ad23-1cd32f7d5e0a",
"channel_type_id": "sms",
"channel_destination": "+13125550000",
"created_at": "2019-10-15T10:07:15.527Z",
"updated_at": "2019-10-15T10:07:15.527Z"
}
}
{
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}