Delete an API key
DELETE/api-keys/:api_key_id
Deletes an API key and the key's permission entries. Requests that use the deleted key are refused from the next request. A key cannot delete itself, and no key can delete the master key.
Permissions. Write on the api-keys object type.
Request
Responses
- 204
- 401
- 403
- 404
The API key and the key's permission entries were deleted. The response has no body.
The authentication headers are missing or invalid, or the API key is inactive or expired. Errors lists the messages.
The request names the calling key or the master key, or the calling key lacks write permission on the api-keys object type (Unauthorized: write access to API Key required). details.error gives the reason: Cannot delete the current API key, The master API key cannot be deleted through the API or Deleting an API key requires write access to API keys.
No API key with this identifier exists, or the calling key lacks write permission on the API key (API Key not found, with the identifier in details.id).