V3 endpoints
These endpoints require a Portal API Key (aka "Custodian API Key") as a bearer token.
Before going live with real users, always ensure that you create clients using a Portal API Key from your Portal's Production environment. Read more here on going live with real users.
Create a new client
POST
https://api.portalhq.io/api/v3/custodians/me/clients
Registers a new client and returns a client API key, client session token, and whether they are AA enabled.
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer |
Content-Type* | String | application/json |
Request Body
Name | Type | Description |
---|---|---|
isAccountAbstracted | Boolean (optional) | The client will use ERC-4337 Account Abstraction (AA). |
Example Response
Fetches a single client
GET
https://api.portalhq.io/api/v3/custodians/me/clients/[clientId]
Fetches the specified client for the authorized custodian.
Path Parameters
Name | Type | Description |
---|---|---|
clientId* | String | The ID of the client. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer |
Content-Type* | String | application/json |
Example Response
Get Client's Assets by Chain
GET
https://api.portalhq.io/api/v3/custodians/me/clients/:clientId/chains/:chain/assets
This endpoint retrieves the asset balances (native and token balances) for a specified client and blockchain. It provides detailed information on the native balance and token balances held by a given address on the specified chain.
Supported Chains
You can use either the full chain identifier or the shortcut for popular chains.
Ethereum Mainnet (
eip155:1
orethereum
)Ethereum Sepolia (
eip155:11155111
orsepolia
)Solana Mainnet (
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
orsolana
)Solana Devnet (
solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1
orsolana-devnet
)Base Mainnet (
eip155:8453
orbase
)Base Sepolia (
eip155:84531
orbase-sepolia
)Polygon Mainnet (
eip155:137
orpolygon
)Polygon Mumbai (
eip155:80001
orpolygon-mumbai
)Optimism Mainnet (
eip155:10
)Cronos (
eip155:25
)Binance Smart Chain (
eip155:56
)Binance Smart Chain Testnet (
eip155:97
)Gnosis (
eip155:100
)Fantom (
eip155:250
)Moonbeam (
eip155:1284
)Moonriver (
eip155:1285
)Moonbase (
eip155:1287
)Gnosis Testnet (
eip155:10200
)Holesky (
eip155:17000
)Arbitrum Mainnet (
eip155:42161
)Avalanche Mainnet (
eip155:43114
)Linea Mainnet (
eip155:59140
)Linea Sepolia (
eip155:59141
)Chiliz Testnet (
eip155:88882
)Chiliz (
eip155:88888
)Optimism Sepolia (
eip155:11155420
)Palm (
eip155:11297108109
)
When using CAIP-2 chain formats in the URL (e.g. eip155:11155111
), ensure the URL is URI encoded to accommodate the ":" character.
Path Parameters
Name | Type | Description |
---|---|---|
clientId* | String | The ID of the client. |
chainId* | String | Must be in CAIP-2 format or chain identifier shortcut (e.g. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer |
Content-Type* | String | application/json |
Example Response
Fetches a list of clients
GET
https://api.portalhq.io/api/v3/custodians/me/clients
Fetches all clients for the authorized custodian.
Query Parameters
Name | Type | Description |
---|---|---|
cursor | String (optional) | The ID of the last client in the list. Used for cursor-based pagination. |
take | Number (optional) | The number of records to retrieve. Maximum is 100. Default is 100. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Portal API Key> |
Content-Type* | String | application/json |
Example Response
Refresh Client Session Token (CST)
POST
https://api.portalhq.io/api/v3/custodians/me/clients/[clientId]/sessions
Refreshes a Client Session Token for a client.
Path Parameters
Name | Type | Description |
---|---|---|
clientId* | String | The ID of a client. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer |
Content-Type* | String | application/json |
Example Response
Generate Client Web One-Time Password (OTP)
POST
https://api.portalhq.io/api/v1/custodians/clients/[clientId]/web-otp
Generate a one-time password for a client.
Path Parameters
Name | Type | Description |
---|---|---|
clientId* | String | The ID of a client. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Portal API Key> |
Content-Type* | String | application/json |
Example Response
Last updated