{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/appy-to/json-schema/appy-to-api-key-created-schema.json",
  "title": "ApiKeyCreated",
  "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/ApiKeyCreated",
  "allOf": [
    {
      "$ref": "#/$defs/ApiKey"
    },
    {
      "type": "object",
      "required": [
        "key"
      ],
      "properties": {
        "key": {
          "type": "string",
          "description": "The full secret key. Shown only in this response."
        }
      }
    }
  ],
  "$defs": {
    "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"
        }
      }
    }
  }
}