# Delete workflow template

Delete a workflow template. Deleting a custom template only affects the current workspace; deleting a built-in template requires administrator privileges. This operation is irreversible.

```text
DELETE $CLOUDSIGMA_API_BASE/workflow-templates/{id}
```

## Before you call this API

Configure the [regional API endpoint and authentication](https://omnifabric.cloudsigma.com/docs/developer/endpoints-and-authentication.html.md), and select the target workspace.

First [query workflow template details](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/data-processing/workflow-templates/get-workflow-template.html.md) to confirm the template to be deleted.  Deleting built-in templates also requires administrator rights.

## Request parameters

::::{div} mo-api-split
:::{div} mo-api-split-main

<dl class="mo-api-fields">

</dl>
:::
:::{div} mo-api-split-aside

<p class="mo-api-example-label">Request example</p>
```bash
curl -X DELETE "$CLOUDSIGMA_API_BASE/workflow-templates/$TEMPLATE_ID" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"
```

:::
::::

## Successful response

The template was removed when `code` was `OK` and `data.message` was `deleted` in the response. Deletion is irreversible.


The response fields are as follows.

::::{div} mo-api-split
:::{div} mo-api-split-main

<dl class="mo-api-fields">
  <div class="mo-api-field"><dt><code>code</code><span class="mo-api-field__type">string</span></dt><dd>OK when successful.</dd></div>
  <div class="mo-api-field"><dt><code>msg</code><span class="mo-api-field__type">string</span></dt><dd>OK when successful.</dd></div>
  <div class="mo-api-field"><dt><code>data.message</code><span class="mo-api-field__type">string</span></dt><dd>Fixed to deleted, indicating that the template has been deleted.</dd></div>
</dl>
:::
:::{div} mo-api-split-aside

<p class="mo-api-example-label">Successful response example</p>
```json
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "message": "deleted"
  }
}
```

:::
::::

## Error response

::::{div} mo-api-split
:::{div} mo-api-split-main

<dl class="mo-api-fields">
  <div class="mo-api-field"><dt><code>code</code><span class="mo-api-field__type">string</span></dt><dd>Error code.</dd></div>
  <div class="mo-api-field"><dt><code>msg</code><span class="mo-api-field__type">string</span></dt><dd>Readable error message.</dd></div>
  <div class="mo-api-field"><dt><code>data</code><span class="mo-api-field__type">null</span></dt><dd>`null` in an error response.</dd></div>
</dl>
:::
:::{div} mo-api-split-aside

<p class="mo-api-example-label">Error response example</p>
```json
{
  "code": "ErrSeedTemplateManaged",
  "msg": "系统管理的模板不允许修改",
  "data": null
}
```

:::
::::

## Follow-up operations

[Query workflow template list](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/data-processing/workflow-templates/list-workflow-templates.html.md) confirms that the template has been removed.
