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

NameTypeDescription

Authorization*

String

Bearer <Portal API Key>

Content-Type*

String

application/json

Request Body

NameTypeDescription

isAccountAbstracted

Boolean

The client will use ERC-4337 Account Abstraction.

{
  "id": "string",
  "clientApiKey": "string",
  "clientSessionToken": "string",
  "isAccountAbstracted": boolean
}

Fetches a single client

GET https://api.portalhq.io/api/v1/custodians/clients/{clientId}

Fetches the specified client for the authorized custodian.

Path Parameters

NameTypeDescription

clientId*

String

The ID of a client.

Headers

NameTypeDescription

Authorization*

String

Bearer <Portal API Key>

Content-Type*

String

application/json

{
  "id": "string",
  "address": "string",
  "clientApiKey": "string",
  "isAccountAbstracted": boolean
}

Fetches a list of clients

GET https://api.portalhq.io/api/v1/custodians/clients

Fetches all clients for the authorized custodian.

Headers

NameTypeDescription

Authorization*

String

Bearer <Portal API Key>

Content-Type*

String

application/json

[
  {
    "id": "string",
    "address": "string",
    "backupStatus": "string",
    "clientApiKey": "string",
    "signingStatus": "string"
  }
]

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

NameTypeDescription

clientId

String

The ID of a client.

Headers

NameTypeDescription

Authorization*

String

Bearer <Portal API Key>

Content-Type*

String

application/json

{
  "id": "string",
  "clientSessionToken": "string",
  "isAccountAbstracted": boolean
}

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

NameTypeDescription

clientId*

String

The ID of a client.

Headers

NameTypeDescription

Authorization*

String

Bearer <Portal API Key>

Content-Type*

String

application/json

{
  "id": "string"
  "otp": "string"
}

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

NameTypeDescription

Authorization*

String

Bearer <Client API Key>

Content-Type*

String

application/json

Request Body

NameTypeDescription

backupMethod*

"ICLOUD" | "GDRIVE" | "PASSKEY" | "PASSWORD"

Provide the backup method used when portal.backup was ran.

success*

Boolean

Provide false if you failed to store the client backup share.

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

NameTypeDescription

Authorization*

String

Bearer <Client API Key>

Content-Type*

String

application/json

[
  {
    "id": "string",
    "createdAt": "2023-11-28T21:55:13.630Z"
    "status": "completed"
  },
  {
    "id": "string",
    "createdAt": "2023-11-28T21:55:13.630Z"
    "status": "incomplete"
  }
]

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

NameTypeDescription

Authorization*

String

Bearer <Client API Key>

Content-Type*

String

application/json

[
  {
    "backupMethod": "UNKNOWN", // Legacy (MPC Version 1-5)
    "id": "string",
    "createdAt": "2023-11-28T21:55:13.630Z",
    "status": "completed"
  },
  {
    "backupMethod": "GDRIVE",
    "id": "string",
    "createdAt": "2023-11-28T21:55:13.630Z",
    "status": "incomplete"
  },
  {
    "backupMethod": "ICLOUD",
    "id": "string",
    "createdAt": "2023-11-28T21:55:13.630Z",
    "status": "incomplete"
  },
  {
    "backupMethod": "PASSWORD",
    "id": "string",
    "createdAt": "2023-11-28T21:55:13.630Z",
    "status": "completed"
  },
  {
    "backupMethod": "PASSKEY",
    "id": "string",
    "createdAt": "2023-11-28T21:55:13.630Z",
    "status": "completed"
  },
]

Last updated