cURL
curl -X DELETE https://api.neuraldraft.io/v1/projects/me/api-keys/key_2Ngc7HpQrZk1 \
-H "Authorization: Bearer ndsk_live_yourkey"await nd.projects.apiKeys.revoke("key_2Ngc7HpQrZk1");
requests.delete(
f"https://api.neuraldraft.io/v1/projects/me/api-keys/{key_id}",
headers={"Authorization": f"Bearer {key}"},
)
<?php
$client->delete("projects/me/api-keys/{$keyId}", [
'headers' => ['Authorization' => 'Bearer '.$key],
]);
{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/not_found",
"title": "Not found",
"status": 404,
"detail": "No such resource.",
"code": "not_found",
"instance": "req_2Nh4PqRsTuVw"
}Projects
Revoke an API key
Permanently revokes the key. Subsequent requests authenticating with
the revoked secret return 401 Unauthorized. Cannot be undone.
Revoking your last key locks you out of the API — be careful.
DELETE
/
projects
/
me
/
api-keys
/
{key_id}
cURL
curl -X DELETE https://api.neuraldraft.io/v1/projects/me/api-keys/key_2Ngc7HpQrZk1 \
-H "Authorization: Bearer ndsk_live_yourkey"await nd.projects.apiKeys.revoke("key_2Ngc7HpQrZk1");
requests.delete(
f"https://api.neuraldraft.io/v1/projects/me/api-keys/{key_id}",
headers={"Authorization": f"Bearer {key}"},
)
<?php
$client->delete("projects/me/api-keys/{$keyId}", [
'headers' => ['Authorization' => 'Bearer '.$key],
]);
{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/not_found",
"title": "Not found",
"status": 404,
"detail": "No such resource.",
"code": "not_found",
"instance": "req_2Nh4PqRsTuVw"
}Authorizations
Project API key. Pass as Authorization: Bearer ndsk_live_.... Manage
keys via /projects/me/api-keys. Test-mode keys use
the ndsk_test_ prefix.
Path Parameters
API key id (e.g. key_2Ngc7HpQrZk1).
Response
Revoked.