{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "tokens": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "project": {
            "type": "string"
          },
          "environment": {
            "type": "string",
            "enum": ["test", "live"]
          },
          "permissions": {},
          "ingestTrackers": {
            "anyOf": [
              {
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100,
                  "pattern": "^[a-zA-Z0-9_-]+$"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "expiresAt": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "name",
          "project",
          "environment",
          "permissions",
          "expiresAt"
        ]
      }
    },
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "project": {
            "type": "string"
          },
          "environment": {
            "type": "string",
            "enum": ["test", "live"]
          },
          "permissions": {},
          "ingestTrackers": {
            "anyOf": [
              {
                "minItems": 1,
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100,
                  "pattern": "^[a-zA-Z0-9_-]+$"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "expiresAt": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "name",
          "project",
          "environment",
          "permissions",
          "expiresAt"
        ]
      }
    }
  },
  "required": ["tokens"],
  "additionalProperties": {},
  "title": "Personal API keys"
}
