---
title: "Delete an organization-scoped scan template"
method: DELETE
path: "/api/v3.0/redteaming/orgs/{orgUuid}/templates/{templateId}"
tags: ["Red Team - Templates"]
---

# Delete an organization-scoped scan template

`DELETE /api/v3.0/redteaming/orgs/{orgUuid}/templates/{templateId}`

## Request

- Base URL: `https://baseUrl`
- URL: `https://baseUrl/api/v3.0/redteaming/orgs/{orgUuid}/templates/{templateId}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/mend/apis/mend-api/docs/api/v3.0/redteaming/orgs/:orgUuid/templates/:templateId/delete.ts> (a function with typed inputs; its response is checked against the schema)

Permanently deletes an organization-scoped template.

## Path parameters

- `orgUuid` string, uuid, required
- `templateId` string, uuid, required

## Query parameters

- `pretty` boolean

## Headers

- `X-Correlation-ID` string, uuid

## Response `200`

Deleted

- DeletedResource
  - `supportToken` string, uuid, required: Correlation id used for this request. Same value as the X-Correlation-ID response header.
  - `response` Deleted, required
    - `id` string, uuid, required
    - `deleted` true, required
    - `_links` Links, required

## Other responses

- `400`: X-Correlation-ID is not a UUID (CORRELATION.INVALID), or the service rejected the request (CONFIG.CONNECTIVITY_FAILED, REQUEST.FAILED, UPSTREAM.REJECTED, or another catalog code). Other 4xx or 5xx failures use this same error envelope. `response.error` is a catalog code when one applies, `REQUEST.FAILED` when no detail is available, or `UPSTREAM.REJECTED` otherwise. The HTTP status reflects the failure.
- `401`: Authentication failed. The job report returns this JSON envelope and never a PDF or CSV attachment. Codes: AUTH.REQUIRED, AUTH.FAILED, AUTH.USER_HEADER_MISMATCH, JWT.EXPIRED, JWT.SIGNATURE, JWT.STRUCTURE, JWT.MISSING_CLAIMS, JWT.UNAVAILABLE, JWT.CLAIM_INVALID, JWT.VERIFICATION_FAILED.
- `403`: Authentication succeeded but the call is not allowed. AUTH.SERVICE_BOT: a service-to-service token cannot call this API. AUTH.ORG_MISMATCH: the organization in the URL does not match the access token. AUTH.INSUFFICIENT_PERMISSIONS: the token lacks permission for this action. Template update and delete also return AUTH.INSUFFICIENT_PERMISSIONS when the caller is not the template owner and does not have manage-settings access. TEMPLATE.ORG_SCOPE_DENIED: a template write whose scope is organization without organization-level manage-targets permission.
- `404`: No template exists with this id (TEMPLATE.NOT_FOUND).
- `409`: A UUID is already in use (UUID.DUPLICATE). Other 4xx or 5xx failures use this same error envelope. `response.error` is a catalog code when one applies, `REQUEST.FAILED` when no detail is available, or `UPSTREAM.REJECTED` otherwise. The HTTP status reflects the failure.
- `429`: The caller exceeded the per-user request rate (RATE.LIMITED). The default is 600 requests per minute per user. Retry after the number of seconds in Retry-After.
- `500`: INTERNAL.ERROR: an unexpected failure. Retry and include supportToken if it continues. AUTH.PERMISSIONS_UNRESOLVED: permissions could not be resolved.
- `502`: The response body exceeded the maximum allowed size (UPSTREAM.TOO_LARGE). The default limit is 50 MB.
- `503`: The API is temporarily unavailable and is not accepting this request. This body is not the error envelope.
- `504`: The operation timed out (UPSTREAM.TIMEOUT). The default timeout is 120 seconds, and 300 seconds for report exports. The operation may still complete; check its state before retrying a write.

## Changes

- **2026-10-22** `17de76ee2fb8`: 18 warning, 9 info
  - added the new `CONFIG.NO_ACTIVE_SCANNER` enum value to the `response/error` response property for the response status `400`
  - added the new `CONFIG.NO_ACTIVE_SCANNER` enum value to the `response/error` response property for the response status `401`
  - added the new `CONFIG.NO_ACTIVE_SCANNER` enum value to the `response/error` response property for the response status `403`
  - added the new `CONFIG.NO_ACTIVE_SCANNER` enum value to the `response/error` response property for the response status `404`
  - …23 more
- **2026-10-01** `67a0e59611cd`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mend/apis/mend-api/changes/api/v3.0/redteaming/orgs/:orgUuid/templates/:templateId/delete.md)

---

[API](https://skmtc.dev/mend/apis/mend-api.md) - [All operations](https://skmtc.dev/mend/apis/mend-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mend/apis/mend-api/revisions/17de76ee2fb8?raw)
