Delete an API key
Delete an API key
This is for:
System AdministratorIt’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 when it’s no longer needed for that purpose.
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 operation to completely remove an API key from a specific Coveo organization.
You can also perform this action from the Coveo Administration Console (see Manage API keys - Delete an API key).
Request template
DELETE https://platform.cloud.coveo.com/rest/organizations/<MyOrganizationId>/apikeys/<MyApiKeyId> HTTP/1.1
Accept: application/json
Authorization: Bearer <MyAccessToken>
In the request path:
- You replace
<MyOrganizationId>
with the actual ID of the target Coveo organization (see Retrieve the organization ID). - Replace
<MyApiKeyId>
with the actual ID of the API key you want to delete (see Get the apiKeyId).
In the Authorization
HTTP header:
- Replace
<MyAccessToken>
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 and Get the privileges of an access token).
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
DELETE https://platform.cloud.coveo.com/rest/organizations/mycoveocloudv2organizationg8tp8wu3/apikeys/wduuqg3ip2c3i3gpopapxhcgxe HTTP/1.1
Accept: application/json
Authorization: Bearer **********-****-****-****-************
Successful response - 204 No Content
{}