POST
/
v1
/
keys.removePermissions
curl --request POST \
  --url https://api.unkey.dev/v1/keys.removePermissions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "keyId": "<string>",
  "permissions": [
    {
      "id": "perm_123"
    },
    {
      "name": "dns.record.create"
    }
  ]
}'
{}

To use this endpoint, your root key must have the rbac.*.remove_permission_from_key permission.

Changelog

DateChanges
Jul 08 2024Introduced endpoint

Authorizations

Authorization
string
header
required

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

Body

application/json
keyId
string
required

The id of the key.

Minimum length: 1
permissions
object[]
required

The permissions you want to remove from this key.

Response

200 - application/json

The response is of type object.