Subwallet super Admin role only
Authenticate with base API key
This endpoint allows you to create a new subwallet by providing a wallet name and an optional label.
Authorizations
Body
wallet_namestringRequiredExample:
The name of the subwallet to be created.
mySubwallet
labelstringOptionalExample:
An optional label for the subwallet.
My Subwallet Label
Responses
201
Subwallet created successfully
application/json
400
Subwallet creation failed due to missing wallet name.
application/json
401
Unauthorized.
500
Internal server error while creating subwallet.
application/json
post
POST /api/subwallet/create HTTP/1.1
Host:
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 58
{
"wallet_name": "mySubwallet",
"label": "My Subwallet Label"
}
{
"wallet_id": 1,
"token": "abcdef123456"
}
This endpoint allows you to retrieve all subwallets created under this base admin.
Authorizations
Responses
200
Retrieved subwallets successfully
application/json
401
Unauthorized.
500
Internal server error while retrieving subwallets.
application/json
get
GET /api/subwallets HTTP/1.1
Host:
x-api-key: YOUR_API_KEY
Accept: */*
[
{
"wallet_id": 1,
"token": "abcdef123456",
"label": "MySubwallet"
}
]
This endpoint allows you to retrieve a subwallet by its wallet_id
Authorizations
Path parameters
idstringRequired
The ID of the subwallet
Responses
200
A subwallet record
application/json
401
Unauthorized.
404
Subwallet record not found
application/json
500
Internal server error while retrieving a subwallet.
application/json
get
GET /api/subwallets/{id} HTTP/1.1
Host:
x-api-key: YOUR_API_KEY
Accept: */*
{
"wallet_id": 1,
"token": "abcdef123456",
"label": "MySubwallet"
}
Generates a new API key and stores its HMAC in the database.
Authorizations
Body
wallet_idstringOptional
The ID of the wallet for which the API key is being created.
rolesstring[]Optional
The roles associated with the API key.
Responses
200
API key successfully created.
application/json
400
Bad request. Missing or invalid parameters.
application/json
401
Unauthorized.
500
Internal server error.
application/json
post
POST /api/apikey/create HTTP/1.1
Host:
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 43
{
"wallet_id": "wallet123",
"roles": [
"admin"
]
}
{
"api_key": "abcdef123456",
"key_id": "key123",
"status": "API key successfully created."
}
This endpoint revokes an API key by updating its revocation status in the database.
Authorizations
Body
key_idstringRequiredExample:
The ID of the API key to be revoked.
key123
wallet_idstringRequiredExample:
The ID of the wallet associated with the API key.
wallet123
Responses
200
API key successfully revoked
application/json
400
Bad request. Missing or invalid parameters.
application/json
401
Unauthorized.
404
API key record not found
application/json
500
Internal server error
application/json
post
POST /api/apikey/revoke HTTP/1.1
Host:
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 43
{
"key_id": "key123",
"wallet_id": "wallet123"
}
{
"status": "text"
}
Was this helpful?