Account Notifications
API for account notifications.
An AccountNotification object looks like:
GET /api/v1/accounts/:account_id/account_notifications
GET /api/v1/accounts/:account_id/account_notifications
Scope: url:GET|/api/v1/accounts/:account_id/account_notifications
Returns a list of all global notifications in the account for the current user Any notifications that have been closed by the user will not be returned, unless a include_past parameter is passed in as true. Admins can request all global notifications for the account by passing in an include_all parameter.
Request Parameters:
include_past
boolean
Include past and dismissed global announcements.
include_all
boolean
Include all global announcements, regardless of user’s role or availability date. Only available to account admins.
show_is_closed
boolean
Include a flag for each notification indicating whether it has been read by the user.
Example Request:
GET /api/v1/accounts/:account_id/account_notifications/:id
GET /api/v1/accounts/:account_id/account_notifications/:id
Scope: url:GET|/api/v1/accounts/:account_id/account_notifications/:id
Returns a global notification for the current user A notification that has been closed by the user will not be returned
Example Request:
POST /api/v1/accounts/:account_id/account_notifications
POST /api/v1/accounts/:account_id/account_notifications
Scope: url:POST|/api/v1/accounts/:account_id/account_notifications
Create and return a new global notification for an account.
Request Parameters:
account_notification[subject]
Required string
The subject of the notification.
account_notification[message]
Required string
The message body of the notification.
account_notification[start_at]
Required DateTime
The start date and time of the notification in ISO8601 format. e.g. 2014-01-01T01:00Z
account_notification[end_at]
Required DateTime
The end date and time of the notification in ISO8601 format. e.g. 2014-01-01T01:00Z
account_notification[icon]
string
The icon to display with the notification. Note: Defaults to warning.
Allowed values: warning
, information
, question
, error
, calendar
account_notification_roles[]
string
The role(s) to send global notification to. Note: ommitting this field will send to everyone Example:
Example Request:
Example Response:
PUT /api/v1/accounts/:account_id/account_notifications/:id
PUT /api/v1/accounts/:account_id/account_notifications/:id
Scope: url:PUT|/api/v1/accounts/:account_id/account_notifications/:id
Update global notification for an account.
Request Parameters:
account_notification[subject]
string
The subject of the notification.
account_notification[message]
string
The message body of the notification.
account_notification[start_at]
DateTime
The start date and time of the notification in ISO8601 format. e.g. 2014-01-01T01:00Z
account_notification[end_at]
DateTime
The end date and time of the notification in ISO8601 format. e.g. 2014-01-01T01:00Z
account_notification[icon]
string
The icon to display with the notification.
Allowed values: warning
, information
, question
, error
, calendar
account_notification_roles[]
string
The role(s) to send global notification to. Note: ommitting this field will send to everyone Example:
Example Request:
Example Response:
DELETE /api/v1/accounts/:account_id/account_notifications/:id
DELETE /api/v1/accounts/:account_id/account_notifications/:id
Scope: url:DELETE|/api/v1/accounts/:account_id/account_notifications/:id
If the current user no longer wants to see this account notification, it can be closed with this call. This affects the current user only.
If the current user is an admin and they pass a remove parameter with a value of “true”, the account notification will be destroyed. This affects all users.
Request Parameters:
remove
boolean
Destroy the account notification.
Example Request:
Last updated
Was this helpful?