---
title: "delete env var"
method: DELETE
path: "/api/v0/secrets/"
tags: ["Accounts"]
---

# delete env var

`DELETE /api/v0/secrets/`

Deletes an environment variable associated with the authenticated user.
The variable must exist and belong to the requesting user.

CLI Usage: `vastai delete env-var <name>`

## Request body

- object
  - `key` string, required — Name of the environment variable to delete

## Response `200`

Environment variable deleted successfully

- SuccessResponse
  - `success` boolean
  - `msg` string

## Other responses

- `400` — Bad request - missing or invalid input
- `401` — Unauthorized - Invalid or missing API key
- `403` — Forbidden - User is blacklisted
- `429` — Too many requests - rate limit exceeded

---

[API](https://skmtc.net/vast/apis/vast-ai-api.md) · [All operations](https://skmtc.net/vast/apis/vast-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vast/vast-ai-api/revisions/4ed14f79f796/schema)
