---
title: "DELETE /api/v1/agent-vault/variables/{variableId}"
method: DELETE
path: "/api/v1/agent-vault/variables/{variableId}"
tags: ["Agent Vault Variables"]
---

# DELETE /api/v1/agent-vault/variables/{variableId}

`DELETE /api/v1/agent-vault/variables/{variableId}`

## Request

- Base URL: `https://us.infisical.com`
- URL: `https://us.infisical.com/api/v1/agent-vault/variables/{variableId}`
- Auth: none declared

Delete a global variable, or a personal one of your own. A variable in use, by a service or by your personal values, can't be deleted.

## Path parameters

- `variableId` string, uuid, required

## Response `200`

Default Response

- object
  - `variable` object, required
    - `id` string, uuid, required: The ID of the variable.
    - `key` string, required: The name values use to refer to the variable, as `{{KEY}}`. Starts with a letter and uses only upper case letters, numbers and underscores.
    - `scope` 'global' | 'personal', required: global for a variable admins set up for services, or personal for one of your own, which only your personal values can use and only you can see. Personal keys are unique among your own variables.
    - `usedByServices` object[], required: The services that use this variable, across every access bundle, ordered by access bundle name and then service name. For a personal variable, the services whose personal values, as you set them, use it. A variable in use can't be deleted.
      - `id` string, uuid, required: The ID of a service that uses this variable.
      - `name` string, required: The name of the service.
      - `hostPattern` string, required: The host pattern of the service.
      - `accessBundleId` string, uuid, required: The ID of the access bundle the service belongs to.
      - `accessBundleName` string, required: The name of the access bundle the service belongs to.
    - `createdAt` string, date-time, required: When the variable was added.
    - `updatedAt` string, date-time, required: When the variable was last changed.

## Other responses

- `400`: Default Response
- `401`: Default Response
- `403`: Default Response
- `404`: Default Response
- `422`: Default Response
- `500`: Default Response

## Changes

- **2026-10-24** `699ce770462c`: 1 info
  - added the required property `variable/scope` to the response with the `200` status
- **2026-10-16** `dac52fa38c36`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/infisical/apis/infisical-api/changes/api/v1/agent-vault/variables/:variableId/delete.md)

---

[API](https://skmtc.dev/infisical/apis/infisical-api.md) - [All operations](https://skmtc.dev/infisical/apis/infisical-api/llms.txt) - [OpenAPI document](https://skmtc.dev/infisical/apis/infisical-api/revisions/7f940199c899?raw)
