Skip to content

Trust API

Add a reputation attestation to the trust graph.

POST /v1/trust/attestations
Authorization: Bearer <token>

Permission required: trust:attest

FieldTypeRequiredDescription
issuer_didstringYesDID of the attester
subject_didstringYesDID being attested
domainstringYesTrust domain (e.g., identity, education)
scoreintegerYesReputation score (0-100)
weightnumberNoWeight (0.0-1.0, default: 1.0)
evidencestring[]NoEvidence references
{
"id": "edge-0",
"issuer": "did:key:z6MkIssuer",
"subject": "did:key:z6MkSubject",
"domain": "identity",
"score": 85,
"weight": 1.0
}

List all attestations for a subject DID.

GET /v1/trust/attestations/:did
Authorization: Bearer <token>

Permission required: trust:query


Compute a trust score for a DID in a domain.

GET /v1/trust/score/:did?domain=identity&algorithm=direct
Authorization: Bearer <token>

Permission required: trust:query

ParameterTypeDefaultDescription
domainstringgeneralTrust domain
algorithmstringdirectdirect, transitive, weighted
{
"subject": "did:key:z6Mk...",
"domain": "identity",
"score": 85.0,
"confidence": 1.0,
"direct_count": 3,
"transitive_count": 0
}
AlgorithmDescription
directAverage of direct attestations only
transitivePageRank-style with damping factor (0.85)
weightedReputation-weighted traversal (depth 3)

Delegate scoped access to a credential.

POST /v1/trust/delegate
Authorization: Bearer <token>

Permission required: trust:attest

FieldTypeRequiredDescription
credential_refstringYesReference to the credential being delegated
delegator_didstringYesDelegator’s DID (must belong to your tenant)
delegate_didstringYesDelegate’s DID
purposestringYesDelegation purpose
allowed_claimsstring[]YesWhich claims the delegate can access
max_depthintegerNoMax re-delegation depth
valid_secondsintegerNoValidity duration in seconds
{
"token_id": "tok-abc123",
"delegator": "did:key:z6MkDelegator",
"delegate": "did:key:z6MkDelegate",
"depth": 0,
"scope": {
"purpose": "age verification",
"allowed_claims": ["dateOfBirth", "age_over_18"],
"max_depth": 1,
"valid_until": "2026-04-26T12:00:00Z"
}
}

Verify a delegation token and chain.

POST /v1/trust/verify-delegation
Authorization: Bearer <token>

Permission required: trust:query

{
"token": { "id": "tok-abc123", "delegator": "...", "delegate": "...", "..." }
}
{
"valid": true,
"delegator": "did:key:z6MkDelegator",
"delegate": "did:key:z6MkDelegate",
"depth": 0,
"chain_length": 1
}