HumHub - Notification API (1.0.0)

Download OpenAPI specification:Download

E-mail: info@humhub.com License: AGPLv2

Welcome to the HumHub notification module API reference.

Authentication

Bearer

Security scheme type: JWT

BasicAuth

Security scheme type: HTTP
HTTP Authorization Scheme basic

Notification

API to access notification information.

Find all user notifications

query Parameters
page
string >= 0

The number of page of the result set.

limit
string [ 1 .. 50 ]
Default: 20

The numbers of items to return per page.

excludeFilters
Array of strings
Items Enum:"admin" "calendar" "task" "task_reminder" "comments" "content_created" "like" "space_member" "followed" "mentioned"

Filters to exclude notifications from result.

Responses

200

Success

get /notification
/api/v1/notification

Response samples

Copy
Expand all Collapse all
{
  • "total": 76,
  • "page": 1,
  • "pages": 8,
  • "links":
    {
    },
  • "results":
    [
    ]
}

Get notification by id

path Parameters
id
required
integer

The id of notification

Responses

200

Success

404

Not found

get /notification/{id}
/api/v1/notification/{id}

Response samples

Copy
Expand all Collapse all
{
  • "id": 32,
  • "class": "humhub\\modules\\content\\notifications\\ContentCreated",
  • "output": "<strong>John Smith</strong> created post \"Calvin Klein – Between love and madness lies obsession.\"",
  • "originator":
    {},
  • "source":
    {},
  • "createdAt": "2020-01-31T16:48:49.325Z"
}

Find unseen user notifications

query Parameters
page
string >= 0

The number of page of the result set.

limit
string [ 1 .. 50 ]
Default: 20

The numbers of items to return per page.

Responses

200

Success

get /notification/unseen
/api/v1/notification/unseen

Response samples

Copy
Expand all Collapse all
{
  • "total": 76,
  • "page": 1,
  • "pages": 8,
  • "links":
    {
    },
  • "results":
    [
    ]
}

Mark all notifications as seen

Responses

200

Success

patch /notification/mark-as-seen
/api/v1/notification/mark-as-seen

Response samples

Copy
Expand all Collapse all
{
  • "code": 200,
  • "message": "All notifications successfully marked as seen"
}