Truvera Documentation portal
WebsiteTruvera Workspace
  • Truvera overview
    • Decentralized identity explained
    • Roadmap
    • Subscription plans & billing
  • Solutions
    • Biometric-Bound Credentials
  • Truvera Workspace
    • Create an organization profile (DID)
    • Issue verifiable credentials
      • Filtering, downloading and deleting credentials
    • Verify credentials
    • Create a schema
    • Create a design
    • Team management
      • Inviting a team member
      • Removing a team member
      • Changing team member roles
      • Data retention policies
      • Sub-accounts
    • Revoking credentials
    • Ecosystem Tools
      • Ecosystem set up
      • Ecosystem example
    • Monetizing credentials
      • Setting up monetizable credentials
    • Creating API keys and webhook endpoints
    • Transaction history
    • Custom branded distribution emails
    • Truvera Workspace release notes
      • 2025 Release notes
        • Release notes Q1 2025
      • 2024 Release notes
        • Release Notes February 2024
        • Release Notes March 2024
        • Release Notes April 2024
        • Release Notes May 2024
        • Release Notes June 2024
        • Release Notes July 2024
        • Release Notes August 2024
        • Release Notes September 2024
        • Release Notes October 2024
        • Release notes November 2024
        • Release notes December 2024
  • Truvera API
    • Getting started
    • Webhooks
      • Webhooks API endpoints
    • Sample Postman collections
      • Issue-Store-Verify sample flow
      • Create ecosystems
      • Issue monetizable credentials
      • Create sub-accounts
      • Issue OpenID credentials
    • Truvera Swagger UI
    • DIDs
    • Profiles
    • Credentials
    • Presentations
      • Proof templates
      • Proof requests
      • Other proof endpoints
    • Registries
    • Revocation Status
    • Credential Schemas
    • Jobs
    • Templates
    • Sub-accounts
    • Teams
    • Messaging
    • OpenID
      • OpenID Issuance and Verification Integration Guide
    • iden3comm
    • Ecosystem Tools
      • Trust Registry Integration Guide
      • Creating a Trust Registry
      • Inviting participants
      • Verifiers and Public info
      • Trust Registry Schemas
      • Trust Registry Proof Templates
      • Reports
      • Updating and Deleting Trust Registry
    • Issuing paid credentials (KVAC algorithm integration)
    • Data
    • Verify
    • Keys
    • Schemas
  • System architecture
    • Proposed architecture with Truvera
    • Revocation
    • System scalability
    • Security policies
    • How data is processed and stored
  • Supported standards
    • Interoperability with OpenID
  • Credential wallet
    • Create and manage DIDs in the Truvera Wallet
    • Truvera Wallet release notes
      • Release Notes 2025Q1
      • Release Notes 2024Q4
      • Release Notes 2024Q3
        • Release Notes September 2024
        • Release Notes August 2024
        • Release Notes July 2024
      • Release Notes June 2024
      • Release Notes May 2024
      • Release Notes April 2024
    • White label wallet
      • Configuration
        • Enabling and Disabling Features
        • Customizing the Styling
        • Configuring for Android Builds
        • Configuring iOS Builds
      • Publishing in App Stores
        • Android Build Testing and Publishing
        • iOS Build Testing and Publishing
    • Wallet SDK
      • Getting started
        • Example Credential
        • Presentation definition
        • Verify credentials
      • Cloud wallet
      • Biometric plugin
      • Ecosystem Tools
    • Download Truvera Wallet
  • Open source community
    • Code of Conduct
    • Truvera Credential SDK
    • Blockchain archives
      • DOCK token
        • Migration terms and conditions
  • Support
    • System Status
    • Discord
    • Support services
    • Security policy
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Truvera API

Sub-accounts

PreviousTemplatesNextTeams

Last updated 21 days ago

Was this helpful?

Sub-accounts are a feature of the Truvera API that allows Truvera's enterprise customers to segregate their data within the Truvera platform based on their own customers. Each sub-account can have its own keys, organization profiles, credential designs and verification templates conveniently organized to help with tracking and auditing of the activity performed by each.

When using a sub-account the parent account will set up separate API keys for each sub-account and then use the sub-account specific API key for the transactions associated with that sub-account.

In order to easier manage sub-account assets can be used.

Sample sub-account Postman collection

Download the collection .

This Postman collection shows a simple example of sub-account set up in 5 steps:

  1. Creating a sub-account

  2. Creating an API key for a sub-account

  3. Creating a DID for the sub-account

  4. Inviting sub-account as a participant in an already existing ecosystem

  5. Accepting the invite

Create sub-account

Sub-accounts are limited to 5 for trial users. The amount of sub-accounts for customers with subscription varies depending on the subscription plan.

List sub-accounts

Get sub-account by ID

Update the specified sub-account

Deletes the specified sub-account

Get sub-account usage

Get details about the activity that this sub-account has performed in the system.

Create sub-account API key

Creates an API key for a sub-account. In order for activity to be associated with the given sub-account an API key needs to be created for that sub-account and then that key must be used for all transactions related to that sub-account.

List sub-account API keys

Delete a sub-account API key

Delete the specified API key for the given sub-account.

Ecosystem Tools
here

List all Subaccounts

get
Authorizations
Query parameters
newFormatbooleanOptional

Whether to use updated array format for the response

