---
title: "Clear Sandbox Credential"
method: DELETE
path: "/api/v1/tool-settings/sandbox/credential"
tags: ["tool-settings"]
---

# Clear Sandbox Credential

`DELETE /api/v1/tool-settings/sandbox/credential`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Otari-Key`
  - API key in header `x-api-key`

Delete the stored sandbox key, so sandboxes are leased with the environment's key again.

Clearing a key that was never stored is not an error. Operator-gated.

## Response `200`

Successful Response

- SandboxCredentialPublic: Where the key a hosted sandbox provider leases with comes from. Never the key itself.
  - `env_var` string, required: The environment variable a deployment that stores no key is read from.
  - `last4` string, nullable: The key's last four characters, to tell keys apart.
  - `source` 'stored' | 'environment', nullable, required: 'stored' for a key set here, which wins; 'environment' for the provider's own environment variable; null when there is neither and code execution fails until one is set.

## Changes

- **2026-10-23** `84952d275e25`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mozilla-ai/apis/otari/changes/api/v1/tool-settings/sandbox/credential/delete.md)

---

[API](https://skmtc.dev/mozilla-ai/apis/otari.md) - [All operations](https://skmtc.dev/mozilla-ai/apis/otari/llms.txt) - [OpenAPI document](https://skmtc.dev/mozilla-ai/apis/otari/revisions/42276d3c251d?raw)
