{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getsocialclaw-com/json-schema/getsocialclaw-com-key-create-response-schema.json",
  "title": "KeyCreateResponse",
  "description": "API key creation 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/KeyCreateResponse",
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "ok": {
      "const": true
    },
    "key": {
      "$ref": "#/$defs/ApiKey"
    },
    "apiKey": {
      "$ref": "#/$defs/ApiKey"
    },
    "secret": {
      "type": [
        "string",
        "null"
      ],
      "description": "Raw secret when returned as a top-level value."
    }
  },
  "required": [
    "ok"
  ],
  "$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"
      ]
    }
  }
}