---
title: "Delete an agent environment template"
method: DELETE
path: "/agents/environments/templates/{environment_template_id}"
tags: ["Agents"]
---

# Delete an agent environment template

`DELETE /agents/environments/templates/{environment_template_id}`

## Request

- Base URL: `https://api.openai.com/v1`
- URL: `https://api.openai.com/v1/agents/environments/templates/{environment_template_id}`
- Auth: HTTP bearer

Deletes reusable environment configuration and all confidential template inputs. See [reusing a hosted setup](https://developers.openai.com/api/docs/guides/agents-api/tools#reuse-a-hosted-plugin-setup).

## Path parameters

- `environment_template_id` string, required

## Response `200`

The deleted environment template.

- DeletedEnvironmentTemplateResource: A deleted reusable environment template.
  - `id` string, required: The ID of the deleted environment template.
  - `object` 'agent.environment.template.deleted', required: The object type. Always `agent.environment.template.deleted`.
  - `deleted` boolean, required: Whether the environment template was deleted. Always `true`.

## Other responses

- `400`: The request was invalid.
- `401`: Authentication or project context was missing.
- `403`: The API key lacks the required management permission.
- `404`: The requested environment definition was not found.
- `409`: The request conflicted with the current environment state.
- `500`: An internal error occurred.
- `503`: The service is temporarily unavailable.

## Changes

- **2026-10-05** `7f654af7f94f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omnistack-sh/apis/openai-api/changes/agents/environments/templates/:environment_template_id/delete.md)

---

[API](https://skmtc.dev/omnistack-sh/apis/openai-api.md) - [All operations](https://skmtc.dev/omnistack-sh/apis/openai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/omnistack-sh/apis/openai-api/revisions/0a26f104d35f?raw)
