{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vee3-io/json-schema/vee3-io-admin-account-detail-response-schema.json",
  "title": "AdminAccountDetailResponse",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vee3-io-openapi.json#/components/schemas/AdminAccountDetailResponse",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "email": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Email"
    },
    "status": {
      "$ref": "#/$defs/AccountStatus"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "has_login": {
      "type": "boolean",
      "title": "Has Login"
    },
    "is_platform_admin": {
      "type": "boolean",
      "title": "Is Platform Admin"
    },
    "billing_plan": {
      "$ref": "#/$defs/BillingPlan"
    },
    "subscription_status": {
      "$ref": "#/$defs/SubscriptionStatus"
    },
    "billing_period_start": {
      "type": "string",
      "format": "date-time",
      "title": "Billing Period Start"
    },
    "billing_period_end": {
      "type": "string",
      "format": "date-time",
      "title": "Billing Period End"
    },
    "monthly_token_allowance": {
      "type": "integer",
      "title": "Monthly Token Allowance"
    },
    "tokens_used": {
      "type": "integer",
      "title": "Tokens Used"
    },
    "tokens_remaining": {
      "type": "integer",
      "title": "Tokens Remaining"
    },
    "signup_attribution": {
      "anyOf": [
        {
          "$ref": "#/$defs/SignupAttributionPayload"
        },
        {
          "type": "null"
        }
      ]
    },
    "available_features": {
      "items": {
        "$ref": "#/$defs/AdminFeatureDefinitionResponse"
      },
      "type": "array",
      "title": "Available Features"
    },
    "unlocked_feature_ids": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Unlocked Feature Ids"
    },
    "effective_unlocked_feature_ids": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Effective Unlocked Feature Ids"
    },
    "api_keys": {
      "items": {
        "$ref": "#/$defs/PortalApiKeyResponse"
      },
      "type": "array",
      "title": "Api Keys"
    },
    "connected_accounts": {
      "items": {
        "$ref": "#/$defs/PortalConnectedAccountResponse"
      },
      "type": "array",
      "title": "Connected Accounts"
    },
    "recent_usage": {
      "items": {
        "$ref": "#/$defs/PortalUsageLogResponse"
      },
      "type": "array",
      "title": "Recent Usage"
    }
  },
  "type": "object",
  "required": [
    "id",
    "name",
    "email",
    "status",
    "created_at",
    "has_login",
    "is_platform_admin",
    "billing_plan",
    "subscription_status",
    "billing_period_start",
    "billing_period_end",
    "monthly_token_allowance",
    "tokens_used",
    "tokens_remaining",
    "signup_attribution",
    "available_features",
    "unlocked_feature_ids",
    "effective_unlocked_feature_ids",
    "api_keys",
    "connected_accounts",
    "recent_usage"
  ],
  "$defs": {
    "AccountStatus": {
      "type": "string",
      "enum": [
        "active",
        "suspended"
      ],
      "title": "AccountStatus"
    },
    "AdminFeatureDefinitionResponse": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "display_name": {
          "type": "string",
          "title": "Display Name"
        },
        "description": {
          "type": "string",
          "title": "Description"
        }
      },
      "type": "object",
      "required": [
        "id",
        "display_name",
        "description"
      ],
      "title": "AdminFeatureDefinitionResponse"
    },
    "ApiKeyCredentialType": {
      "type": "string",
      "enum": [
        "api_key",
        "oauth_client"
      ],
      "title": "ApiKeyCredentialType"
    },
    "ApiKeyStatus": {
      "type": "string",
      "enum": [
        "active",
        "revoked"
      ],
      "title": "ApiKeyStatus"
    },
    "BillingPlan": {
      "type": "string",
      "enum": [
        "free",
        "starter",
        "pro",
        "scale"
      ],
      "title": "BillingPlan"
    },
    "ConnectedAccountStatus": {
      "type": "string",
      "enum": [
        "active",
        "disconnected"
      ],
      "title": "ConnectedAccountStatus"
    },
    "PortalApiKeyResponse": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "credential_type": {
          "$ref": "#/$defs/ApiKeyCredentialType"
        },
        "key_prefix": {
          "type": "string",
          "title": "Key Prefix"
        },
        "client_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Client Id"
        },
        "project_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "Project Id"
        },
        "status": {
          "$ref": "#/$defs/ApiKeyStatus"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        },
        "revoked_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Revoked At"
        },
        "last_used_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Used At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "credential_type",
        "key_prefix",
        "status",
        "created_at",
        "revoked_at",
        "last_used_at"
      ],
      "title": "PortalApiKeyResponse"
    },
    "PortalConnectedAccountResponse": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "provider": {
          "type": "string",
          "title": "Provider"
        },
        "provider_user_id": {
          "type": "string",
          "title": "Provider User Id"
        },
        "screen_name": {
          "type": "string",
          "title": "Screen Name"
        },
        "display_name": {
          "type": "string",
          "title": "Display Name"
        },
        "avatar_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Avatar Url"
        },
        "status": {
          "$ref": "#/$defs/ConnectedAccountStatus"
        },
        "is_default": {
          "type": "boolean",
          "title": "Is Default"
        },
        "scopes": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Scopes"
        },
        "connected_at": {
          "type": "string",
          "format": "date-time",
          "title": "Connected At"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "title": "Updated At"
        },
        "google_search_console_properties": {
          "items": {
            "$ref": "#/$defs/PortalGoogleSearchConsolePropertyResponse"
          },
          "type": "array",
          "title": "Google Search Console Properties"
        }
      },
      "type": "object",
      "required": [
        "id",
        "provider",
        "provider_user_id",
        "screen_name",
        "display_name",
        "avatar_url",
        "status",
        "is_default",
        "scopes",
        "connected_at",
        "updated_at"
      ],
      "title": "PortalConnectedAccountResponse"
    },
    "PortalGoogleSearchConsolePropertyResponse": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "connection_id": {
          "type": "string",
          "format": "uuid",
          "title": "Connection Id"
        },
        "site_url": {
          "type": "string",
          "title": "Site Url"
        },
        "permission_level": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Permission Level"
        },
        "screen_name": {
          "type": "string",
          "title": "Screen Name"
        },
        "display_name": {
          "type": "string",
          "title": "Display Name"
        },
        "avatar_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Avatar Url"
        },
        "is_default": {
          "type": "boolean",
          "title": "Is Default"
        },
        "connected_at": {
          "type": "string",
          "format": "date-time",
          "title": "Connected At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "connection_id",
        "site_url",
        "permission_level",
        "screen_name",
        "display_name",
        "avatar_url",
        "is_default",
        "connected_at"
      ],
      "title": "PortalGoogleSearchConsolePropertyResponse"
    },
    "PortalUsageLogResponse": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "request_id": {
          "type": "string",
          "title": "Request Id"
        },
        "endpoint": {
          "type": "string",
          "title": "Endpoint"
        },
        "method": {
          "type": "string",
          "title": "Method"
        },
        "status_code": {
          "type": "integer",
          "title": "Status Code"
        },
        "error_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Error Code"
        },
        "capability_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Capability Id"
        },
        "source": {
          "$ref": "#/$defs/UsageLogSource"
        },
        "duration_ms": {
          "type": "integer",
          "title": "Duration Ms"
        },
        "token_count": {
          "type": "integer",
          "title": "Token Count"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "request_id",
        "endpoint",
        "method",
        "status_code",
        "error_code",
        "capability_id",
        "source",
        "duration_ms",
        "token_count",
        "created_at"
      ],
      "title": "PortalUsageLogResponse"
    },
    "SignupAttributionPayload": {
      "properties": {
        "landing_path": {
          "type": "string",
          "maxLength": 2048,
          "minLength": 1,
          "title": "Landing Path"
        },
        "referrer": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2048
            },
            {
              "type": "null"
            }
          ],
          "title": "Referrer"
        },
        "utm_source": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 255
            },
            {
              "type": "null"
            }
          ],
          "title": "Utm Source"
        },
        "utm_medium": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 255
            },
            {
              "type": "null"
            }
          ],
          "title": "Utm Medium"
        },
        "utm_campaign": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 255
            },
            {
              "type": "null"
            }
          ],
          "title": "Utm Campaign"
        },
        "utm_content": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 255
            },
            {
              "type": "null"
            }
          ],
          "title": "Utm Content"
        },
        "utm_term": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 255
            },
            {
              "type": "null"
            }
          ],
          "title": "Utm Term"
        },
        "ref": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 255
            },
            {
              "type": "null"
            }
          ],
          "title": "Ref"
        },
        "gclid": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 255
            },
            {
              "type": "null"
            }
          ],
          "title": "Gclid"
        },
        "gbraid": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 255
            },
            {
              "type": "null"
            }
          ],
          "title": "Gbraid"
        },
        "wbraid": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 255
            },
            {
              "type": "null"
            }
          ],
          "title": "Wbraid"
        },
        "captured_at": {
          "type": "string",
          "format": "date-time",
          "title": "Captured At"
        }
      },
      "type": "object",
      "required": [
        "landing_path",
        "captured_at"
      ],
      "title": "SignupAttributionPayload"
    },
    "SubscriptionStatus": {
      "type": "string",
      "enum": [
        "none",
        "active",
        "past_due",
        "canceled",
        "incomplete"
      ],
      "title": "SubscriptionStatus"
    },
    "UsageLogSource": {
      "type": "string",
      "enum": [
        "api",
        "mcp"
      ],
      "title": "UsageLogSource"
    }
  }
}