For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

Revoke Service Account Token

POST https://cloud.mongodb.com/api/oauth/revoke

This endpoint doesn't use HTTP request path parameters.

The following query parameters are optional:

Name
Type
Necessity
Description
Default

pretty

boolean

Optional

Flag that indicates whether the response body should be in a prettyprint format.

false

envelope

boolean

Optional

Flag that indicates whether or not to wrap the response in an envelope.

Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope : true in the query.

For endpoints that return a list of results, the content object is an envelope. Cloud Manager adds the status field to the response body.

false

backupJobsEnabledOnly

boolean

Optional

Flag indicating whether to exclude daemons not enabled for backing up databases from the response. Set this to false to include daemon configurations with the backupJobsEnabled flag set to false.

true

All body parameters are required.

Name
Type
Description

TOKEN

string

The access token that you want to revoke. To learn more, see Generate Service Account Token.

Replace {BASE64-AUTH} in the following example with your base64-encoded service account client ID and secret. To learn more, see Make an API Request.

curl -X POST https://cloud.mongodb.com/api/oauth/revoke \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Basic {BASE64-AUTH}" \
-d "token={TOKEN}&token_type_hint=access_token"
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}
X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}

This endpoint doesn't return a response body.