api-key

Update an existing API key. (admin access required)

Changed on

Creates a API key

patch/api-key

Request

  • Base URL: ./../api/v1/ (relative, and the document was published on a file host, not at the API’s origin)
  • URL: ./../api/v1/api-key
  • Auth: API key in header token

Request body

idstring required

The id of the API key to update. Provide either id or apiKey

tokenstring

To change the api key token

usageLimitedboolean

Whether the API key is usage limited. Omit to leave it unchanged.

status'Active' | 'Revoked'

The status of the API key. Omit to leave it unchanged.

NetworkLimitstring[]

Replaces the Cardano-network half of the access list. Omit to leave Cardano access unchanged.

ChainIdLimitstring[]

Replaces the EVM (CAIP-2) half of the access list. Omit to leave EVM access unchanged.

walletScopeEnabledboolean

Whether to enable wallet scope filtering for this API key

x402WalletScopeEnabledboolean

Whether to enable managed EVM wallet scope filtering for this API key

X402WalletScopeEvmWalletIdsstring[]

Replaces the managed EVM wallets this API key is scoped to

WalletScopeHotWalletIdsstring[]

List of hot wallet IDs to scope this API key to. Replaces existing scopes when provided

canReadboolean

Whether this API key can access read endpoints

canPayboolean

Whether this API key can access payment/purchase endpoints

canAdminboolean

Whether this API key has admin access

Example request

{
  "id": "unique_cuid_v2_of_entry_to_update",
  "token": "api_key_to_change_to",
  "UsageCreditsToAddOrRemove": [
    {
      "unit": "",
      "amount": "10000000"
    },
    {
      "unit": "c48cbb3d5e57ed56e276bc45f99ab39abe94e6cd7ac39fb402da47ad0014df105553444d",
      "amount": "-25000000"
    }
  ],
  "status": "Active",
  "walletScopeEnabled": false,
  "WalletScopeHotWalletIds": [
    "hot_wallet_id_1",
    "hot_wallet_id_2"
  ]
}

Response

API key updated

statusstring required

Example response

{
  "status": "Success",
  "data": {
    "id": "api_key_id",
    "token": "masumi_payment_api_key_secret",
    "permission": "Admin",
    "canRead": true,
    "canPay": true,
    "canAdmin": true,
    "usageLimited": true,
    "NetworkLimit": [
      "Preprod",
      "Mainnet"
    ],
    "ChainIdLimit": [
      "cardano:preprod"
    ],
    "RemainingUsageCredits": [
      {
        "unit": "",
        "amount": "10000000"
      }
    ],
    "status": "Active",
    "walletScopeEnabled": false,
    "WalletScopes": [],
    "x402WalletScopeEnabled": false,
    "X402WalletScopes": []
  }
}

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      the request property default value Active was removed

    • info

      the request property default value true was removed

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • warning

      removed the request property

    • warning

      removed the request property

    • info

      the request property default value Active was added

    • info

      the request property default value true was added