This API controls notification type preferences, such as enabling or disabling certain types of notifications, or disabling certain channels for notifications.
Admin - Notification Types API
Interfaces
Object Synopses
NotificationType
-
id
String
An key-based ID identifying the notification type.
-
audience
String
A general descriptor of the users who will receive these types of notifications.
-
category
String
A descriptor which groups similar notification types.
-
name
String
The name of the notification.
-
description
String
A description of the contents and timing of the notification.
-
channels
Object
A list of notification channels, and whether the notification is enabled for the channel. If a channel is not listed, the notification is not available over that channel.
List notification types
GET
/api/admin/notification_types
Lists all notification types available to the current user to be
configured.
Response Codes
200 OK
403 Forbidden
Example Response
{
"notification_types": [
{
"id": "welcome",
"audience": "Everyone",
"category": "User Account",
"name": "Welcome",
"description": "Sent immediately after account creation.",
"channels": {
"email": true
}
},
{
"id": "password_reset",
"audience": "Everyone",
"category": "User Account",
"name": "Password Reset",
"description": "Notification allowing user to reset their password.",
"channels": {
"email": true,
"slack": true
}
}
]
}
Get individual notification type
GET
/api/admin/notification_types/:id
Provides details for an individual notification type requested.
Response Codes
200 OK
403 Forbidden
Parameters
-
id
String
Required
Path parameter. The id key for the requested notification type.
Example Response
{
"notification_types": [
{
"id": "welcome",
"audience": "Everyone",
"category": "User Account",
"name": "Welcome",
"description": "Sent immediately after account creation.",
"channels": {
"email": true
}
}
]
}
Update an individual notification type
PATCH
/api/admin/notification_types/:id
PUT
/api/admin/notification_types/:id
Updates notification preferences for an individual
notification type.
Response Codes
200 OK
403 Forbidden
422 Unprocessable Entity
Parameters
-
id
String
Required
Path parameter. The id for the notification type to update.
Example Request
Example Response
{
"notification_types": [
{
"id": "welcome",
"audience": "Everyone",
"category": "User Account",
"name": "Welcome",
"description": "Sent immediately after account creation.",
"channels": {
"email": true
}
}
]
}
Interfaces
Object Synopses
NotificationType
-
id
StringAn key-based ID identifying the notification type.
-
audience
StringA general descriptor of the users who will receive these types of notifications.
-
category
StringA descriptor which groups similar notification types.
-
name
StringThe name of the notification.
-
description
StringA description of the contents and timing of the notification.
-
channels
ObjectA list of notification channels, and whether the notification is enabled for the channel. If a channel is not listed, the notification is not available over that channel.
List notification types
Lists all notification types available to the current user to be configured.
Response Codes
200 OK
403 Forbidden
Example Response
{ "notification_types": [ { "id": "welcome", "audience": "Everyone", "category": "User Account", "name": "Welcome", "description": "Sent immediately after account creation.", "channels": { "email": true } }, { "id": "password_reset", "audience": "Everyone", "category": "User Account", "name": "Password Reset", "description": "Notification allowing user to reset their password.", "channels": { "email": true, "slack": true } } ] }
Get individual notification type
Provides details for an individual notification type requested.
Response Codes
200 OK
403 Forbidden
Parameters
-
id
String RequiredPath parameter. The id key for the requested notification type.
Example Response
{ "notification_types": [ { "id": "welcome", "audience": "Everyone", "category": "User Account", "name": "Welcome", "description": "Sent immediately after account creation.", "channels": { "email": true } } ] }
Update an individual notification type
Updates notification preferences for an individual notification type.
Response Codes
200 OK
403 Forbidden
422 Unprocessable Entity
Parameters
-
id
String RequiredPath parameter. The id for the notification type to update.
Example Request
Example Response
{ "notification_types": [ { "id": "welcome", "audience": "Everyone", "category": "User Account", "name": "Welcome", "description": "Sent immediately after account creation.", "channels": { "email": true } } ] }