> ## 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` - used to delete a cryptographic key that has not been associated with a [Secure Object](/3.0/api/creating-secure-objects-and-collections.md#secure-object), which thereby frees up the unallocated key limit once this has been reached.

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

## Detailed description&#x20;

This API endpoint deletes an unallocated cryptographic key (i.e. a key which has not been associated with a Secure Object), which thereby frees up the default limit of 10 unallocated keys that can be generated per user's session/valid access token.

Unallocated keys typically result from failures in [associating a key with a Secure Object](/3.0/api/access-service-api-v1-objects.md) (i.e. initializing an *Incomplete* Secure Object).

## Supported roles and conditions&#x20;

This API endpoint supports the following Covata user [roles](/3.0/admin/administering-users.md#a-users-roles) (as described in the [Covata Platform Administrator's Guide](/3.0/admin.md)) and conditions:

* [Originator](/3.0/admin/administering-users.md#originator-role), [Collaborator](/3.0/admin/administering-users.md#collaborator-role) and [Ad hoc](/3.0/admin/administering-users.md#adhoc-role) - a Covata user with any of these roles can call this endpoint on a [key they generated](/3.0/api/access-service-api-v1-keys.md).

The Covata Platform's resources available to one of these Covata users (above) is determined by the access token passed in the [header](/3.0/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:

* `Authorization: Bearer a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6`

## 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.