---
title: "Soft-delete an egress template by ID"
method: DELETE
path: "/api/v1/egress-templates/{templateId}"
tags: ["EgressTemplate"]
---

# Soft-delete an egress template by ID

`DELETE /api/v1/egress-templates/{templateId}`

Marks an egress template as inactive by setting its `status` to `inactive`. The record is not removed from the data store and remains retrievable via `GET /api/v1/egress-templates/{templateId}` and `GET /api/v1/egress-templates` (when filtering by `status=inactive`). No GCS files are deleted.

When to use: call this to retire a template from active use without permanently destroying its configuration or mapping history.

Preconditions: `tenant-id` header must be present. The template must belong to the requesting tenant; cross-tenant access returns 404 (not 403). If an export driven by this template is currently in progress, the request is rejected until that export completes.

Idempotency: calling delete again on an already-inactive template succeeds and is a no-op — `version` is not incremented by this operation, on first or subsequent calls.

Side effects: only the template's `status` field is updated. GCS files are untouched.

Returns: 204 No Content on success, with no response body.

## Path parameters

- `templateId` string, required

## Headers

- `tenant-id` string
- `x-user-id` string

## Response `204`

The template was marked inactive (or already was); no body

## Other responses

- `401` — The request is missing a valid bearer token; re-authenticate and retry
- `403` — The authenticated caller lacks the delete-template permission for this tenant
- `404` — No template with this id exists for the requesting tenant, or it belongs to a different tenant

---

[API](https://skmtc.net/certifyos/apis/certify-api-layer.md) · [All operations](https://skmtc.net/certifyos/apis/certify-api-layer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/certifyos/certify-api-layer/revisions/563848e0ecc0/schema)
