Revoke an API key
DELETE
/api-keys/{id}
const url = 'https://api.engram.page/api-keys/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.engram.page/api-keys/example \ --header 'Authorization: Bearer <token>'Permanently revokes the API key with the given UUID so it can no longer authenticate. Returns 400 for a malformed id and 404 when no such key belongs to the user.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
API key UUID
Responses
Section titled “Responses”Revoked
Media typeapplication/json
DeletedFlag
object
deleted
required
boolean
Example
{ "deleted": true}Invalid id
Media typeapplication/json
MessageError
object
error
required
string
Example
{ "error": "not found"}No such key
Media typeapplication/json
MessageError
object
error
required
string
Example
{ "error": "not found"}