{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "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"
    },
    "token": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "name",
    "project",
    "environment",
    "permissions",
    "expiresAt",
    "token"
  ],
  "title": "Personal API key issued",
  "description": "token is the secret, shown only in this answer."
}
