---
title: "Delete Variables (by IDs)"
description: "Delete one or more knowledge-base or folder variables in a single call, by variableMapId. Includes example request, response, and errors."
url: "https://docs.turbodocx.com/docs/API/delete-variables-by-i-ds"
---

# Delete Variables (by IDs)

> Delete one or more knowledge-base or folder variables in a single call, by variableMapId. Includes example request, response, and errors.

The Delete Variables (by IDs) endpoint removes one or more variables from your knowledge base or a template folder in a single call, along with their versions, tags, and (for image variables) their stored files.

## When to use it

Use this endpoint to let users bulk-clean their variable library, instead of calling a single-variable delete endpoint in a loop.

## Example request

```bash
curl -X DELETE "https://api.turbodocx.com/Variable/Bulk/Action" \
  -H "Authorization: Bearer $TURBODOCX_API_KEY" \
  -H "x-rapiddocx-org-id: $TURBODOCX_ORG_ID" \
  -H "Content-Type: application/json" \
  -d '{"ids": ["e4f5a6b7-8c9d-4e0f-a1b2-3c4d5e6f7a8b"]}'
```

Each entry in `ids` is a `variableMapId`, the same `id` returned by [Read Variables (Folder)](https://docs.turbodocx.com/docs/API/read-variables-folder.md).

## Example response

On success the endpoint returns `200 OK` with an empty data object:

```json
{
  "data": {}
}
```

## Common errors

| Status | When | Response body |
| ------ | ---- | ------------- |
| 401 | Missing or invalid API key/token, or the organization cannot be resolved | Empty (status only) |
| 403 | The key's role is not administrator, contributor, or user | Empty (status only) |
| 400 | `ids` is missing or not an array | `{ "message", "type": "ValidationError", "data": { "errors": [...] } }` |

## Related endpoints

- [Read Variables (Folder)](https://docs.turbodocx.com/docs/API/read-variables-folder.md) to find the variable IDs to delete
- [Update Variable by ID](https://docs.turbodocx.com/docs/API/update-variable-by-id.md) to edit a variable instead of deleting it
