{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/appy-to/json-schema/appy-to-api-key-schema.json",
  "title": "ApiKey",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/appy-to-api-keys-api-openapi.yml#/components/schemas/ApiKey",
  "type": "object",
  "required": [
    "id",
    "name",
    "prefix",
    "createdAt",
    "lastUsedAt",
    "revokedAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "prefix": {
      "type": "string",
      "description": "First characters of the key so you can recognise it."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "lastUsedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Updated at most once a minute."
    },
    "revokedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}