> For the complete documentation index, see [llms.txt](https://docs.indicio.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.indicio.tech/developer/indicio-proven-r/api-reference/subwallet-super-admin-role-only.md).

# Subwallet Super Admin Role Only

Authenticate with base API key

## Create a new subwallet

> This endpoint allows you to create a new subwallet by providing a wallet name and an optional label.

```json
{"openapi":"3.0.0","info":{"title":"Proven API","version":"1.0.0"},"tags":[{"name":"Subwallet - super-admin role only","description":"Authenticate with base API key"}],"servers":[{"url":"https://proven-4-2-test.proven.indicio.tech"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/api/subwallet/create":{"post":{"summary":"Create a new subwallet","description":"This endpoint allows you to create a new subwallet by providing a wallet name and an optional label.","tags":["Subwallet - super-admin role only"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["wallet_name"],"properties":{"wallet_name":{"type":"string","description":"The name of the subwallet to be created."},"label":{"type":"string","description":"An optional label for the subwallet."}}}}}},"responses":{"201":{"description":"Subwallet created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"wallet_id":{"type":"string","description":"The ID of the created subwallet."},"token":{"type":"string","description":"A token for the created subwallet."}}}}}},"400":{"description":"Subwallet creation failed due to missing wallet name.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message indicating the reason for failure."}}}}}},"401":{"description":"Unauthorized."},"500":{"description":"Internal server error while creating subwallet.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}}}}
```

## Retrieve all subwallets

> This endpoint allows you to retrieve all subwallets created under this base admin.

```json
{"openapi":"3.0.0","info":{"title":"Proven API","version":"1.0.0"},"tags":[{"name":"Subwallet - super-admin role only","description":"Authenticate with base API key"}],"servers":[{"url":"https://proven-4-2-test.proven.indicio.tech"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/api/subwallets":{"get":{"summary":"Retrieve all subwallets","description":"This endpoint allows you to retrieve all subwallets created under this base admin.","tags":["Subwallet - super-admin role only"],"responses":{"200":{"description":"Retrieved subwallets successfully","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"wallet_id":{"type":"string","description":"The ID of the retrieved subwallet."},"token":{"type":"string","description":"A token for the retrieved subwallet."},"label":{"type":"string","description":"A label for the retrieved subwallet."}}}}}}},"401":{"description":"Unauthorized."},"500":{"description":"Internal server error while retrieving subwallets.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}}}}
```

## Retrieve subwallet by wallet\_id

> This endpoint allows you to retrieve a subwallet by its wallet\_id

```json
{"openapi":"3.0.0","info":{"title":"Proven API","version":"1.0.0"},"tags":[{"name":"Subwallet - super-admin role only","description":"Authenticate with base API key"}],"servers":[{"url":"https://proven-4-2-test.proven.indicio.tech"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/api/subwallets/{wallet_id}":{"get":{"summary":"Retrieve subwallet by wallet_id","description":"This endpoint allows you to retrieve a subwallet by its wallet_id","tags":["Subwallet - super-admin role only"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"},"description":"The ID of the subwallet"}],"responses":{"200":{"description":"A subwallet record","content":{"application/json":{"schema":{"type":"object","properties":{"wallet_id":{"type":"string","description":"The ID of the retrieved subwallet."},"token":{"type":"string","description":"A token for the retrieved subwallet."},"label":{"type":"string","description":"A label for the retrieved subwallet."}}}}}},"401":{"description":"Unauthorized."},"404":{"description":"Subwallet record not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"500":{"description":"Internal server error while retrieving a subwallet.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}}}}
```

## Create a new API key

> Generates a new API key and stores its HMAC in the database. API key names must be unique per wallet.

```json
{"openapi":"3.0.0","info":{"title":"Proven API","version":"1.0.0"},"tags":[{"name":"Subwallet - super-admin role only","description":"Authenticate with base API key"}],"servers":[{"url":"https://proven-4-2-test.proven.indicio.tech"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/api/apikey/create":{"post":{"summary":"Create a new API key","description":"Generates a new API key and stores its HMAC in the database. API key names must be unique per wallet.","tags":["Subwallet - super-admin role only"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet_id":{"type":"string","description":"The ID of the wallet for which the API key is being created."},"name":{"type":"string","description":"A descriptive label for the API key."},"roles":{"type":"array","items":{"type":"string"},"description":"The roles associated with the API key."},"expires_at":{"type":"string","format":"date-time","nullable":true,"description":"Optional ISO-8601 timestamp when the API key expires. Omit or set to null for no expiration."}}}}}},"responses":{"200":{"description":"API key successfully created.","content":{"application/json":{"schema":{"type":"object","properties":{"api_key":{"type":"string","description":"The generated API key."},"key_id":{"type":"string","description":"The ID of the stored HMACed API key."},"name":{"type":"string","description":"The saved label for the API key."},"status":{"type":"string","description":"Status message."},"expires_at":{"type":"string","format":"date-time","nullable":true,"description":"The selected expiration timestamp, if provided."}}}}}},"400":{"description":"Bad request. Missing or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message."}}}}}},"401":{"description":"Unauthorized."},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message."}}}}}}}}}}}
```

## Revoke an API key

> This endpoint revokes an API key by deleting it for the specified wallet and name.

```json
{"openapi":"3.0.0","info":{"title":"Proven API","version":"1.0.0"},"tags":[{"name":"Subwallet - super-admin role only","description":"Authenticate with base API key"}],"servers":[{"url":"https://proven-4-2-test.proven.indicio.tech"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/api/apikey/revoke":{"post":{"summary":"Revoke an API key","description":"This endpoint revokes an API key by deleting it for the specified wallet and name.","tags":["Subwallet - super-admin role only"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["wallet_id","name"],"properties":{"wallet_id":{"type":"string","description":"The ID of the wallet associated with the API key."},"name":{"type":"string","description":"The name of the API key to be revoked."}}}}}},"responses":{"200":{"description":"API key successfully revoked","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Status message indicating the API key was successfully revoked."}}}}}},"400":{"description":"Bad request. Missing or invalid parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message indicating what went wrong."}}}}}},"401":{"description":"Unauthorized."},"404":{"description":"API key record not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}}}}
```
