{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pushary-com/json-schema/pushary-com-subscriber-schema.json",
  "title": "Subscriber",
  "description": "One browser push subscription belonging to a site.",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pushary-com-openapi.json#/components/schemas/Subscriber",
  "type": "object",
  "required": [
    "id",
    "siteId",
    "endpoint",
    "status",
    "createdAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Pushary identifier for this subscriber."
    },
    "siteId": {
      "type": "string",
      "description": "The site this subscriber belongs to."
    },
    "endpoint": {
      "type": "string",
      "description": "The push service endpoint the browser issued."
    },
    "status": {
      "type": "string",
      "description": "Delivery state of the subscription.",
      "enum": [
        "active",
        "unsubscribed",
        "expired",
        "bounced"
      ]
    },
    "browser": {
      "type": "string",
      "description": "Browser name, derived from the user agent at subscribe time."
    },
    "os": {
      "type": "string",
      "description": "Operating system, derived from the user agent at subscribe time."
    },
    "deviceType": {
      "type": "string",
      "description": "Device class.",
      "enum": [
        "mobile",
        "tablet",
        "desktop"
      ]
    },
    "country": {
      "type": "string",
      "description": "ISO 3166-1 alpha-2 country, derived from the subscribe request."
    },
    "city": {
      "type": "string",
      "description": "City, derived from the subscribe request."
    },
    "timezone": {
      "type": "string",
      "description": "IANA timezone reported by the browser."
    },
    "language": {
      "type": "string",
      "description": "BCP 47 language reported by the browser."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Segmentation tags."
    },
    "externalId": {
      "type": "string",
      "description": "Your own identifier for this person, if you set one."
    },
    "createdAt": {
      "type": "string",
      "description": "When the subscription was created.",
      "format": "date-time"
    },
    "lastActiveAt": {
      "type": "string",
      "description": "When this subscriber was last seen.",
      "format": "date-time"
    }
  }
}