Tag subscriptions

Tag subscriptions allow to subscribe a user to a list of tags. If a new question with one of the subscribed tags is published the users which are subscribed will receive a notification. It is also possible to subscribe a list of users to a tag.


Get subscriptions

GET /users/:ID/subscription-labels

Returns the subscriptions of the user. Includes information about whether the tags are also categories.

Only the own user or a user_admin can execute this operation.

Response

{
  "subscriptions": [
    {
      "label": "Foo",
      "is_category": true
    },
    {
      "label": "Bar",
      "is_category": false
    }
  ]
}

Set subscriptions

PUT /users/:ID/subscription-labels

Allows to set the subscriptions of the user.

Only the own user or a user_admin can execute this operation.

Request

{
  "subscriptions": [
    { "name": "Foo" },
    { "name": "Bar" }
  ]
}

Response

{
  "subscriptions": [
    {
      "label": "Foo",
      "is_category": true
    },
    {
      "label": "Bar",
      "is_category": false
    }
  ]
}

Add new user subscription

POST /users/:ID/subscription-labels

Adds a new subscription for the user.

Only the own user or a user_admin can execute this operation.

Request

{ "name": "Foo" }

Response

{
  "subscriptions": [
    {
      "label": "Foo",
      "is_category": false
    }
  ]
}

Delete user subscription

DELETE /users/:ID/subscription-labels/:name

Deletes subscription with given name for the user.

Only the own user or a user_admin can execute this operation.

This request does not have a body, and in case of success, a HTTP 200 OK without body will be sent.