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

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
roles
object[]
required

The roles you want to remove from this key.

Minimum length: 1
Example:
[
{ "id": "role_123" },
{ "name": "dns.record.create" }
]

Response

Success

The response is of type object.