# REST-API: Notifications

> Die 5 Operationen des Bereichs Notifications, mit Parametern, Bodys und Antworten.

Source: https://pithyx.org/de/docs/reference/api/notifications/
Markdown: https://pithyx.org/de/docs/reference/api/notifications.md

Erzeugt aus dem OpenAPI-Dokument des Daemons. Konventionen, Anmeldung, der CSRF-Header und der WebSocket stehen unter [API](https://pithyx.org/de/docs/developers/daemon/api/).

## GET /api/notifications

The signed-in user's notifications, newest first: at most 200, none older than 30 days. Live through the notifications topic, whose snapshot is the same list.

**Antworten**

- 200: `application/json`: [NotificationList](https://pithyx.org/de/docs/reference/api/schemas/#notificationlist)

Jeder Fehler antwortet mit Problem Details (`application/problem+json`) und einem stabilen Code aus der [Fehlerreferenz](https://pithyx.org/de/docs/reference/errors/).

## DELETE /api/notifications

Deletes every notification of the signed-in user. Storage alerts are not notifications and stay.

**Antworten**

- 204

Jeder Fehler antwortet mit Problem Details (`application/problem+json`) und einem stabilen Code aus der [Fehlerreferenz](https://pithyx.org/de/docs/reference/errors/).

## DELETE /api/notifications/{id}

Deletes one notification of the signed-in user. Someone else's answers 404 notifications.notification.not_found.

**Parameter**

| Name | Ort  | Typ             | Pflicht | Beschreibung |
| ---- | ---- | --------------- | ------- | ------------ |
| `id` | path | integer (int64) | ja      |              |

**Antworten**

- 204

Jeder Fehler antwortet mit Problem Details (`application/problem+json`) und einem stabilen Code aus der [Fehlerreferenz](https://pithyx.org/de/docs/reference/errors/).

## POST /api/notifications/app

What a core app's SDK notify call becomes: a notification for the signed-in user with the app's plain text, stored as app.message. Only for core apps (org.pithyx.*, auth.permission.denied otherwise); third-party apps send theirs to /api/app/notifications with their token. Invalid fields answer 400 notifications.message.invalid.

**Anfrage-Body**: `application/json`: [AppNotificationRequest](https://pithyx.org/de/docs/reference/api/schemas/#appnotificationrequest)

**Antworten**

- 201: `application/json`: [Notification](https://pithyx.org/de/docs/reference/api/schemas/#notification)

Jeder Fehler antwortet mit Problem Details (`application/problem+json`) und einem stabilen Code aus der [Fehlerreferenz](https://pithyx.org/de/docs/reference/errors/).

## POST /api/notifications/read

Marks the given notifications of the signed-in user as read, or all of them without ids. Unknown ids are ignored.

**Anfrage-Body**: `application/json`: [MarkNotificationsReadRequest](https://pithyx.org/de/docs/reference/api/schemas/#marknotificationsreadrequest)

**Antworten**

- 204

Jeder Fehler antwortet mit Problem Details (`application/problem+json`) und einem stabilen Code aus der [Fehlerreferenz](https://pithyx.org/de/docs/reference/errors/).
