# Delete Template Delete a template, or a specific template version. {% method %} ### HTTP Request `DELETE https://sync.api.docspring.com/api/v1/templates/` Or: `DELETE https://api.docspring.com/api/v1/templates/?version=1.2.3` ### Parameters The following query parameters are supported: - `version` _(string)_: The template version to delete. If not provided, the entire template will be deleted (including the draft and all published versions.) ### Authentication You must send an `Authorization` header with the value `Basic` followed by base 64 encoded `token_id:token_secret`. For example: `Authorization: Basic dG9rZW5faWQ6dG9rZW5fc2VjcmV0Cg==` > See the [Authentication](authentication.md) documentation for more information. ### Example Code {% sample lang="javascript" -%} ```javascript var DocSpring = require('docspring') var config = new DocSpring.Configuration() config.apiTokenId = 'DOCSPRING_TOKEN_ID' config.apiTokenSecret = 'DOCSPRING_TOKEN_SECRET' client = new DocSpring.Client(config) client.deleteTemplate('YOUR_TEMPLATE_ID', function (error, template) { if (error) throw error console.log(template) }) ``` {% sample lang="csharp" -%} ```csharp using System; using System.Diagnostics; using DocSpring.Client.Api; using DocSpring.Client.Client; using DocSpring.Client.Model; namespace Example { public class DocSpringExample { public void main() { Configuration.Default.Username = "DOCSPRING_TOKEN_ID"; Configuration.Default.Password = "DOCSPRING_TOKEN_SECRET"; var apiInstance = new PDFApi(); string templateId = "tpl_1234567890abcdef01"; var template = apiInstance.DeleteTemplate(templateId); Debug.WriteLine(template); } } } ``` {% endmethod %}