Default: false
offsetinteger ยท int32Optional

How many items to offset by for pagination

Default: 0
limitinteger ยท int32 ยท min: 1 ยท max: 64Optional

How many items to return at one time (max 64)

Default: 64
Responses
200
A paged array of subaccounts
application/json
Responseone of
or
get
GET /subaccounts HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Accept: */*
200

A paged array of subaccounts

[
  {
    "id": 1,
    "name": "text",
    "email": "text",
    "image": "text",
    "createdAt": "2024-09-20T11:13:03.445Z"
  }
]

Info for a specific sub-account by ID

get
Authorizations
Path parameters
idintegerRequired

An subaccount ID

Responses
200
Expected response to a valid request
application/json
400
Error getting subaccount
application/json
401
You do not own this subaccount
application/json
404
Subaccount was not found
application/json
get
GET /subaccounts/{id} HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Accept: */*
{
  "id": 1,
  "name": "text",
  "email": "text",
  "image": "text",
  "createdAt": "2024-09-20T11:13:03.445Z"
}

Deletes a single sub-account

delete
Authorizations
Path parameters
idstringRequired

An ID

Responses
200
Subaccount deleted
400
Error deleting subaccount
application/json
401
You do not own this subaccount
application/json
404
Subaccount was not found
application/json
delete
DELETE /subaccounts/{id} HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Accept: */*

No content

Lists transaction usage for this sub account

get
Authorizations
Path parameters
idintegerRequired

An subaccount ID

Query parameters
startTimestring ยท date-timeOptional

Timestamp for the start of the range (ISO 8601)

endTimestring ยท date-timeOptional

Timestamp for the end of the range (ISO 8601)

offsetinteger ยท int32Optional

How many items to offset by for pagination

Default: 0
limitinteger ยท int32 ยท min: 1 ยท max: 64Optional

How many items to return at one time (max 64)

Default: 64
Responses
200
A paged array of subaccount transaction usage metadata
application/json
Responseobject[]

Default response

400
Application error
application/json
401
You do not own this subaccount
application/json
get
GET /subaccounts/{id}/usage HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Accept: */*
[
  {}
]

List all subaccount keys

get
Authorizations
Path parameters
idstringRequired

An ID

Query parameters
offsetinteger ยท int32Optional

How many items to offset by for pagination

Default: 0
limitinteger ยท int32 ยท min: 1 ยท max: 64Optional

How many items to return at one time (max 64)

Default: 64
Responses
200
A paged array of subaccount key metadata
application/json
Responseobject[]

Default response

400
Application error
application/json
401
You do not own this subaccount
application/json
get
GET /subaccounts/{id}/keys HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Accept: */*
[
  {}
]

Deletes a sub-account API key

delete
Authorizations
Path parameters
idinteger ยท int32Required

An subaccount ID

keyIdstringRequired

An API key ID

Responses
200
Subaccount API key deleted
400
Error deleting subaccount API key
application/json
401
You do not own this subaccount
application/json
404
Subaccount API key was not found
application/json
delete
DELETE /subaccounts/{id}/keys/{keyId} HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Accept: */*

No content

  • Sample sub-account Postman collection
  • Create sub-account
  • POSTCreate a Sub-account
  • List sub-accounts
  • GETList all Subaccounts
  • Get sub-account by ID
  • GETInfo for a specific sub-account by ID
  • Update the specified sub-account
  • PATCHUpdate a sub-account
  • Deletes the specified sub-account
  • DELETEDeletes a single sub-account
  • Get sub-account usage
  • GETLists transaction usage for this sub account
  • Create sub-account API key
  • POSTCreates an API key for a subaccount
  • List sub-account API keys
  • GETList all subaccount keys
  • Delete a sub-account API key
  • DELETEDeletes a sub-account API key

Create a Sub-account

post
Authorizations
Body
namestringRequired

The sub account name

imagestringOptional

The sub account image

Responses
200
Subaccount has been created
application/json
400
Error creating subaccount
application/json
402
Transaction limit reached or upgrade required to proceed
application/json
post
POST /subaccounts HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 30

{
  "name": "text",
  "image": "text"
}
{
  "id": 1,
  "name": "text",
  "email": "text",
  "image": "text",
  "createdAt": "2024-09-20T11:13:03.445Z"
}

Update a sub-account

patch
Authorizations
Path parameters
idstringRequired

An ID

Body
namestringRequired

The sub account name

imagestringOptional

The sub account image

Responses
200
Subaccount has been updated
application/json
400
Error creating subaccount
application/json
401
You do not own this subaccount
application/json
402
Transaction limit reached or upgrade required to proceed
application/json
patch
PATCH /subaccounts/{id} HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 30

{
  "name": "text",
  "image": "text"
}
{
  "id": 1,
  "name": "text",
  "email": "text",
  "image": "text",
  "createdAt": "2024-09-20T11:13:03.445Z"
}

Creates an API key for a subaccount

post
Authorizations
Path parameters
idinteger ยท int32Required

An subaccount ID

Body
objectOptional
Responses
200
Subaccoun API key created
application/json
400
Error creating subaccount API key
application/json
401
You do not own this subaccount
application/json
402
Transaction limit reached or upgrade required to proceed
application/json
post
POST /subaccounts/{id}/keys HTTP/1.1
Host: api-testnet.truvera.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 2

{}
{
  "code": 1
}