Skip to main content
PATCH
/
consumer
/
v1
/
keys
/
{keyId}
Update key scopes or policy
curl --request PATCH \
  --url https://api.machines.cash/consumer/v1/keys/{keyId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "scopes": [
    "cards.read"
  ],
  "revoke": false
}
'
{
  "ok": true,
  "data": {},
  "summary": "success"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

keyId
string
required

Consumer key id to update.

Body

application/json
scopes
enum<string>[]
Available options:
users.read,
users.write,
kyc.read,
kyc.write,
agreements.read,
agreements.write,
onboarding.read,
onboarding.write,
cards.read,
cards.write,
cards.secrets.read,
folders.read,
folders.write,
balances.read,
contracts.read,
contracts.write,
deposits.read,
deposits.write,
deposits-swapped.read,
deposits-swapped.write,
withdrawals.write,
transactions.read,
tokens.read,
encryption.read,
encryption.write,
identity.read,
identity.write,
payments.read,
payments.write,
subscriptions.read,
subscriptions.write,
notifications.read,
notifications.write,
referrals.read,
referrals.write,
bills.read,
bills.write,
support.read,
spotlight.read,
keys.read,
keys.write,
sessions.write
policy
object
revoke
boolean

Response

Success

id
string
keyPrefix
string
scopes
string[]
policy
object
createdAt
string<date-time>
revokedAt
string<date-time> | null