Docs
Sandboxes ›

Delete sandbox

DELETE/v1/sandboxes/{id}

Delete. Needs X-Agental-Confirm-Delete.

RequestTypeScript
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const sandbox = await agental.sandboxes.get("sbx_2a9a47e50daec64a");
  4. await sandbox.delete();
Answer204 No Content

No body: the status says it was done.

Sandbox deleted, or it was already gone.

Path

idrequired
string
e.g. "sbx_0123456789abcdef"

Headers

Authorizationrequired
Bearer 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.
403key_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.