Archive / Unarchive Wallet

Decide if you wish to archive / unarchive a specific wallet in your organization.

Archive / Unarchive a Wallet

Using this endpoint, users can choose to archive or unarchive a specific wallet in their organization, according to a wallet ID.

Note that this mutation is supported across all wallet types. (inabit, exchanges, web3)

mutation UpdateWallet($where: WalletWhereUniqueInput!, $data: WalletUpdateInput!) {
  updateWallet(where: $where, data: $data) {
    id
    isArchived
  }
}

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Body (WalletWhereUniqueInput object) + (WalletUpdateInput object)

NameTypeDescription

Id*

String

Wallet ID

isArchived*

Boolean

Archived or not (flag)

Example body:

{
  "where": {
    "id": "clllyfdk6006ybtqkwk840uei"
  },
  "data": {
    "isArchived": true

Response

Return values:

NameTypeDescription

Id*

String

Wallet ID

isArchived*

Boolean

Archived or not (flag)

{
  "data": {
    "updateWallet": {
      "id": "clpgvhulg000f6s0171foixj6",
      "isArchived": true,   // false for unArchived
    }
  }
}

How do I retrieve my wallet ID?

In order to retrieve an organization's wallet ID, you'll need to call your organization wallets query first, to fetch the wallet's ID. The query below accepts a WalletWhereInput of an organizationId, and retrieves the wallet's ID and name in the response.

query Wallets($where: WalletWhereInput) {
  wallets(where: $where) {
    id
    name
  }
}

Try it out!

Last updated