{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/webex/json-schema/webex-compliance-status-response-schema.json",
  "title": "ComplianceStatusResponse",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/webex-emergency-services-settings-api-openapi.yml#/components/schemas/ComplianceStatusResponse",
  "type": "object",
  "required": [
    "orgStatus",
    "complianceStatus"
  ],
  "properties": {
    "orgStatus": {
      "$ref": "#/$defs/OrgStatusEnum",
      "description": "The RedSky account configuration status for the organization."
    },
    "complianceStatus": {
      "$ref": "#/$defs/ComplianceStatusResponseEnum",
      "description": "The RedSky account's compliance status."
    },
    "companyId": {
      "type": "string",
      "description": "The RedSky held token from the secret response."
    },
    "redSkyOrgId": {
      "type": "string",
      "description": "The RedSky organization ID for the organization which can be found in the RedSky portal."
    },
    "adminExists": {
      "type": "boolean",
      "description": "`true` if an Admin has been created in RedSky."
    },
    "locationsStatus": {
      "$ref": "#/$defs/ComplianceStatusResponseLocationStatusObject",
      "description": "Object that contains a list of locations, the `count` for the location list, and the `state` for the location that has completed the least amount of setup. Available if at least one location is exists."
    }
  },
  "$defs": {
    "ComplianceStatusResponseEnum": {
      "type": "string",
      "enum": [
        "OPTED_OUT",
        "EXEMPTED",
        "NON_COMPLIANT",
        "COMPLIANT"
      ],
      "description": " * `OPTED_OUT` - Customer has opted out of the E911 service.\n * `EXEMPTED` - RedSky account compliance status has been exempted.\n * `NON_COMPLIANT` - RedSky account is non-compliant.\n * `COMPLIANT` - RedSky account is compliant.\n"
    },
    "ComplianceStatusResponseLocationStatusObject": {
      "type": "object",
      "properties": {
        "state": {
          "$ref": "#/$defs/UpdateComplianceStatusResponseLocationStateEnum",
          "description": "Configuration stage that was last completed. The order of precedence is `LOCATION_SETUP`, `ALERTS`, `NETWORK_ELEMENTS`, `ROUTING_ENABLE`. If at least one location is `LOCATION_SETUP`, then `locationState` will be set to `LOCATION_SETUP`. Otherwise, `locationState` will check for the next precedence option and at least one location should have that option."
        },
        "count": {
          "type": "number",
          "description": "Total count of locations available in the organization."
        },
        "locations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ComplianceStatusResponseRedSkyClientLocation"
          },
          "description": "List of locations that have completed the least amount of setup. Only 4 locations are included in this list."
        }
      }
    },
    "ComplianceStatusResponseRedSkyClientLocation": {
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for the location."
        },
        "name": {
          "type": "string",
          "description": "Name of the location."
        }
      }
    },
    "OrgStatusEnum": {
      "type": "string",
      "enum": [
        "INITIALISE",
        "ENABLED",
        "OPTED_OUT"
      ],
      "description": " * `INITIALISE` - RedSky account configuration process is in progress.\n * `ENABLED` - RedSky account configuration process is complete.\n * `OPTED_OUT` - Customer has opted out of the E911 service.\n"
    },
    "UpdateComplianceStatusResponseLocationStateEnum": {
      "type": "string",
      "enum": [
        "LOCATION_SETUP",
        "ALERTS",
        "NETWORK_ELEMENTS",
        "ROUTING_ENABLE"
      ],
      "description": " * `LOCATION_SETUP` - RedSky account is pending location setup.\n * `ALERTS` - RedSky account is pending email notification configuration.\n * `NETWORK_ELEMENTS` - RedSky account is pending network element setup.\n * `ROUTING_ENABLE` - RedSky account is pending the routing enable setup stage.\n"
    }
  }
}