{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/autoposting-ai/json-schema/autoposting-ai-notification-item-schema.json",
  "title": "NotificationItem",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/autoposting-ai-notifications-api-openapi.yml#/components/schemas/NotificationItem",
  "type": "object",
  "required": [
    "id",
    "type",
    "title",
    "body",
    "read",
    "createdAt"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "type": {
      "$ref": "#/$defs/NotificationEventType"
    },
    "title": {
      "type": "string"
    },
    "body": {
      "type": "string"
    },
    "read": {
      "type": "boolean"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": true,
      "description": "Event-specific metadata (e.g. postId, brandSlug, platform)."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "NotificationEventType": {
      "type": "string",
      "description": "Notification event type.",
      "enum": [
        "post.published",
        "post.failed",
        "agent.run.completed",
        "clip.render.completed",
        "team.invitation"
      ]
    }
  }
}