# Delete template

{% delete /%}
{% path text="/v1/template/delete" /%}

Deletes a template from your account based on the template id you have provided. When the template is created on behalf of a particular sender email, then the delete operation can be performed on the same account by specifying the email in the `onBehalfOf`.

## Code snippet

{% codetab %}

cURL


```shell
curl -X 'DELETE' \
  'https://api.boldsign.com/v1/template/delete?templateId=1b18b34d-aaae-4df8-aa8f-a93cda34379a' \
  -H 'accept: */*' \
  -H 'X-API-KEY: {your API key}'
```

C#

```csharp
var apiClient = new ApiClient("https://api.boldsign.com", "Your_API_Key");

var templateClient = new TemplateClient(apiClient);

templateClient.DeleteTemplate("YOUR_TEMPLATE_ID");
```

Python

```python
import boldsign

configuration = boldsign.Configuration(host = "https://api.boldsign.com", api_key="YOUR_API_KEY")

with boldsign.ApiClient(configuration) as api_client:

    template_api = boldsign.TemplateApi(api_client)
    template_api.delete_template(template_id = "YOUR_TEMPLATE_ID")
```

PHP

```php
<?php require_once "vendor/autoload.php";

use BoldSign\Configuration;
use BoldSign\Api\TemplateApi;

$config = new Configuration();
$config->setHost('https://api.boldsign.com');
$config->setApiKey('YOUR_API_KEY');

$template_api = new TemplateApi($config); 
$template_api->deleteTemplate($template_id = 'YOUR_TEMPLATE_ID');
```

Java

```java
ApiClient client = Configuration.getDefaultApiClient();
client.setBasePath("https://api.boldsign.com");
client.setApiKey("YOUR_API_KEY");
        
TemplateApi templateApi = new TemplateApi(client);
templateApi.deleteTemplate("YOUR_TEMPLATE_ID", null);
```

NodeJS

```js
import { TemplateApi } from "boldsign";

const templateApi = new TemplateApi("https://api.boldsign.com");
templateApi.setApiKey("YOUR_API_KEY");

templateApi.deleteTemplate("YOUR_TEMPLATE_ID");
```

{% /codetab %}

## Query parameters

{% nestedtable %}

- {% arguments name="templateId" /%}{% batch datatype="string" /%}{% required /%}
- The ID of the template to delete.

---

- {% arguments name="onBehalfOf" /%}{% batch datatype="string" /%}
- The email address of the user that was used to create the template on their behalf.

{% /nestedtable %}

## Example response

***204 No Content***
