Sub-accounts

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 Ecosystem Tools can be used.

Sample sub-account Postman collection

Download the collection herearrow-up-right.

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.

Create a Sub-account

post
/subaccounts
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
namestringRequired

The sub account name

imagestringOptional

The sub account image

Responses
chevron-right
200

Subaccount has been created

application/json
post
/subaccounts

List sub-accounts

List all Subaccounts

get
/subaccounts
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
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
chevron-right
200

A paged array of subaccounts

application/json
Responseone of
or
get
/subaccounts
200

A paged array of subaccounts

Get sub-account by ID

Info for a specific sub-account by ID

get
/subaccounts/{id}
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idintegerRequired

An subaccount ID

Responses
chevron-right
200

Expected response to a valid request

application/json
get
/subaccounts/{id}

Update the specified sub-account

Update a sub-account

patch
/subaccounts/{id}
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

An ID

Body
namestringRequired

The sub account name

imagestringOptional

The sub account image

Responses
chevron-right
200

Subaccount has been updated

application/json
patch
/subaccounts/{id}

Deletes the specified sub-account

Deletes a single sub-account

delete
/subaccounts/{id}
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

An ID

Responses
chevron-right
200

Subaccount deleted

No content

delete
/subaccounts/{id}

No content

Get sub-account usage

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

Lists transaction usage for this sub account

get
/subaccounts/{id}/usage
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
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
chevron-right
200

A paged array of subaccount transaction usage metadata

application/json
Responseobject[]

Default response

get
/subaccounts/{id}/usage

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.

Creates an API key for a subaccount

post
/subaccounts/{id}/keys
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idinteger · int32Required

An subaccount ID

Body
objectOptional
Responses
chevron-right
200

Subaccoun API key created

application/json
post
/subaccounts/{id}/keys

List sub-account API keys

List all subaccount keys

get
/subaccounts/{id}/keys
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
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
chevron-right
200

A paged array of subaccount key metadata

application/json
Responseobject[]

Default response

get
/subaccounts/{id}/keys

Delete a sub-account API key

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

Deletes a sub-account API key

delete
/subaccounts/{id}/keys/{keyId}
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idinteger · int32Required

An subaccount ID

keyIdstringRequired

An API key ID

Responses
chevron-right
200

Subaccount API key deleted

No content

delete
/subaccounts/{id}/keys/{keyId}

No content

Last updated

Was this helpful?