---
title: "detachEnvironmentService"
method: POST
path: "/platform/environments/{id}/services/detach"
tags: ["Platform"]
---

# detachEnvironmentService

`POST /platform/environments/{id}/services/detach`

## Request

- Base URL: `https://api.imprezahost.com/v1`
- URL: `https://api.imprezahost.com/v1/platform/environments/{id}/services/detach`
- Auth: API key in header `X-API-Key` and API key in header `X-API-Secret`

Deploy scope and confirm=true. Removes only metadata, preserving workloads and data.

## Path parameters

- `id` string, required

## Request body

- object
  - `deployment_id` string, required
  - `confirm` true, required

## Response `200`

Metadata operation result

## Other responses

- `400`: Invalid input
- `403`: Required scope missing
- `404`: Resource or current ownership unavailable
- `409`: Conflicting association or active operation
- `429`: Quota exceeded
- `503`: Storage unavailable; read before retrying

---

[API](https://skmtc.dev/imprezahost/apis/impreza-host-public-api.md) · [All operations](https://skmtc.dev/imprezahost/apis/impreza-host-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/imprezahost/apis/impreza-host-public-api/revisions/db86511f604f?raw)
