> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

---
id: b69bda29-7f77-43f5-b774-b165c679a9b4
---

# Delete Selected Template

> Marks the selected Template as deleted. The Template can be restored later via a POST to the restore-deleted endpoint.

export const ScopesList = ({scopes = [], description = "This API requires one of the following scopes:"}) => {
  if (!scopes || scopes.length === 0) {
    return null;
  }
  const sortedScopes = scopes.sort((a, b) => a.localeCompare(b));
  return <div>
      <div className="text-sm mb-2">{description}</div>
      <div>
        {sortedScopes.map((scope, index) => <div key={index}>
            <code>
              <span className="text-xs">{scope}</span>
            </code>
          </div>)}
      </div>
    </div>;
};

<Accordion title="Scope requirements">
  <ScopesList scopes={['content']} />
</Accordion>


## OpenAPI

````yaml specs/legacy/v2/templates-v2.json DELETE /content/api/v2/templates/{template_id}
openapi: 3.0.1
info:
  title: Templates API
  description: Use the templates API to create and manage CMS templates.
  version: v2
servers:
  - url: https://api.hubapi.com
security: []
tags:
  - name: Templates
paths:
  /content/api/v2/templates/{template_id}:
    delete:
      tags:
        - Templates
      summary: Delete Selected Template
      description: >-
        Marks the selected Template as deleted. The Template can be restored
        later via a POST to the restore-deleted endpoint.
      operationId: deleteTemplate
      parameters:
        - name: template_id
          in: path
          required: true
          description: Unique identifier for the template.
          schema:
            type: string
      responses:
        '204':
          description: Template deleted successfully

````