accs v2

Switch account blockchain.

Changed on

Switches the blockchain network for an existing account.

This allows moving an account between different blockchain networks while maintaining the same account identity.

post/v2/accounts/switch-chain

Request

  • Base URL: https://api.openfort.io
  • URL: https://api.openfort.io/v2/accounts/switch-chain
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer

Request body

accountstring required

The account ID (starts with acc_)

chainIdinteger required

The target chain ID. Must be a supported chain.

Example request

{
  "chainId": 80002
}

Response

Successful response.

idstring required
walletstring required
accountTypestring required
addressstring required
ownerAddressstring
chainTypestring required
chainIdnumber double
createdAtnumber double required
updatedAtnumber double required
recoveryMethodstring
custody'Developer' | 'User' required

Indicates key custody: "Developer" for TEE managed keys, "User" for user-managed keys.

Example response

{
  "custody": "Developer"
}

Changes

    • info

      the endpoint scheme security auth_token was added to the API

    • info

      the endpoint scheme security better_auth was removed from the API

    • info

      the security scope accounts:write was added to the endpoint's security scheme sk

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status