# Accounts

## GET /accounts

> List accounts

```json
{"openapi":"3.1.0","info":{"title":"revault-api","version":"1.55.0"},"servers":[{"url":"/v1/rest"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Invalid input data error (400)","description":"The error information"},"error.UNAUTHORIZED":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Authorization not provided error (401)","description":"The error information"},"error.FORBIDDEN":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Insufficient access error (403)","description":"The error information"},"error.NOT_FOUND":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Not found error (404)","description":"The error information"},"error.INTERNAL_SERVER_ERROR":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Internal server error error (500)","description":"The error information"}}},"paths":{"/accounts":{"get":{"operationId":"accounts-list","summary":"List accounts","tags":["account"],"parameters":[{"in":"query","name":"page","schema":{"default":1,"description":"Which page to fetch","type":"integer","minimum":1,"maximum":9007199254740991}},{"in":"query","name":"pageSize","schema":{"default":30,"description":"Page size to use","type":"integer","minimum":1,"maximum":30}},{"in":"query","name":"status","schema":{"type":"string","enum":["ACTIVE","INACTIVE"],"description":"Account status"}},{"in":"query","name":"name","schema":{"type":"string","description":"Search by matching name"}},{"in":"query","name":"governanceType","schema":{"type":"string","enum":["CLASSIC","TRADELINK","RAW_SIGNING"],"description":"Account governance type"}},{"in":"query","name":"allowedAction","schema":{"type":"string","enum":["SEND","DEPLOY_CONTRACT","EXECUTE_CONTRACT","ACTIVATE_TOKEN","RECEIVE","STAKE","SIGN_MESSAGE","SIGN_DIGESTS"],"description":"Filter accounts by allowed action for current user"}},{"in":"query","name":"sortBy","schema":{"default":"createdAt","description":"Sort by attribute","type":"string","enum":["name","currency","index","createdAt","updatedAt"]}},{"in":"query","name":"sortOrder","schema":{"default":"asc","description":"Sort order","type":"string","enum":["asc","desc"]}},{"in":"query","name":"currency","schema":{"type":"string","description":"Filter accounts by currency"}},{"in":"query","name":"index","schema":{"type":"number","description":"Filter accounts by account index"}},{"in":"query","name":"contractAddress","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"support","schema":{"type":"string","enum":["standalone","legacy"],"description":"Filter accounts by support"}},{"in":"query","name":"type","schema":{"type":"string","enum":["BITCOIN_LIKE","CANTON_LIKE","CARDANO_LIKE","ETHEREUM_LIKE","GENERIC_LIKE","HEDERA_LIKE","POLKADOT_LIKE","RAW_SIGNING","RIPPLE_LIKE","SOLANA_LIKE","STELLAR_LIKE","SUI_LIKE","TEZOS_LIKE","TRON_LIKE"],"description":"Filter accounts by type"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"number","description":"Current page"},"next":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Next page or null if there is none"},"prev":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Previous page or null if there is none"},"pageSize":{"type":"number","description":"Max count of items per page"},"total":{"type":"number","description":"Total count of items"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Internal unique identifier"},"legacyId":{"type":"number","description":"Legacy internal unique identifier (for retro-compatibility)"},"name":{"type":"string","description":"Name"},"currency":{"type":"string","minLength":1,"maxLength":40,"pattern":"^\\w+$","description":"Will be deprecated soon, use network instead. Currency"},"network":{"type":"string","minLength":1,"maxLength":40,"pattern":"^\\w+$","description":"Network (Same as currency for now)"},"contractAddress":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Token contract address for Token account"},"tokenIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Token identifier for Token account"},"index":{"type":"number","minimum":0,"description":"BIP44 account index"},"derivationPath":{"type":"string","description":"Derivation path"},"status":{"type":"string","enum":["ACTIVE","INACTIVE"],"description":"Status"},"createdAt":{"description":"Creation timestamp","type":"string"},"updatedAt":{"description":"Last modification timestamp","type":"string"},"asset":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"RAW_SIGNING","description":"Account type"}},"required":["type"],"additionalProperties":false,"description":"Raw signing account"},{"type":"object","properties":{"type":{"type":"string","const":"BITCOIN_LIKE","description":"Account type"},"xpub":{"type":"string","description":"xpub (extended public key)"}},"required":["type","xpub"],"additionalProperties":false,"description":"Bitcoin-like"},{"type":"object","properties":{"type":{"type":"string","const":"CANTON_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"}},"required":["type","address"],"additionalProperties":false,"description":"Canton-like"},{"type":"object","properties":{"type":{"type":"string","const":"CARDANO_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"}},"required":["type","address"],"additionalProperties":false,"description":"Cardano-like"},{"type":"object","properties":{"type":{"type":"string","const":"ETHEREUM_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"},"contractAddress":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Will be deprecated, Use contractAddress at root level instead; Token contract address"}},"required":["type","address"],"additionalProperties":false,"description":"Ethereum-like"},{"type":"object","properties":{"type":{"type":"string","const":"GENERIC_LIKE","description":"Account type"}},"required":["type"],"additionalProperties":false,"description":"Generic-like"},{"type":"object","properties":{"type":{"type":"string","const":"HEDERA_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"},"isActivated":{"type":"boolean","description":"Indicates if the account is activated"}},"required":["type","address","isActivated"],"additionalProperties":false,"description":"Hedera-like"},{"type":"object","properties":{"type":{"type":"string","const":"POLKADOT_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"}},"required":["type","address"],"additionalProperties":false,"description":"Polkadot-like"},{"type":"object","properties":{"type":{"type":"string","const":"RIPPLE_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"}},"required":["type","address"],"additionalProperties":false,"description":"Ripple-like"},{"type":"object","properties":{"type":{"type":"string","const":"SOLANA_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"},"contractAddress":{"anyOf":[{"type":"string","description":"Will be deprecated, Use contractAddress at root level instead; Token contract address"},{"type":"null"}]}},"required":["type","address"],"additionalProperties":false,"description":"Solana-like"},{"type":"object","properties":{"type":{"type":"string","const":"STELLAR_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"}},"required":["type","address"],"additionalProperties":false,"description":"Stellar-like"},{"type":"object","properties":{"type":{"type":"string","const":"SUI_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"}},"required":["type","address"],"additionalProperties":false,"description":"Sui-like"},{"type":"object","properties":{"type":{"type":"string","const":"TEZOS_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"}},"required":["type","address"],"additionalProperties":false,"description":"Tezos-like"},{"type":"object","properties":{"type":{"type":"string","const":"TRON_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"},"contractAddress":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Will be deprecated, Use contractAddress at root level instead; Token contract address"}},"required":["type","address"],"additionalProperties":false,"description":"Tron-like"}],"description":"Account asset fields","type":"object"},"governance":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"CLASSIC","description":"Classic account governance"},"policyId":{"type":"string","description":"Identifier of corresponding governance policy"}},"required":["type","policyId"],"additionalProperties":false,"description":"Classic"},{"type":"object","properties":{"type":{"type":"string","const":"RAW_SIGNING","description":"Raw signing account governance"},"policyId":{"type":"string","description":"Identifier of corresponding governance policy"}},"required":["type","policyId"],"additionalProperties":false,"description":"Raw Signing"},{"type":"object","properties":{"type":{"type":"string","const":"TRADELINK","description":"Tradelink account governance"},"assetManagerId":{"type":"string","description":"Identifier of corresponding asset manager"},"exchangeConfigs":{"type":"array","items":{"type":"object","properties":{"exchangeId":{"type":"string","description":"Tradelink exchange id"},"repledgeAuthorized":{"type":"boolean","description":"Determines whether this exchange is authorized to repledge on this account"},"needsAssetManagerApprovalForSettlements":{"type":"boolean","description":"Determines whether asset manager will \"pre-approve\" the settlement requests on this account"}},"required":["exchangeId","repledgeAuthorized","needsAssetManagerApprovalForSettlements"],"additionalProperties":false},"description":"Tradelink exchange configurations"}},"required":["type","assetManagerId","exchangeConfigs"],"additionalProperties":false,"description":"Tradelink"}],"description":"Governance fields","type":"object"}},"required":["id","legacyId","name","currency","network","contractAddress","tokenIdentifier","index","derivationPath","status","createdAt","updatedAt","asset","governance"],"additionalProperties":false},"description":"Array of results"}},"required":["page","next","prev","pageSize","total","results"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## GET /accounts/{id}

> Get a single account

```json
{"openapi":"3.1.0","info":{"title":"revault-api","version":"1.55.0"},"servers":[{"url":"/v1/rest"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Invalid input data error (400)","description":"The error information"},"error.UNAUTHORIZED":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Authorization not provided error (401)","description":"The error information"},"error.FORBIDDEN":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Insufficient access error (403)","description":"The error information"},"error.NOT_FOUND":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Not found error (404)","description":"The error information"},"error.INTERNAL_SERVER_ERROR":{"type":"object","properties":{"message":{"type":"string","description":"The error message"},"code":{"type":"string","description":"The error code"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Internal server error error (500)","description":"The error information"}}},"paths":{"/accounts/{id}":{"get":{"operationId":"accounts-findById","summary":"Get a single account","tags":["account"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"Id of the target account"},"required":true,"description":"Id of the target account"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Internal unique identifier"},"legacyId":{"type":"number","description":"Legacy internal unique identifier (for retro-compatibility)"},"name":{"type":"string","description":"Name"},"currency":{"type":"string","minLength":1,"maxLength":40,"pattern":"^\\w+$","description":"Will be deprecated soon, use network instead. Currency"},"network":{"type":"string","minLength":1,"maxLength":40,"pattern":"^\\w+$","description":"Network (Same as currency for now)"},"contractAddress":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Token contract address for Token account"},"tokenIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Token identifier for Token account"},"index":{"type":"number","minimum":0,"description":"BIP44 account index"},"derivationPath":{"type":"string","description":"Derivation path"},"status":{"type":"string","enum":["ACTIVE","INACTIVE"],"description":"Status"},"createdAt":{"description":"Creation timestamp","type":"string"},"updatedAt":{"description":"Last modification timestamp","type":"string"},"asset":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"RAW_SIGNING","description":"Account type"}},"required":["type"],"additionalProperties":false,"description":"Raw signing account"},{"type":"object","properties":{"type":{"type":"string","const":"BITCOIN_LIKE","description":"Account type"},"xpub":{"type":"string","description":"xpub (extended public key)"}},"required":["type","xpub"],"additionalProperties":false,"description":"Bitcoin-like"},{"type":"object","properties":{"type":{"type":"string","const":"CANTON_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"}},"required":["type","address"],"additionalProperties":false,"description":"Canton-like"},{"type":"object","properties":{"type":{"type":"string","const":"CARDANO_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"}},"required":["type","address"],"additionalProperties":false,"description":"Cardano-like"},{"type":"object","properties":{"type":{"type":"string","const":"ETHEREUM_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"},"contractAddress":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Will be deprecated, Use contractAddress at root level instead; Token contract address"}},"required":["type","address"],"additionalProperties":false,"description":"Ethereum-like"},{"type":"object","properties":{"type":{"type":"string","const":"GENERIC_LIKE","description":"Account type"}},"required":["type"],"additionalProperties":false,"description":"Generic-like"},{"type":"object","properties":{"type":{"type":"string","const":"HEDERA_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"},"isActivated":{"type":"boolean","description":"Indicates if the account is activated"}},"required":["type","address","isActivated"],"additionalProperties":false,"description":"Hedera-like"},{"type":"object","properties":{"type":{"type":"string","const":"POLKADOT_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"}},"required":["type","address"],"additionalProperties":false,"description":"Polkadot-like"},{"type":"object","properties":{"type":{"type":"string","const":"RIPPLE_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"}},"required":["type","address"],"additionalProperties":false,"description":"Ripple-like"},{"type":"object","properties":{"type":{"type":"string","const":"SOLANA_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"},"contractAddress":{"anyOf":[{"type":"string","description":"Will be deprecated, Use contractAddress at root level instead; Token contract address"},{"type":"null"}]}},"required":["type","address"],"additionalProperties":false,"description":"Solana-like"},{"type":"object","properties":{"type":{"type":"string","const":"STELLAR_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"}},"required":["type","address"],"additionalProperties":false,"description":"Stellar-like"},{"type":"object","properties":{"type":{"type":"string","const":"SUI_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"}},"required":["type","address"],"additionalProperties":false,"description":"Sui-like"},{"type":"object","properties":{"type":{"type":"string","const":"TEZOS_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"}},"required":["type","address"],"additionalProperties":false,"description":"Tezos-like"},{"type":"object","properties":{"type":{"type":"string","const":"TRON_LIKE","description":"Account type"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Account address"},"contractAddress":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Will be deprecated, Use contractAddress at root level instead; Token contract address"}},"required":["type","address"],"additionalProperties":false,"description":"Tron-like"}],"description":"Account asset fields","type":"object"},"governance":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"CLASSIC","description":"Classic account governance"},"policyId":{"type":"string","description":"Identifier of corresponding governance policy"}},"required":["type","policyId"],"additionalProperties":false,"description":"Classic"},{"type":"object","properties":{"type":{"type":"string","const":"RAW_SIGNING","description":"Raw signing account governance"},"policyId":{"type":"string","description":"Identifier of corresponding governance policy"}},"required":["type","policyId"],"additionalProperties":false,"description":"Raw Signing"},{"type":"object","properties":{"type":{"type":"string","const":"TRADELINK","description":"Tradelink account governance"},"assetManagerId":{"type":"string","description":"Identifier of corresponding asset manager"},"exchangeConfigs":{"type":"array","items":{"type":"object","properties":{"exchangeId":{"type":"string","description":"Tradelink exchange id"},"repledgeAuthorized":{"type":"boolean","description":"Determines whether this exchange is authorized to repledge on this account"},"needsAssetManagerApprovalForSettlements":{"type":"boolean","description":"Determines whether asset manager will \"pre-approve\" the settlement requests on this account"}},"required":["exchangeId","repledgeAuthorized","needsAssetManagerApprovalForSettlements"],"additionalProperties":false},"description":"Tradelink exchange configurations"}},"required":["type","assetManagerId","exchangeConfigs"],"additionalProperties":false,"description":"Tradelink"}],"description":"Governance fields","type":"object"}},"required":["id","legacyId","name","currency","network","contractAddress","tokenIdentifier","index","derivationPath","status","createdAt","updatedAt","asset","governance"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```
