Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Revoke an API key

Revokes a key so it stops authenticating immediately. The record is retained for audit.

DELETE/v1/api-keys/{apiKeyId}
Authorization
AuthorizationBearer token · headerrequired

Better Auth session, OAuth access token, OAuth client-credentials token, or sfm_ Space machine credential.

or
AuthorizationOAuth2 access token · headerrequired

OAuth 2.0 with explicit Spacefast capability scopes. Use the authorization-code flow for people and client credentials for machines.

Scopes:teams:create
Path parameters
apiKeyIdstringrequired

API key id.

min length 1
Responses
204

The key was revoked.

Try it
Server
Authorization
Parameters
Request
curl -X DELETE 'https://api.spacefast.com/v1/api-keys/string' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
The key was revoked.

Was this page helpful?