{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/daon/json-schema/daon-api-key-schema.json",
  "title": "ApiKey",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/daon-api-keys-api-openapi.yml#/components/schemas/ApiKey",
  "type": "object",
  "properties": {
    "permittedOperations": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "createdDtm": {
      "type": "string",
      "format": "date-time"
    },
    "lastUpdatedDtm": {
      "type": "string",
      "format": "date-time"
    },
    "createdBy": {
      "type": "string"
    },
    "lastUpdatedBy": {
      "type": "string"
    },
    "id": {
      "type": [
        "string",
        "null"
      ]
    },
    "type": {
      "type": "string",
      "enum": [
        "PERMANENT",
        "SESSION"
      ]
    },
    "code": {
      "type": "string"
    },
    "name": {
      "type": "string",
      "maxLength": 255,
      "minLength": 1
    },
    "description": {
      "type": "string",
      "maxLength": 255,
      "minLength": 0
    },
    "status": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "BLOCKED",
        "ARCHIVED"
      ]
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "minItems": 1
    },
    "expiringDtm": {
      "type": "string",
      "format": "date-time"
    },
    "lastIssuedAtDtm": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "name",
    "permissions",
    "status"
  ]
}