{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getsocialclaw-com/json-schema/getsocialclaw-com-key-validation-response-schema.json",
  "title": "KeyValidationResponse",
  "description": "Valid API key response.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getsocialclaw-com-status-and-authentication-api-openapi.yml#/components/schemas/KeyValidationResponse",
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "ok": {
      "const": true
    },
    "tenant": {
      "$ref": "#/$defs/Tenant"
    },
    "apiKey": {
      "$ref": "#/$defs/ApiKey"
    }
  },
  "required": [
    "ok",
    "tenant",
    "apiKey"
  ],
  "$defs": {
    "ApiKey": {
      "type": "object",
      "description": "API key metadata. Secret values are only returned when a key is created or shown in the dashboard key API.",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "description": "API key id, for example key_abc123."
        },
        "prefix": {
          "type": [
            "string",
            "null"
          ],
          "description": "Public prefix used to identify the key without exposing the secret."
        },
        "label": {
          "type": [
            "string",
            "null"
          ],
          "description": "Optional human label."
        },
        "kind": {
          "type": [
            "string",
            "null"
          ],
          "description": "Key kind, such as personal or agent."
        },
        "secret": {
          "type": [
            "string",
            "null"
          ],
          "description": "Raw key secret. Only present at creation or in dashboard key listings."
        },
        "createdAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "Creation time.",
          "format": "date-time"
        },
        "revokedAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "Revocation time.",
          "format": "date-time"
        },
        "lastUsedAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "Last successful API authentication time.",
          "format": "date-time"
        }
      },
      "required": [
        "id"
      ]
    },
    "Tenant": {
      "type": "object",
      "description": "Workspace visible to the authenticated API key or dashboard session.",
      "additionalProperties": true,
      "properties": {
        "id": {
          "type": "string",
          "description": "Workspace id."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Workspace name."
        },
        "plan": {
          "type": [
            "string",
            "null"
          ],
          "description": "Workspace plan."
        },
        "subscriptionStatus": {
          "type": [
            "string",
            "null"
          ],
          "description": "Billing subscription status."
        },
        "entitlements": {
          "type": [
            "object",
            "null"
          ],
          "description": "Plan capabilities and limits."
        }
      },
      "required": [
        "id"
      ]
    }
  }
}