Delete API Key
Revoke an API key. Any in-flight request that's already been authenticated continues to its end, but every subsequent request using this key returns 401 immediately — there's no caching window.
This is the right action when a key is leaked, no longer needed, or being rotated. Don't accidentally delete the key you're authenticating with — there's nothing stopping you from doing so, and you'll lock yourself out until you create another via the dashboard.
Path parameters
id int64 Req
Numeric ID of the key to revoke. Get it from /keys/api.
Response (204 No Content)
Empty body on success.
Errors
400 Bad Request
Non-numeric ID.
401 Unauthorized
Missing auth.
404 Not Found
Key doesn't exist or doesn't belong to the calling user. Same status for both — don't trust 404 to confirm a key existed.
Request
curl -X DELETE "https://api.ngris.com/v1/keys/api/42" \
-H "X-API-KEY: <your_api_key>"
Python
from ngris import Ngris
client = Ngris(api_key="<your_api_key>")
client.api_keys.delete_api_key(42)
Response — 204 No Content