Masumi Logo

/api-key

Creates a API key

PATCH
/api-key
token<token>

API key authentication via header (token)

In: header

idstring

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

Lengthlength <= 150
token?string

To change the api key token

Length15 <= length <= 550
UsageCreditsToAddOrRemove?array<object>

The amount of credits to add or remove from the API key. Only relevant if usageLimited is true.

usageLimited?boolean

Whether the API key is usage limited

Defaulttrue
status?string

The status of the API key

Default"Active"
Value in"Active" | "Revoked"
networkLimit?array<string>

The networks the API key is allowed to use

Default["Mainnet","Preprod"]

Response Body

curl -X PATCH "https://loading/./../api/v1/api-key/" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "unique_cuid_v2_of_entry_to_update",
    "token": "api_key_to_change_to",
    "UsageCreditsToAddOrRemove": [
      {
        "unit": "",
        "amount": "10000000"
      },
      {
        "unit": "usdm_policy_and_asset_id",
        "amount": "-10000000"
      }
    ],
    "status": "Active"
  }'
{
  "status": "success",
  "data": {
    "id": "unique_cuid_v2_of_entry_to_delete",
    "token": "masumi_payment_api_key_secret",
    "permission": "Admin",
    "usageLimited": true,
    "networkLimit": [
      "Preprod",
      "Mainnet"
    ],
    "status": "Active"
  }
}
Empty
Empty
Empty