Warning. This API is no longer supported and deprecated since Feb 1, 2021.

This endpoint provides your with all latest events that regard to your coubs.

Get notifications list

GET /api/v2/notifications

Request parameters:

  • page (integer) — the number of the page containing results (by default is set to 1);
  • per_page (integer) — the number of notifications per one page.

Request example:

GET /api/v2/notifications?page=1&per_page=10

Response parameters:

  • page (integer) — the number of the required page;
  • total_pages (integer) — the number of all pages;
  • notifications (array) — the array of notification JSONs, each JSON consists of following fields:
    • id (integer) — the notification identifier;
    • kind (string) — the type of the notification, can contain one of the following values: follow, recoub, like;
    • system_notification (boolean) — whether the notification was send by Coub services;
    • entity_type (string) — the type of the object the notification relates to, can contain be either channel or coub;
    • read_at (UNIX-time) — the time when the notification was read;
    • created_at (UNIX-time) — the time when the notification was created; updated_at (UNIX-time) — the time when the notification was updated;
    • important (boolean) — whether notification is marked as important;
    • senders (array) — the array of channel small JSONs that contains data about the senders — channels that perform the action the notification relates to;
    • recipient (JSON) — the channel small JSON that stores data about the user channel that receives the notification;
    • object (JSON) — the coub big JSON that stores the data about the coub.

Set notifications as viewed

POST /api/v2/channels/notifications_viewed

Request parameters:

  • none

Respone parameters:

The JSON contains status field.

Response example:

    "status": "ok",