These endpoints require a Portal API Key (aka ‘Custodian API Key’) as a bearer token.
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.
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Custodian API Key> |
Content-Type* | String | application/json |
Name | Type | Description |
---|---|---|
isAccountAbstracted | Boolean (optional) | The client will use ERC-4337 Account Abstraction (AA). |
[token]
with a Custodian API Key.
POST
https://api.portalhq.io/api/v3/custodians/me/clients/[clientId]/sessions
Creates a new Client Session Token for a client.
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Custodian API Key> |
Content-Type* | String | application/json |
Name | Type | Description |
---|---|---|
clientId d;”>* | String | The ID of a client. |
[token]
with a Custodian API Key and the [clientId]
with the relevant Portal client ID.
POST
https://api.portalhq.io/api/v1/custodians/clients/[clientId]/web-otp
Generate a one-time password for a client.
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Custodian API Key> |
Content-Type* | String | application/json |
Name | Type | Description |
---|---|---|
clientId d;”>* | String | The ID of a client. |
[token]
with a Custodian API Key and the [clientId]
with the relevant Portal client ID.
GET
https://api.portalhq.io/api/v3/custodians/me/clients/[clientId]
Fetches the specified client for the authorized custodian.
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Custodian API Key> |
Content-Type* | String | application/json |
Name | Type | Description |
---|---|---|
clientId d;”>* | String | The ID of the client. |
[token]
with a Custodian API Key and the [clientId]
with the relevant Portal client ID.
GET
https://api.portalhq.io/api/v3/custodians/me/clients
Fetches all clients for the authorized custodian.
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Custodian API Key> |
Content-Type* | String | application/json |
Name | Type | Description |
---|---|---|
cursor | String | The ID of the last client in the list. Used for cursor-based pagination. |
take | Number | The number of records to retrieve. Maximum is 100. Default is 100. |
[token]
with a Custodian API Key.
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.
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
or solana
)solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1
or solana-devnet
)bip122:000000000019d6689c085ae165831e93-p2wpkh
or bitcoin-p2wpkh
or bitcoin-segwit
)bip122:000000000933ea01ad0ee984209779ba-p2wpkh
or bitcoin-p2wpkh-testnet
or bitcoin-segwit-testnet
)tron:mainnet
)tron:nile
)tron:shasta
)stellar:pubnet
)stellar:testnet
)eip155:1
or ethereum
)eip155:11155111
or sepolia
)eip155:8453
or base
)eip155:84532
or base-sepolia
)eip155:137
or polygon
)eip155:80002
or polygon-amoy
)eip155:10
)eip155:56
)eip155:97
)eip155:250
)eip155:1284
)eip155:42161
)eip155:43114
)eip155:59144
)eip155:42220
)eip155:44787
)eip155:11155111
), ensure the URL is URI encoded to accommodate the ”:” character.Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Custodian API Key> |
Content-Type* | String | application/json |
Name | Type | Description |
---|---|---|
clientId d;”>* | String | The ID of the client. |
chainId d;”>* | String | Must be in CAIP-2 format or chain identifier shortcut (e.g. eip155:11155111 or sepolia ). |
[token]
with a Custodian API Key, the chain
with a valid chain value, and the clientId
with the relevant Portal client ID.
POST
https://api.portalhq.io/api/v3/custodians/me/clients/:clientId/chains/:chain/assets/send/build-transaction
Creates an unsigned transaction for transferring assets to another address on a specific chain. You can then use this unsigned transaction to sign and submit the transaction.
chain
path param (or alternatively you can use the CAIP-2 chainId
):
ethereum
(eip155:1
)sepolia
(eip155:11155111
)base
(eip155:8453
)base-sepolia
(eip155:84531
)polygon
(eip155:137
)polygon-mumbai
(eip155:80001
)celo
(eip155:42220
)celo-alfajores
(eip155:44787
)solana
(solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
)solana-devnet
(solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1
)tron
(tron:mainnet
)tron-nile
(tron:nile
)tron-shasta
(tron:shasta
)stellar
(stellar:pubnet
)stellar-testnet
(stellar:testnet
)bitcoin-segwit
(bip122:000000000019d6689c085ae165831e93-p2wpkh
)bitcoin-segwit-testnet
(bip122:000000000933ea01ad0ee984209779ba-p2wpkh
)bitcoin-p2wpkh
(bip122:000000000019d6689c085ae165831e93-p2wpkh
)bitcoin-p2wpkh-testnet
(bip122:000000000933ea01ad0ee984209779ba-p2wpkh
)eip155:11155111
), ensure the URL is URI encoded to accommodate the ”:” character.Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Custodian API Key> |
Content-Type* | String | application/json |
Name | Type | Description |
---|---|---|
clientId d;”>* | String | The ID of the client. |
chain d;”>* | String | Must be one of the chains in “Supported Chains”. |
Name | Type | Description |
---|---|---|
to d;”>* | String | The recipient’s address. |
token d;”>* | String | The token symbol (e.g., “USDC”) or contract address or mint address (for Solana). |
amount d;”>* | String | The amount to transfer (as a string, in the token’s primary denomination). For example, “0.01” is 1 cent of USDC. |
[token]
with a Custodian API Key, the chain
with a valid chain value, and the clientId
with the relevant Portal client ID.
token
field can accept either a token symbol (e.g. “USDC” or “USDT”) or a contract address (for EIP-155 tokens) or a mint address (for Solana tokens).amount
should be provided in the token’s primary denomination (e.g. whole USDC, not micro-USDC).PATCH
https://api.portalhq.io/api/v3/custodians/me/clients/[clientId]/enable-eject
Your custodian must be using Portal-Managed Backups to use this endpoint. Prepare a wallet for ejection of its private keys. This endpoint will enable a Portal client to be ejected for 5 minutes.
You can find the walletId
parameter from the Get a Single Client endpoint.
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Custodian API Key> |
Content-Type* | String | application/json |
Name | Type | Description |
---|---|---|
ejectableUntil | String (ISO format) | The time the wallet will no longer be ejectable. Must be a date at least 1 minute from now. |
walletId d;”>* | String | The walletId of the wallet to eject. |
[token]
with a Custodian API Key and the [clientId]
with the relevant Portal client ID.
GET
https://api.portalhq.io/api/v3/custodians/me/clients/:clientId/wallets/:walletId/ejectable-backup-shares
Your custodian must be using Portal-Managed Backups to use this endpoint. Fetches a client’s encrypted backup share (if you sent it to Portal previously) and their custodian backup share. This endpoint is used when running eject while using the Enclave MPC API with a Portal-Managed Backup configuration.
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Client API Key> |
Content-Type* | String | application/json |
[token]
with a Custodian API Key, the [walletId]
with the Portal client’s wallet ID, and the [clientId]
with the relevant Portal client ID.
GET
https://api.portalhq.io/api/v3/custodians/me/alerts/webhooks
Retrieve a list of your alert webhooks configured in your Portal Admin Dashboard.
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Custodian API Key> |
Content-Type* | String | application/json |
[token]
with a Custodian API Key.
GET
https://api.portalhq.io/api/v3/custodians/me/alerts/webhooks/:alertWebhookId/events
Retrieve a list of the events sent to your alert webhook (including those that failed to be delivered).
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Custodian API Key> |
Content-Type* | String | application/json |
Name | Type | Description |
---|---|---|
eventTypes d;”>* | “EIP_155_TX_V1” | The alert webhook event types. |
deliveryStatuses | ”success” , “failed” , “pending” | Returns only alert webhook events with one of the specified delivery statuses. |
since | Unix Number | Returns only alert webhook events that occurred after this time. |
until | Unix Number | Returns only alert webhook events that occurred before this time. |
cursor | String | The alert webhook event “id” for cursor-based pagination. |
limit | Number (default: 100 ) | The amount of alert webhook events to get back in the request. |
transactionHash | String | Returns only alert webhook events that include this transaction hash. |
blockNumbers | String (multiple delimited by ”,“ ) | Returns only alert webhook events that include these block numbers. |
chainIds | CAIP-2 chains (multiple delimited by ”,“ ) | Returns only alert webhook events that include these chainIds. |
[token]
with a Custodian API Key and the [webhookId]
with the alert webhook ID you are interested in.
POST
https://api.portalhq.io/api/v3/custodians/me/alerts/webhooks/:alertWebhookId/events/failed/replay
Replays a list of alert webhook events with a delivery status of "failed"
.
"failed"
alert webhook event has already been replayed successfully, you cannot replay the alert webhook event again with this endpoint.Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Custodian API Key> |
Content-Type* | String | application/json |
Name | Type | Description |
---|---|---|
alertWebhookId d;”>* | String | The “id” of the alert webhook. You can get this from the list alert webhooks endpoint. |
Name | Type | Description |
---|---|---|
eventIds d;”>* | String[] | A list of “failed” alert webhook event “id” s to replay. |
[token]
with a Custodian API Key and the [webhookId]
with the alert webhook ID you are interested in.
GET
https://api.portalhq.io/api/v3/custodians/me/gas-sponsors/chains/:chainId/usage
Retrieves historical gas sponsorship usage by chain for your Portal environment.
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Custodian API Key> |
Content-Type* | String | application/json |
Name | Type | Description |
---|---|---|
chainId d;”>* | CAIP-2 chain | The CAIP-2 chain ID. Be sure it is URL encoded. |
[token]
with a Custodian API Key.
POST
https://api.portalhq.io/api/v3/custodians/me/alerts/wallets/format
This endpoint formats a raw webhook request body for wallet events.
eip155:1
or ethereum
)eip155:11155111
or sepolia
)solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
or solana
)solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1
or solana-devnet
)eip155:8453
or base
)eip155:84531
or base-sepolia
)eip155:137
or polygon
)eip155:80001
or polygon-mumbai
)Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Custodian API Key> |
Content-Type* | String | application/json |
Name | Type | Description |
---|---|---|
chain d;”>* | "eip155" | The chain the raw webhook event is from. |
rawAlert d;”>* | String | The stringified raw webhook event. |
POST
https://api.portalhq.io/api/v3/custodians/me/alerts/format
This endpoint formats a raw webhook request body for wallet events, which may include one or many transactions at once.
eip155:1
or ethereum
)eip155:11155111
or sepolia
)solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
or solana
)solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1
or solana-devnet
)eip155:8453
or base
)eip155:84531
or base-sepolia
)eip155:137
or polygon
)eip155:80001
or polygon-mumbai
)Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Custodian API Key> |
Content-Type* | String | application/json |
Name | Type | Description |
---|---|---|
chain d;”>* | "eip155" | The chain the raw webhook event is from. |
rawAlert d;”>* | String | The stringified raw webhook event. |
POST
https://api.portalhq.io/api/v3/custodians/me/alerts/retry-by-block-number
This endpoint attempts to resend a wallet event scoped by a block number in the scenario you need to replay a transaction.
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Custodian API Key> |
Content-Type* | String | application/json |
Name | Type | Description |
---|---|---|
chainReferenceId d;”>* | String | The EVM chain reference ID. (e.g. "11155111" for Sepolia) |
blockNumber d;”>* | Number | The block number of the transaction(s) you want to resend. |
streamId d;”>* | String | The ID of the stream that Portal configured for you. (Reach out to our team to get this.) |