{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/raygun/json-schema/raygun-session-schema.json",
  "title": "session",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/raygun-sessions-api-openapi.yml#/components/schemas/session",
  "type": "object",
  "properties": {
    "identifier": {
      "type": "string"
    },
    "applicationIdentifier": {
      "type": "string"
    },
    "customerIdentifier": {
      "type": "string"
    },
    "isActive": {
      "type": "boolean"
    },
    "startedAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "endedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "ipAddress": {
      "type": "string",
      "oneOf": [
        {
          "format": "ipv4"
        },
        {
          "format": "ipv6"
        }
      ]
    },
    "countryCode": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^[A-Z]{2}$",
      "description": "ISO 3166-1 alpha-2 country code"
    },
    "platformName": {
      "type": "string"
    },
    "operatingSystemName": {
      "type": "string"
    },
    "operatingSystemVersion": {
      "type": [
        "string",
        "null"
      ]
    },
    "browserName": {
      "type": "string"
    },
    "browserVersion": {
      "type": [
        "string",
        "null"
      ]
    },
    "viewportWidth": {
      "type": "integer"
    },
    "viewportHeight": {
      "type": "integer"
    },
    "deploymentVersion": {
      "type": [
        "string",
        "null"
      ]
    },
    "applicationUrl": {
      "type": "string",
      "format": "uri",
      "description": "URL to view the session in Raygun"
    }
  },
  "required": [
    "identifier",
    "applicationIdentifier",
    "customerIdentifier",
    "isActive",
    "startedAt",
    "updatedAt",
    "endedAt",
    "ipAddress",
    "countryCode",
    "platformName",
    "operatingSystemName",
    "operatingSystemVersion",
    "browserName",
    "browserVersion",
    "viewportWidth",
    "viewportHeight",
    "deploymentVersion",
    "applicationUrl"
  ]
}