REST API
These endpoints require a Portal 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/v1/custodians/clients
Registers a new client and returns a client session token.
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Portal API Key> |
Content-Type* | String | application/json |
Request Body
Name | Type | Description |
---|---|---|
isAccountAbstracted | Boolean | The client will use ERC-4337 Account Abstraction. |
Fetches a single client
GET
https://api.portalhq.io/api/v1/custodians/clients/{clientId}
Fetches the specified client for the authorized custodian.
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 |
Fetches a list of clients
GET
https://api.portalhq.io/api/v1/custodians/clients
Fetches all clients for the authorized custodian.
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Portal API Key> |
Content-Type* | String | application/json |
Refresh Client Session Token (CST)
POST
https://api.portalhq.io/api/v1/custodians/clients/{clientId}/session
Refreshes a client's Client Session Token.
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 |
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 |
Notify Portal when you (fail to) store the encrypted client backup share.
PUT
https://api.portalhq.io/api/v1/clients/me/wallet/stored-client-backup-share
By letting Portal know that you stored the encrypted client backup share successfully, the client is now capable of running portal.recover
.
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Client API Key> |
Content-Type* | String | application/json |
Request Body
Name | Type | Description |
---|---|---|
backupMethod* | "ICLOUD" | "GDRIVE" | "PASSKEY" | "PASSWORD" | Provide the backup method used when |
success* | Boolean | Provide |
No response body.
Retrieve the client's signing shares' metadata.
GET
https://api.portalhq.io/api/v1/clients/me/signing-share-pairs
Verify that a client has the correct signing shares' metadata.
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Client API Key> |
Content-Type* | String | application/json |
Retrieve the client's backup shares' metadata.
GET
https://api.portalhq.io/api/v1/clients/me/backup-share-pairs
Verify that a client has the correct backup shares' metadata.
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer <Client API Key> |
Content-Type* | String | application/json |
Last updated