Get Notification Channels

Endpoint

GET /notifications/channels - get notification channels

Parameters

Parameter Parameter Type Data Type
api-key header string Required
Authorization header string Required
token query string

Error messages

  • invalid HTTP_API_KEY
  • Not authenticated

HTTP response codes:

  • 200 - Success
  • 401 - Unauthorized action

Example request

curl --request GET \
  --url 'https://api-dev.radiozu.ro/v1/notifications/channels?token=tjkdadh1jasdccmnzxhadadshgj' \
  --header 'Authorization: Bearer AUTH_TOKEN' \
  --header 'api-key: API_KEY' 

Response fields

An array of notification channels with extra information that a token is subscribed to that channel.

  • id - integer, id of notification channel
  • name - string, name of notification channel
  • active - integer (0/1), denotes if a notification channel is active
  • subscribed - boolean
  • link_id - integer, the id of the link between the notification channel and the notification token, to be used for deletion of the link

The subscribed and link_id fields above are only present in the response when a token is present in the request. The value for subscribed is set to true and the value for link_id has a non-null value when the submitted notification token has a connection to the respective notification channel.

Example response

{
    "data": [
        {
            "id": 1,
            "name": "episodes",
            "active": 1,
            "subscribed": true,
            "link_id": 8
        },
        {
            "id": 2,
            "name": "news",
            "active": 1,
            "subscribed": false,
            "link_id": null
        }
    ]
}