{
"openapi": "3.1.0",
"info": {
"title": "Notifications",
"version": "2.14.0",
"description": "This app provides a backend and frontend for the notification API available in Nextcloud.",
"license": {
"name": "agpl",
"identifier": "AGPL-3.0"
}
},
"servers": [
"url": "https://{hostname}:{port}",
"variables": {
"hostname": {
"default": "localhost"
"port": {
"default": "8080"
],
"security": [
"basic_auth": []
"tags": [],
"components": {
"schemas": {
"OCSMeta": {
"type": "object",
"required": [
"status",
"statuscode"
"properties": {
"status": {
"type": "string"
"statuscode": {
"type": "integer"
"message": {
"totalitems": {
"itemsperpage": {
"EmptyOCS": {
"ocs"
"ocs": {
"meta",
"data"
"meta": {
"$ref": "#/components/schemas/OCSMeta"
"data": {
"type": "array"
"Notification": {
"notification_id",
"app",
"user",
"datetime",
"object_type",
"object_id",
"subject",
"message",
"link",
"subjectRich",
"subjectRichParameters",
"messageRich",
"messageRichParameters",
"icon",
"actions"
"notification_id": {
"app": {
"user": {
"datetime": {
"object_type": {
"object_id": {
"subject": {
"link": {
"subjectRich": {
"subjectRichParameters": {
"type": "object"
"messageRich": {
"messageRichParameters": {
"icon": {
"actions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NotificationAction"
"NotificationAction": {
"label",
"type"
"label": {
"type": {
"primary": {
"type": "boolean"
"ListNotifications": {
"$ref": "#/components/schemas/Notification"
"GetNotification": {
"PushServerSubscription": {
"publicKey",
"deviceIdentifier",
"signature"
"publicKey": {
"deviceIdentifier": {
"signature": {
"PushServerRegistration": {
"$ref": "#/components/schemas/PushServerSubscription"
"NotificationDecryptedSubject": {
"nid": {
"id": {
"delete": {
"delete-all": {
"securitySchemes": {
"basic_auth": {
"type": "http",
"scheme": "basic"
"paths": {
"/ocs/v2.php/apps/notifications/api/v2/notifications": {
"get": {
"operationId": "list-notifications",
"tags": [
"notifications"
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListNotifications"
"operationId": "delete-all-notifications",
"/ocs/v2.php/apps/notifications/api/v2/notifications/{id}": {
"parameters": [
"name": "id",
"in": "path",
"required": true,
"operationId": "get-notification",
"$ref": "#/components/schemas/GetNotification"
"operationId": "delete-notification",
"$ref": "#/components/schemas/EmptyOCS"
"/ocs/v2.php/apps/notifications/api/v2/push": {
"post": {
"operationId": "register-device",
"name": "pushTokenHash",
"in": "query",
"name": "devicePublicKey",
"name": "proxyServer",
"description": "This URL has to end with a / otherwise the device will not be able to register"
"201": {
"$ref": "#/components/schemas/PushServerRegistration"
"operationId": "remove-device",
"202": {
"/ocs/v2.php/apps/notifications/api/v2/admin_notifications/{userId}": {
"name": "userId",
"operationId": "send-admin-notification",
"name": "shortMessage",
"name": "longMessage",
"required": false,
"type": "string",
"default": ""