# Notifications API

Source: https://frameleaf.app/docs/api/reference/notifications/

Use your own server and its scoped API keys.

## Delete notifications

DELETE /api/notifications

Delete a list of notifications at once.

```json
{
  "description": "Delete a list of notifications at once.",
  "operationId": "deleteNotifications",
  "parameters": [],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/NotificationDeleteAllDto"
        }
      }
    },
    "required": true
  },
  "responses": {
    "204": {
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Delete notifications",
  "tags": [
    "Notifications"
  ],
  "x-frameleaf-permission": "notification.delete"
}
```

## Retrieve notifications

GET /api/notifications

Retrieve a list of notifications.

```json
{
  "description": "Retrieve a list of notifications.",
  "operationId": "getNotifications",
  "parameters": [
    {
      "name": "id",
      "required": false,
      "in": "query",
      "description": "Filter by notification ID",
      "schema": {
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
        "type": "string"
      }
    },
    {
      "name": "level",
      "required": false,
      "in": "query",
      "schema": {
        "$ref": "#/components/schemas/NotificationLevel"
      }
    },
    {
      "name": "type",
      "required": false,
      "in": "query",
      "schema": {
        "$ref": "#/components/schemas/NotificationType"
      }
    },
    {
      "name": "unread",
      "required": false,
      "in": "query",
      "description": "Filter by unread status",
      "schema": {
        "type": "boolean"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "items": {
              "$ref": "#/components/schemas/NotificationDto"
            },
            "type": "array"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Retrieve notifications",
  "tags": [
    "Notifications"
  ],
  "x-frameleaf-permission": "notification.read"
}
```

## Update notifications

PUT /api/notifications

Update a list of notifications. Allows to bulk-set the read status of notifications.

```json
{
  "description": "Update a list of notifications. Allows to bulk-set the read status of notifications.",
  "operationId": "updateNotifications",
  "parameters": [],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/NotificationUpdateAllDto"
        }
      }
    },
    "required": true
  },
  "responses": {
    "204": {
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Update notifications",
  "tags": [
    "Notifications"
  ],
  "x-frameleaf-permission": "notification.update"
}
```

## Delete a notification

DELETE /api/notifications/{id}

Delete a specific notification.

```json
{
  "description": "Delete a specific notification.",
  "operationId": "deleteNotification",
  "parameters": [
    {
      "name": "id",
      "required": true,
      "in": "path",
      "schema": {
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
        "type": "string"
      }
    }
  ],
  "responses": {
    "204": {
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Delete a notification",
  "tags": [
    "Notifications"
  ],
  "x-frameleaf-permission": "notification.delete"
}
```

## Get a notification

GET /api/notifications/{id}

Retrieve a specific notification identified by id.

```json
{
  "description": "Retrieve a specific notification identified by id.",
  "operationId": "getNotification",
  "parameters": [
    {
      "name": "id",
      "required": true,
      "in": "path",
      "schema": {
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/NotificationDto"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Get a notification",
  "tags": [
    "Notifications"
  ],
  "x-frameleaf-permission": "notification.read"
}
```

## Update a notification

PUT /api/notifications/{id}

Update a specific notification to set its read status.

```json
{
  "description": "Update a specific notification to set its read status.",
  "operationId": "updateNotification",
  "parameters": [
    {
      "name": "id",
      "required": true,
      "in": "path",
      "schema": {
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/NotificationUpdateDto"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/NotificationDto"
          }
        }
      },
      "description": ""
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "summary": "Update a notification",
  "tags": [
    "Notifications"
  ],
  "x-frameleaf-permission": "notification.update"
}
```
