POST
/
v1
/
apis.deleteKeys
curl --request POST \
  --url https://api.unkey.dev/v1/apis.deleteKeys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "apiId": "api_1234",
  "permanent": true
}'
{
  "deletedKeys": 123
}

Changelog

DateChanges
May 26 2024Introduced endpoint

Authorizations

Authorization
string
headerrequired

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

Body

application/json
apiId
string
required

The id of the api, that the keys belong to.

permanent
boolean
default: false

If true, the keys will be permanently deleted. If false, the keys will be soft-deleted and can be restored later.

Response

200 - application/json
deletedKeys
number
required

The number of keys that were deleted