Delete a User API Key

The Atlas API uses HTTP Digest Authentication. Provide your Atlas username and API key as the username and password when constructing the HTTP request.

For complete documentation on configuring API access for an Atlas project, see Configure Atlas API Access.

Base URL:

Use this endpoint to delete a user’s API key. You must be the user specified in the digest authentication to successfully use this endpoint.


DELETE /users/{USER-ID}/keys/{KEY-ID}

Request Parameters

Request Path Parameters

Path Element Required/Optional Description
USER-ID Required. The unique identifier for your MongoDB user. Specify the value of the id field for the desired user in the response body of the /orgs/{ORG-ID}/users endpoint.
KEY-ID Required The unique identifier for the user API key that you want to delete. Specify the value of the id field for the desired key in the response body of the users/{USER-ID}/keys endpoint.

Request Query Parameters

This endpoint may use any of the HTTP request query parameters available to all Atlas API resources. These are all optional.

Name Type Description Default
pretty boolean Display response in a prettyprint format. false
envelope boolean Specifies whether or not to wrap the response in an envelope. false

Request Body Parameters

This endpoint does not use HTTP request body parameters.


This endpoint returns an empty JSON document.

Example Request

The following example disables a user API key:

curl -X DELETE --digest -i -u "{username:apiKey}" \

Example Response

HTTP/1.1 200 Accepted