> ## Documentation Index
> Fetch the complete documentation index at: https://botsify.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Agent Versions — DELETE /api/v1/delete-version

> Permanently remove one or more saved agent versions by passing an array of version IDs. The currently active version is protected and cannot be deleted.

Use this endpoint to remove one or more saved agent versions that you no longer need. You can delete multiple versions in a single request by passing an array of version IDs. This is useful for cleaning up outdated snapshots and keeping your version list manageable.

> [!WARNING]
>
> Deletion is permanent. Once a version is deleted it cannot be recovered. Make sure you no longer need a version — including its instructions, chat flow, and all other configuration fields — before deleting it. The currently active version is protected and cannot be deleted; [switch to a different active version](/api-reference/agent-versions/set-active-version.md) first if needed.

## Request

**`DELETE https://app.botsify.com/api/v1/delete-version`**

**Authorization:** Bearer token — include your token in the `Authorization: Bearer <token>` header.

### Body Parameters

**version\_ids** `integer[]` *required*

An array of one or more version IDs to delete. All specified versions must belong to a bot accessible by the authenticated token.

## Example — Delete a Single Version

```bash theme={null}
curl --request DELETE \
  --url "https://app.botsify.com/api/v1/delete-version" \
  --header "Authorization: Bearer <your_token>" \
  --header "Content-Type: application/json" \
  --data '{
    "version_ids": [7]
  }'
```

## Example — Delete Multiple Versions

```bash theme={null}
curl --request DELETE \
  --url "https://app.botsify.com/api/v1/delete-version" \
  --header "Authorization: Bearer <your_token>" \
  --header "Content-Type: application/json" \
  --data '{
    "version_ids": [3, 5, 7]
  }'
```

## Response

A successful request returns `200 OK` with a summary of which versions were deleted.

```json theme={null}
{
  "success": true,
  "deleted_version_ids": [3, 5, 7],
  "message": "3 version(s) successfully deleted."
}
```

If you attempt to delete the currently active version, the API returns a `422 Unprocessable Entity` error:

```json theme={null}
{
  "success": false,
  "error": "Cannot delete the active version. Please set a different version as active before deleting."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.