Get statements
Reads whether one statement the platform signed about an agent still stands: live, expired, or revoked and when.
GET /v1/principal/statements/{id}
| Address | https://api.hanzo.ai/v1/principal/statements/{id} |
| Method | GET |
| Operation | get_principal_statements_by_id |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Reads whether one statement the platform signed about an agent still stands: live, expired, or revoked and when. Open to anyone — a verifier holding a TaxPrincipalCredential checks it here after checking its signature offline against GET /v1/principal/keys. The answer names nothing the statement itself does not.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the statement's jti, as its JWS carries it. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | principal.Statement | ok |
default | problem-details | refused |
200 body — 10 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
agent | body | string | — | Agent is the agent it is about. |
expires | body | integer (int64) | — | Expires is when it stops standing, unix seconds; zero for a W-9, which stands until the form changes. |
form | body | string | — | Form is the class of tax form it rests on: w9, w8ben or w8bene. |
id | body | string | — | ID is the statement's jti. |
issued | body | integer (int64) | — | Issued is when it was signed, unix seconds. |
jws | body | string | — | JWS is the signed statement itself — the credential an agent presents — answered only to the org it is about. |
kind | body | string | — | Kind is what it states: tax. |
org | body | string | — | Org is the principal the agent answers to. |
revoked | body | integer (int64) | — | Revoked is when it was withdrawn, unix seconds; zero while it stands. |
status | body | string | — | Status is live, expired or revoked. |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, PrincipalApi } from 'hanzoai';
const api = new PrincipalApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getPrincipalStatementsById({ id: 'id' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import PrincipalApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = PrincipalApi(client).get_principal_statements_by_id(id='id')cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.PrincipalAPI.GetPrincipalStatementsById(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, principal_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = principal_api::get_principal_statements_by_id(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.PrincipalApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new PrincipalApi(client).getPrincipalStatementsById();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/principal/statements/<id> \
-H "Authorization: Bearer $HANZO_API_KEY"MCP declares no tool for principal — tools/list on https://api.hanzo.ai/v1/mcp names the products it does reach. Use HTTP or an SDK.
How is this guide?