{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/derive-to/json-schema/derive-to-notification-schema.json",
  "title": "Notification",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/derive-to-notifications-api-openapi.yml#/components/schemas/Notification",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "user_id": {
      "type": "string",
      "description": "The recipient this notification belongs to"
    },
    "actor": {
      "type": "string",
      "description": "Who triggered it — a person's display name (their handle when they have none)"
    },
    "kind": {
      "type": "string",
      "enum": [
        "mention",
        "comment",
        "share",
        "follow",
        "publish",
        "review",
        "access_request",
        "job"
      ],
      "description": "What happened: mention, comment, share, follow, publish, review, access_request (someone who cannot open the artifact is asking you to grant it), or job (an agent's job needs you or finished; thread_id is the agent id, comment_id the job id, and the artifact fields name its report page when it has one)"
    },
    "artifact_id": {
      "type": "string"
    },
    "artifact_short_id": {
      "type": "string",
      "description": "The artifact's public short id for links; empty for follows (no anchor)"
    },
    "artifact_title": {
      "type": [
        "string",
        "null"
      ],
      "description": "The artifact's title, or null if untitled or not artifact-anchored"
    },
    "thread_id": {
      "type": "string",
      "description": "The comment thread anchor; empty when not comment-related"
    },
    "comment_id": {
      "type": "string",
      "description": "The specific comment anchor; empty when not comment-related"
    },
    "preview": {
      "type": "string",
      "description": "Short text preview shown in the notification bell"
    },
    "org_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The workspace the row is about, when opening it means switching there first (a job row); null otherwise"
    },
    "read": {
      "anyOf": [
        {
          "type": "number",
          "enum": [
            0
          ]
        },
        {
          "type": "number",
          "enum": [
            1
          ]
        }
      ],
      "description": "Whether the user has read it: 0 unread, 1 read"
    },
    "created_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "user_id",
    "actor",
    "kind",
    "artifact_id",
    "artifact_short_id",
    "artifact_title",
    "thread_id",
    "comment_id",
    "preview",
    "read",
    "created_at"
  ]
}