{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/planka/main/json-schema/planka-notification-schema.json",
  "title": "Notification",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/planka-openapi.json#/components/schemas/Notification",
  "type": "object",
  "required": [
    "id",
    "userId",
    "creatorUserId",
    "boardId",
    "cardId",
    "commentId",
    "actionId",
    "type",
    "data",
    "isRead",
    "createdAt",
    "updatedAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the notification"
    },
    "userId": {
      "type": "string",
      "description": "ID of the user who receives the notification"
    },
    "creatorUserId": {
      "type": [
        "string",
        "null"
      ],
      "description": "ID of the user who created the notification"
    },
    "boardId": {
      "type": "string",
      "description": "ID of the board associated with the notification (denormalized)"
    },
    "cardId": {
      "type": "string",
      "description": "ID of the card associated with the notification"
    },
    "commentId": {
      "type": [
        "string",
        "null"
      ],
      "description": "ID of the comment associated with the notification"
    },
    "actionId": {
      "type": [
        "string",
        "null"
      ],
      "description": "ID of the action associated with the notification"
    },
    "type": {
      "type": "string",
      "enum": [
        "moveCard",
        "commentCard",
        "addMemberToCard",
        "mentionInComment"
      ],
      "description": "Type of the notification"
    },
    "data": {
      "type": "object",
      "description": "Notification specific data (varies by type)"
    },
    "isRead": {
      "type": "boolean",
      "default": false,
      "description": "Whether the notification has been read"
    },
    "createdAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the notification was created"
    },
    "updatedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the notification was last updated"
    }
  }
}