> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cocoondata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# <access-service>/api/v1/keys/{keyId}

## URL structure&#x20;

```text theme={null}
https://access-service.xy-company.com/api/v1/keys/{keyId}
```

where `{keyId}` is the ID of a cryptographic key.

## Supported methods and overview&#x20;

* `DELETE` - deletes an unallocated cryptographic key (i.e. the key specified by `keyId` that has not been associated with a file object or version) to avoid breaching the unallocated keys limit.

> [!NOTE]
>
> This method takes no parameters.

## Detailed description&#x20;

This API endpoint deletes an unallocated cryptographic key (i.e. the key specified by `keyId` that has not been associated with a file object or version). This allows the [generation of more (unallocated) cryptographic keys](/3.5/api/access-service-api-v1-keys.md) and helps avoid breaching the unallocated keys limit (which is 100 per user's session/valid access token).

> [!NOTE]
>
> Unallocated keys typically result from failures in [associating a key with a file object](/3.5/api/access-service-api-v1-organisations-orggroupid-objects.md) (i.e. initializing an *Incomplete* file object).

## Supported roles and conditions&#x20;

This API endpoint supports requests utilising Covata user accounts with the following [roles](/3.5/admin-org/administering-users-within-an-organisation.md#an-organisation-users-roles) (as described in the [Organisation Administrator's Guide](/3.5/admin-org.md)) and conditions:

* [Originator](/3.5/admin-org/administering-users-within-an-organisation.md#originator-role), [Collaborator](/3.5/admin-org/administering-users-within-an-organisation.md#collaborator-role) and [Ad hoc](/3.5/admin-org/administering-users-within-an-organisation.md#adhoc-role) - when this user [generated the key](/3.5/api/access-service-api-v1-keys.md) specified by the `{keyId}` of the request's URL.

The Covata Platform's resources available to a Covata user meeting the criteria above is determined by the access token submitted in the [header](/3.5/api/access-service-api-v1-keys-keyid.md#access-service-api-v1-keys-keyid-required-headers) of requests to this endpoint.

## Required headers&#x20;

The appropriate access token as the `Bearer` token:

* `Authorisation: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0NjcwMTY2NjYsInVzZXJfbmFtZSI6ImFsZXgub...`

## Returns&#x20;

If the request succeeded, then an HTTP response status `200 OK` is returned.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.