# Delete template

> DELETE /templates/:id — remove a template.

`DELETE /templates/:id`

Permanently deletes the template. Emails already sent are unaffected.

**Node.js**

```js
import { SendPing } from 'sendping';

const mb = new SendPing('mb_xxxxxxxxx');

const { data, error } = await mb.templates.remove('43f68331-0622-4e15-8202-246a0388854b');
console.log({ data, error });
```

**Ruby**

```ruby
require "sendping"

SendPing.api_key = "mb_xxxxxxxxx"

SendPing::Templates.delete("43f68331-0622-4e15-8202-246a0388854b")
```

**PHP**

```php
<?php
require 'vendor/autoload.php';

use SendPing\SendPing;

$sendping = SendPing::client('mb_xxxxxxxxx');

$sendping->templates->remove('43f68331-0622-4e15-8202-246a0388854b');
```

**Python**

```python
import sendping

sendping.api_key = "mb_xxxxxxxxx"

sendping.Templates.remove("43f68331-0622-4e15-8202-246a0388854b")
```

**Go**

```go
import "github.com/shekhu10/sendping-sdks/sendping-go"

client := sendping.NewClient("mb_xxxxxxxxx")

removed, err := client.Templates.Remove("43f68331-0622-4e15-8202-246a0388854b")
```

**Rust**

```rust
use sendping::SendPing;

let mb = SendPing::new("mb_xxxxxxxxx");

let _removed = mb.templates.remove("43f68331-0622-4e15-8202-246a0388854b").await?;
```

**Java**

```java
import co.sendping.SendPing;
import co.sendping.SendPingResponse;

SendPing sendping = new SendPing("mb_xxxxxxxxx");

SendPingResponse response = sendping.templates().remove("43f68331-0622-4e15-8202-246a0388854b");
```

**.NET**

```csharp
using SendPing;

ISendPing sendping = SendPingClient.Create("mb_xxxxxxxxx");

var resp = await sendping.TemplateDeleteAsync("43f68331-0622-4e15-8202-246a0388854b");
```

**cURL**

```bash
curl -X DELETE 'https://www.sendping.co/api/templates/43f68331-0622-4e15-8202-246a0388854b' \
  -H 'Authorization: Bearer mb_xxxxxxxxx'
```

**CLI**

```bash
sendping templates delete 43f68331-0622-4e15-8202-246a0388854b
```

### Response

```json
{ "object": "template", "id": "43f68331-0622-4e15-8202-246a0388854b", "deleted": true }
```

> **Note:** Returns `not_found` if no template with that id (or alias) belongs to you. See [Errors](https://www.sendping.co/docs/api/errors).
