# Delete an agent version (/docs/api-reference/agents/deleteAgentVersion)

> Delete a saved version.

**DELETE** `/agents/{agent_id}/versions/{version_number}`

Delete a saved version.

```yaml
operationId: deleteAgentVersion
responses:
  '200':
    description: Version deleted.
    content:
      application/json:
        schema:
          type: object
          properties:
            success:
              type: boolean
            message:
              type: string
        example:
          success: true
          message: Version deleted successfully
  '403':
    description: Version history is not enabled for this organization.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
            error_description:
              type: string
        example:
          error: feature_disabled
          error_description: Version history is not enabled for this organization
  '404':
    description: No agent or version matching that ID.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
            error_description:
              type: string
        example:
          error: not_found
          error_description: Version not found for this agent
```

**Python SDK**

```python
from omnidimension import Client
client = Client(api_key)

# Delete a saved version
agent_id = "your_agent_id_here"
version_number = 5
response = client.agent.delete_version(agent_id, version_number)
print(response)
```

**curl**

```bash
curl -X DELETE "https://omnidim.io/api/v1/agents/{agent_id}/versions/{version_number}" \
  -H "Authorization: Bearer $OMNIDIM_API_KEY"
```