Endpoints for managing entity's subaccounts
Last updated 3 months ago
Returns a list of all the subaccounts this entity owns.
/v1/{id}/accounts
Entity ID
curl -L \ --url 'https://api.carbonregistry.com/v1/{id}/accounts' \ --header 'Authorization: Bearer <token>'
{ "accounts": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Default", "address": "0x32Be343B94f860124dC4fEe278FDCBD38C102D88", "ownerId": "550e8400-e29b-41d4-a716-446655440000", "type": "default" } ] }
The name associated with this subaccount
Customer 1 account
curl -L \ --request POST \ --url 'https://api.carbonregistry.com/v1/{id}/accounts' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{"name":"Customer 1 account"}'
{ "account": { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Default", "address": "0x32Be343B94f860124dC4fEe278FDCBD38C102D88", "ownerId": "550e8400-e29b-41d4-a716-446655440000", "type": "default" } }
/v1/{id}/accounts/{accId}
Subaccount ID to delete
curl -L \ --request DELETE \ --url 'https://api.carbonregistry.com/v1/{id}/accounts/{accId}' \ --header 'Authorization: Bearer <token>'