# Notification model

A notification for a user.

## Fields

| Field | Type | Present | Notes |
|---|---|---|---|
| `id` | `integer` |  |  |
| `userId` | `integer` |  |  |
| `createdAt` | `date-time` |  |  |
| `updatedAt` | `date-time` |  |  |
| `type` | `enum` |  | One of `Neutral`, `Success`, `Info`, `Warning`, `Error`, `Alert`. |
| `title` | `string` |  |  |
| `message` | `string` |  |  |
| `status` | `enum` |  | One of `Unread`, `Read`, `Acknowledged`. |
| `metadata` | `any` |  |  |

## Returned by

The endpoints whose `data` holds a Notification as it is, and where.

- [`GET /notifications/:notificationId`](https://hematite.gg/docs/developers/reference/notifications#get-notifications-notificationid), in `data`
- [`PATCH /notifications/:notificationId`](https://hematite.gg/docs/developers/reference/notifications#patch-notifications-notificationid), in `data`
- [`GET /users/:userId/notifications`](https://hematite.gg/docs/developers/reference/users#get-users-userid-notifications), in `data[]`
- [`POST /users/:userId/notifications/read`](https://hematite.gg/docs/developers/reference/users#post-users-userid-notifications-read), in `data[]`

## Example

```json
{
  "id": 1,
  "userId": 1,
  "createdAt": "2026-11-10T18:24:00.000Z",
  "updatedAt": "2026-11-10T18:24:00.000Z",
  "type": "Neutral",
  "title": "Clutch on Ascent",
  "message": "OK",
  "status": "Unread",
  "metadata": null
}
```
