Docs
Account, keys and webhooks ›

Delete api key

DELETE/v1/api-keys/{id}

Delete a key. Whatever holds it is refused from the next request.

RequestTypeScript
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. await agental.apiKeys.delete("key_9b1c7e2f4a6d8053");
Answer204 No Content

No body: the status says it was done.

API key deleted.

Path

idrequired
string
e.g. "key_38b536dc2eabdb52"

Headers

Authorizationrequired
Bearer key
An API key that may make this call.

Returns

204 API key deleted. Whatever holds it is refused from its next request. The sandboxes it made stay the account's.

Errors and other answers

404 not_found.
409dev_key_permanent the seeded dev key cannot be deleted.

Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.