{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/abm-dev/json-schema/abm-dev-create-api-key-response-schema.json",
  "title": "CreateApiKeyResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/abm-dev-openapi.json#/components/schemas/CreateApiKeyResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "key": {
      "type": "string",
      "description": "Plaintext API key — returned ONLY on creation/rotation. Store this securely; it cannot be retrieved again."
    },
    "name": {
      "type": "string"
    },
    "environment": {
      "type": "string",
      "enum": [
        "test",
        "live"
      ]
    },
    "scopes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time"
    },
    "warning": {
      "type": "string",
      "description": "Reminder that the plaintext key is only shown once"
    }
  }
}