Sample payload
Sample discovery response
Sanitized example based on the current Kai-style test user. Right now the discovered surface is primarily financial.
{
"user_id": "kai_test_user",
"available_domains": ["financial"],
"scopes": [
"pkm.read",
"attr.financial.*",
"attr.financial.portfolio.*",
"attr.financial.profile.*",
"attr.financial.documents.*",
"attr.financial.analysis_history.*",
"attr.financial.runtime.*",
"attr.financial.analysis.decisions.*"
],
"source": "pkm_index_v2 + manifest-backed scope discovery"
}
Sample payload
Sample scoped data response
Illustrative `get_scoped_data` shape for an approved `attr.financial.*` grant, using the current financial summary fields we have now.
{
"status": "success",
"user_id": "kai_test_user",
"scope": "attr.financial.*",
"consent_verified": true,
"data": {
"financial": {
"intent_map": [
"portfolio",
"profile",
"documents",
"analysis_history",
"runtime",
"analysis.decisions"
],
"item_count": 19,
"risk_score": 4,
"risk_bucket": "aggressive",
"risk_profile": "balanced",
"active_source": "statement",
"holdings_count": 19,
"documents_count": 1,
"profile_completed": true,
"portfolio_risk_bucket": "aggressive",
"investable_positions_count": 19,
"last_statement_total_value": 6951964.54,
"domain_contract_version": 1
}
},
"top_level_keys": ["financial"],
"zero_knowledge": true
}
Sample payload
Sample reused broader grant
If the app already holds a broader active grant and asks for a narrower branch, the request is reused immediately and the response tells you which broader scope is covering the ask.
{
"status": "already_granted",
"scope": "attr.financial.analytics.quality_metrics",
"requested_scope": "attr.financial.analytics.quality_metrics",
"granted_scope": "attr.financial.analytics.*",
"coverage_kind": "superset",
"covered_by_existing_grant": true,
"consent_token": "HCT:...",
"expires_at": 1760000000000
}