--- title: Delete an API key programmatically slug: '80' canonical_url: https://docs.coveo.com/en/80/ collection: manage-an-organization source_format: adoc --- # Delete an API key programmatically It's good practice to create an API key with minimal privileges for one precise and exclusive purpose and delete this API key from the [Coveo organization](https://docs.coveo.com/en/185/) when it's no longer needed for that purpose. > **Important** > > You can't undo an API key delete operation. > If you're not entirely sure you should delete a specific API key, consider disabling it instead. Use the [Delete an API key](https://platform.cloud.coveo.com/docs?urls.primaryName=AuthorizationServer#/Api%20Keys/rest_organizations_paramId_apikeys_paramId_delete) operation to completely remove an API key from a specific Coveo organization. > **Note** > > You can also perform this action from the [**API Keys**](https://platform.cloud.coveo.com/admin/#/orgid/organization/api-access/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/organization/api-access/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/organization/api-access/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/organization/api-access/)) page of the Coveo Administration Console. > See [Delete an API key](https://docs.coveo.com/en/1718#delete-an-api-key). **Request template** ```http DELETE https://platform.cloud.coveo.com/rest/organizations//apikeys/ HTTP/1.1 Accept: application/json Authorization: Bearer ``` In the request path: * You replace `` with your [organization ID](https://docs.coveo.com/en/148/). * Replace `` with the [ID of the API key](https://docs.coveo.com/en/38/) to delete. In the `Authorization` HTTP header, replace `` with an access token (API key or OAuth2 token) that grants the privilege to edit API keys in the target organization. See [Get your Coveo access token](https://docs.coveo.com/en/123/) and [Get the privileges of an access token](https://docs.coveo.com/en/109/). A successful response has no content, but signifies that the API key corresponding to the API key ID you provide as a path argument no longer exists in the target organization. ## Sample request **Deleting an API key in a Coveo organization** ```http DELETE https://platform.cloud.coveo.com/rest/organizations/mycoveocloudv2organizationg8tp8wu3/apikeys/wduuqg3ip2c3i3gpopapxhcgxe HTTP/1.1 Accept: application/json Authorization: Bearer **********-****-****-****-************ ``` **Successful response - 204 No Content** ```json {} ```