---
search:
  tags:
    - Secrets
    - POST
seo:
  description: >-
    Deletes several secrets from one environment in a single transaction, so a
    partial… Reference for the POST /secrets/delete-bulk endpoint in the varsafe
    API.
sidebar:
  label: Delete secrets in bulk
  badge: POST
title: Delete secrets in bulk
type: openapi-operation
---
Deletes several secrets from one environment in a single transaction, so a partial failure leaves the environment unchanged.

`POST /secrets/delete-bulk`

**Request body** (`application/json`, required)

- `ids` (string<uuid>[], required)
- `projectId` (string<uuid>, required)
- `environment` (string, required)

Request body example:

```json
{
  "ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
  "environment": "string"
}
```

**Responses**

- `200` — Success.
- `400` — The request failed validation. \`field\` names the offending input.
- `401` — No credential was presented, or it is invalid or revoked.
- `403` — The credential is valid but lacks the required scope, role or team access.
- `404` — The resource does not exist, or is not visible to this credential.
- `429` — Rate limited. Retry after the interval named in the response.
- `500` — Unexpected server error. The body never carries internal detail.

Response example, 200:

```json
{
  "deleted": 0,
  "failed": 0
}
```
