Subwallet super Admin role only

Authenticate with base API key

Create a new subwallet

post

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

Authorizations
Body
wallet_namestringRequired

The name of the subwallet to be created.

Example: mySubwallet
labelstringOptional

An optional label for the subwallet.

Example: My Subwallet Label
Responses
201
Subwallet created successfully
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"
}

Retrieve all subwallets

get

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

Authorizations
Responses
200
Retrieved subwallets successfully
application/json
get
GET /api/subwallets HTTP/1.1
Host: 
x-api-key: YOUR_API_KEY
Accept: */*
[
  {
    "wallet_id": 1,
    "token": "abcdef123456",
    "label": "MySubwallet"
  }
]

Retrieve subwallet by wallet_id

get

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
get
GET /api/subwallets/{id} HTTP/1.1
Host: 
x-api-key: YOUR_API_KEY
Accept: */*
{
  "wallet_id": 1,
  "token": "abcdef123456",
  "label": "MySubwallet"
}

Create a new API key

post

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
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."
}

Revoke an API key

post

This endpoint revokes an API key by updating its revocation status in the database.

Authorizations
Body
key_idstringRequired

The ID of the API key to be revoked.

Example: key123
wallet_idstringRequired

The ID of the wallet associated with the API key.

Example: wallet123
Responses
200
API key successfully revoked
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?