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/subscriptions

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": [
    {
      "id": 1,
      "label": "Foo",
      "is_category": true
    },
    {
      "id": 15,
      "label": "Bar",
      "is_category": false
    }
  ]
}

Set subscriptions

PUT /users/:ID/subscriptions

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": [
    {
      "id": 1,
      "label": "Foo",
      "is_category": true
    },
    {
      "id": 15,
      "label": "Bar",
      "is_category": false
    }
  ]
}

DEPRECATED - Get subscriptions

Prefer using the endpoint defined above.

GET /users/:ID/tag-subscriptions

Response

[
  "Baskervilles"
]


DEPRECATED - Subscribe

Prefer using the endpoint defined above.

PUT /users/:ID/tag-subscriptions

INFO:Subscribing replaces all existing subscriptions!

Json Payload

[
  "Baskervilles"
]

Response

[
  "Baskervilles"
]