{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/forward-email/json-schema/forward-email-push-token-schema.json",
  "title": "PushToken",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/forward-email-push-tokens-api-openapi.yml#/components/schemas/PushToken",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique push token document ID"
    },
    "alias": {
      "type": "string",
      "description": "Alias ID this token belongs to"
    },
    "platform": {
      "type": "string",
      "enum": [
        "apns",
        "fcm",
        "unified-push",
        "web-push"
      ],
      "description": "Push notification platform"
    },
    "token": {
      "type": "string",
      "description": "Device token, registration token, or push endpoint URL"
    },
    "device_name": {
      "type": "string",
      "description": "Optional human-readable device name"
    },
    "last_used_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Last successful push delivery timestamp"
    },
    "failure_count": {
      "type": "integer",
      "description": "Consecutive delivery failure count (auto-pruned at 3)"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Token expiry (auto-extended on successful delivery)"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Registration timestamp"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Last update timestamp"
    },
    "object": {
      "type": "string",
      "enum": [
        "push_token"
      ],
      "description": "Object type identifier"
    }
  }
}