Sandboxes ›
Delete sandbox
DELETE
/v1/sandboxes/{id}Delete. Needs X-Agental-Confirm-Delete.
RequestTypeScript
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const sandbox = await agental.sandboxes.get("sbx_2a9a47e50daec64a");
- await sandbox.delete();
Answer204 No Content
No body: the status says it was done.
Sandbox deleted, or it was already gone.
Path
idrequiredstring | e.g. "sbx_0123456789abcdef" |
Headers
AuthorizationrequiredBearer key | An API key that may make this call. |
Returns
204 Sandbox deleted, or it was already gone. Requires X-Agental-Confirm-Delete equal to the sandbox id. The response header Deletion-Operation-Id identifies the operation.
Errors and other answers
| 400 | confirm_delete_required. |
| 403 | key_action_forbidden the key has sandbox.delete-own and not sandbox.delete, and did not make this sandbox. |
| 404 | Not found. |
Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.