{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/commareports-com/json-schema/commareports-com-notification-subscription-schema.json",
  "title": "NotificationSubscription",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/commareports-com-notifications-api-openapi.yml#/components/schemas/NotificationSubscription",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "report_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "null = every report the owner owns, was invited to, or shares with their team."
    },
    "name": {
      "type": "string"
    },
    "webhook_url": {
      "type": "string",
      "format": "uri"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "revision.created",
          "comment.created",
          "comment.mentioned",
          "signoff.submitted"
        ]
      }
    },
    "format": {
      "type": "string",
      "enum": [
        "slack",
        "discord",
        "plain"
      ]
    },
    "enabled": {
      "type": "boolean"
    },
    "last_delivered_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "last_delivery_status": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "name",
    "webhook_url",
    "events",
    "format",
    "enabled",
    "created_at",
    "updated_at"
  ]
}