Docs
Secrets ›

Delete sandbox variable

DELETE/v1/sandboxes/{id}/secrets/variables/{name}

Removes one of the sandbox's variables. It is used from the sandbox's next command, without a restart. Where the sandbox's template names the same one, the sandbox's own is used.

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

No body: the status says it was done.

Variable removed.

Path

idrequired
string
e.g. "sbx_0123456789abcdef"
namerequired
string
e.g. "DATABASE_URL"

Headers

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

Returns

204 Variable removed.

Errors and other answers

404 Not found.

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