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
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- await agental.apiKeys.delete("key_9b1c7e2f4a6d8053");
Answer204 No Content
No body: the status says it was done.
API key deleted.
Path
idrequiredstring | e.g. "key_38b536dc2eabdb52" |
Headers
AuthorizationrequiredBearer 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. |
| 409 | dev_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.