You can perform a DELETE operation on a key resource to remove it from the environment. However, the key must not be associated with any applications. If the key is used by an application, it cannot be deleted.

To delete a key resource, use the DELETE /environments/{environmentId}/keys/{keyId} operation and specify the ID of the key to delete in the request URL.

When successful, the DELETE request returns a code 204 No Content message.