{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/formasty-com/json-schema/formasty-com-api-key-profile-response-schema.json",
  "title": "ApiKeyProfileResponse",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/formasty-com-openapi.json#/components/schemas/ApiKeyProfileResponse",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "owner",
    "preferred_workspace",
    "credential"
  ],
  "properties": {
    "owner": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "email",
        "username"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "email": {
          "type": "string",
          "format": "email"
        },
        "username": {
          "type": "string"
        }
      }
    },
    "preferred_workspace": {
      "type": "string"
    },
    "credential": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "type",
        "workspace_id",
        "workspace_name",
        "scopes"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "api_key",
            "oauth"
          ]
        },
        "id": {
          "type": "string"
        },
        "workspace_id": {
          "type": "string"
        },
        "workspace_name": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "prefix": {
          "type": "string"
        },
        "last4": {
          "type": "string"
        },
        "scopes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "last_used_at": {
          "type": [
            "integer",
            "null"
          ]
        },
        "revoked_at": {
          "type": [
            "integer",
            "null"
          ]
        },
        "client_id": {
          "type": "string"
        },
        "connection_id": {
          "type": "string"
        }
      }
    }
  }
}