{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/uptimemonitoring-com/json-schema/uptimemonitoring-com-apikey-schema.json",
  "title": "APIKey",
  "description": "API key metadata (plaintext and hash are never exposed).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/uptimemonitoring-com-keys-api-openapi.yml#/components/schemas/APIKey",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64"
    },
    "account_id": {
      "type": "integer",
      "format": "int64"
    },
    "key_prefix": {
      "type": "string",
      "description": "Prefix for identification: `umk_live_` + first 8 hex chars."
    },
    "label": {
      "type": [
        "string",
        "null"
      ],
      "description": "User-assigned label. New labels (created on or after the #115\ntightening) are trimmed to 3..100 characters. Legacy labels\npersisted before that rule may fall outside this range or carry\nuntrimmed surrounding whitespace and are returned verbatim.\n"
    },
    "revoked_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "If set, the key will stop working after this timestamp."
    },
    "last_used_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "last_used_ip": {
      "type": [
        "string",
        "null"
      ],
      "description": "IP address of the last request authenticated with this key."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}