Revoke API token
DELETE
/api-token/{id}
Irreversible and immediate: every integration using this token starts failing on its next request. Requires `api_token:create` or `api_token:manage`, an interactive human session, and a fresh step-up authentication (`X-Step-Up-Token`, obtained from `/auth/step-up`).
Path Parameters
idstring
required·
API token id (atok_…) — not the token itself.
Response Body
successboolean
curl -X DELETE 'https://api.elaichi.ai/api-token/<id>' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json'const response = await fetch('https://api.elaichi.ai/api-token/<id>', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/api-token/<id>"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
response = requests.delete(url, headers=headers)
print(response.json())