https://api.truvera.io, the default. A test-mode key only works against the sandbox host https://api-testnet.truvera.io, which uses test data: pass sandbox: true when you create the plugin (truvera({ sandbox: true })) to send every call there.
Things to know:
- Issuing signs a real credential. A credential cannot be edited after it is issued, only revoked and replaced. Issue onto the testnet until the schema, the subject fields and the revocation link are right.
- The issuer must be a DID you control. Truvera rejects a signing request whose
credential.issuerbelongs to another account, which the input schema cannot know, so it surfaces as a 400 with the field path in the error. - Persisting needs a password.
persist: truestores an encrypted copy and requirespassword; the plugin checks this before sending. Persisting a credential holding personal data has regulatory consequences. - Distribution needs a recipient.
distribute: trueneedsrecipient_email,recipient_did, or the holder DID incredential.subject.id, which the plugin also checks first. Email distribution sends the holder an email. - Issuing, revoking and on-chain creates are destructive.
credentials.issuesigns a permanent credential and can email the holder;credentials.revoke,credentials.unrevokeandregistries.revokechange what every verifier sees;dids.create,schemas.createandregistries.createare blockchain transactions that count against the plan’s transaction allowance in production. - Creates answer a job.
schemas.createandregistries.createreturn{ id, data }:idis the job to poll withjobs.get, the registry id isdata.id, and the schema id isdata.schema.$id. - Registries are add-only unless you say otherwise. Without
add_only: false, Truvera refuses to unrevoke a credential in the registry or to delete the registry. - Profiles need a name.
profiles.createandprofiles.updateboth requirename, even when it does not change. - Lists page by offset.
dids.list,profiles.list,schemas.listandregistries.listtakeoffsetandlimit(at most 64). - Errors. HTTP failures are core’s
ApiError.truveraErrorDetails(error)reads the field errors, and an API key Truvera echoes back in a 401 is masked. - Revoking is not deleting.
credentials.revokemakes every verification of that credential fail.credentials.deleteonly removes the metadata record and leaves the credential valid, so revoke before deleting. - Deleting a registry is permanent.
registries.deleteremoves the status of every credential in it, so revocations recorded there are lost. - A 402 is the plan limit. The account’s transaction allowance is used up; nothing is charged and no retry helps.
- Not included. Trust registries, teams, sub-accounts, OpenID issuers, DIDComm messaging, webhooks and proof templates have their own routes and are not part of this plugin.
- 28 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the Truvera API key before the first call: More: API Key
pnpm corsair setup --plugin=truvera --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
List your credential metadataWhat’s next
API reference
Every
truvera.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.