# Notifications

## Gets notifications for the current recipient.

> Retrieves a paginated list of notifications for the current recipient.

```json
{"openapi":"3.0.4","info":{"title":"\"Notifications API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.NotificationService.Models.NotificationReadModel":{"required":["dateAdded","isRead","message","objectIdentifier","title","type"],"type":"object","properties":{"dateAdded":{"type":"string","format":"date-time"},"objectIdentifier":{"type":"string","format":"uuid"},"isRead":{"type":"boolean"},"title":{"type":"string","nullable":true},"message":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"resourceIdentifiers":{"type":"object","additionalProperties":{"type":"string"},"nullable":true}},"additionalProperties":false}}},"paths":{"/notifications":{"get":{"tags":["Notifications"],"summary":"Gets notifications for the current recipient.","description":"Retrieves a paginated list of notifications for the current recipient.","parameters":[{"name":"pageNumber","in":"query","description":"The page number for paginated results.","schema":{"type":"integer","format":"int32"}},{"name":"pageSize","in":"query","description":"The number of items per page.","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.NotificationService.Models.NotificationReadModel"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.NotificationService.Models.NotificationReadModel"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.NotificationService.Models.NotificationReadModel"}}}}},"403":{"description":"Forbidden"}}}}}}
```

## Creates a new notification and sends it to all specified recipients.

> Creates a new notification and sends it to all specified recipients.

```json
{"openapi":"3.0.4","info":{"title":"\"Notifications API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.Entities.AdminNotificationWriteModel":{"required":["message","recipients","type"],"type":"object","properties":{"recipients":{"type":"array","items":{"type":"string"},"nullable":true},"message":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"resourceIdentifiers":{"type":"object","additionalProperties":{"type":"string"},"nullable":true}},"additionalProperties":false}}},"paths":{"/notifications":{"post":{"tags":["Notifications"],"summary":"Creates a new notification and sends it to all specified recipients.","description":"Creates a new notification and sends it to all specified recipients.","requestBody":{"description":"The notification data to create.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.AdminNotificationWriteModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.AdminNotificationWriteModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.AdminNotificationWriteModel"}}}},"responses":{"201":{"description":"Created"},"400":{"description":"Bad Request"},"403":{"description":"Forbidden"}}}}}}
```

## Deletes a notification by its object identifier.

> Deletes a notification using its object identifier.

```json
{"openapi":"3.0.4","info":{"title":"\"Notifications API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/notifications/{objectIdentifier}":{"delete":{"tags":["Notifications"],"summary":"Deletes a notification by its object identifier.","description":"Deletes a notification using its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","description":"The object identifier of the notification to delete.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"No Content"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}}}}
```

## Updates the read status of a notification for the current recipient.

> Updates the read status of a notification for the current recipient.

```json
{"openapi":"3.0.4","info":{"title":"\"Notifications API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.NotificationService.Models.UpdateReadStatus":{"type":"object","properties":{"isRead":{"type":"boolean"}},"additionalProperties":false}}},"paths":{"/notifications/{objectIdentifier}":{"patch":{"tags":["Notifications"],"summary":"Updates the read status of a notification for the current recipient.","description":"Updates the read status of a notification for the current recipient.","parameters":[{"name":"objectIdentifier","in":"path","description":"The object identifier of the notification.","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"The read status update model.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.NotificationService.Models.UpdateReadStatus"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.NotificationService.Models.UpdateReadStatus"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.NotificationService.Models.UpdateReadStatus"}}}},"responses":{"204":{"description":"No Content"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}}}}
```

## Marks all notifications as read for the current recipient.

> Marks all notifications as read for the current recipient.

```json
{"openapi":"3.0.4","info":{"title":"\"Notifications API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/notifications/read-all":{"post":{"tags":["Notifications"],"summary":"Marks all notifications as read for the current recipient.","description":"Marks all notifications as read for the current recipient.","responses":{"200":{"description":"OK"},"403":{"description":"Forbidden"}}}}}}
```
