Skip to main content
DELETE
/
templates
/
:template_id
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.templates.remove(
  '34a080c9-b17d-4187-ad80-5af20266e535',
);
$resend = Resend::client('re_xxxxxxxxx');

$resend->templates->remove('34a080c9-b17d-4187-ad80-5af20266e535');
import resend

resend.api_key = "re_xxxxxxxxx"

resend.Templates.remove("34a080c9-b17d-4187-ad80-5af20266e535")
require "resend"

Resend.api_key = "re_xxxxxxxxx"

Resend::Templates.remove("34a080c9-b17d-4187-ad80-5af20266e535")
import (
	"context"

	"github.com/resend/resend-go/v3"
)

func main() {
	client := resend.NewClient("re_xxxxxxxxx")

	client.Templates.RemoveWithContext(
		context.TODO(),
		"34a080c9-b17d-4187-ad80-5af20266e535",
	)
}
use resend_rs::{Resend, Result};

#[tokio::main]
async fn main() -> Result<()> {
  let resend = Resend::new("re_xxxxxxxxx");

  let _deleted = resend
    .templates
    .delete("34a080c9-b17d-4187-ad80-5af20266e535")
    .await?;

  Ok(())
}
import com.resend.*;

public class Main {
    public static void main(String[] args) {
        Resend resend = new Resend("re_xxxxxxxxx");

        DeleteTemplateResponseSuccess data = resend.templates().remove("34a080c9-b17d-4187-ad80-5af20266e535");
    }
}
using Resend;

IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI

await resend.TemplateDeleteAsync( new Guid( "34a080c9-b17d-4187-ad80-5af20266e535" ) );
curl -X DELETE 'https://api.resend.com/templates/34a080c9-b17d-4187-ad80-5af20266e535' \
     -H 'Authorization: Bearer re_xxxxxxxxx' \
     -H 'Content-Type: application/json'
resend templates delete 34a080c9-b17d-4187-ad80-5af20266e535
{
  "object": "template",
  "id": "34a080c9-b17d-4187-ad80-5af20266e535",
  "deleted": true
}

Path Parameters

id | alias
string
The ID or alias of the template to delete.
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.templates.remove(
  '34a080c9-b17d-4187-ad80-5af20266e535',
);
$resend = Resend::client('re_xxxxxxxxx');

$resend->templates->remove('34a080c9-b17d-4187-ad80-5af20266e535');
import resend

resend.api_key = "re_xxxxxxxxx"

resend.Templates.remove("34a080c9-b17d-4187-ad80-5af20266e535")
require "resend"

Resend.api_key = "re_xxxxxxxxx"

Resend::Templates.remove("34a080c9-b17d-4187-ad80-5af20266e535")
import (
	"context"

	"github.com/resend/resend-go/v3"
)

func main() {
	client := resend.NewClient("re_xxxxxxxxx")

	client.Templates.RemoveWithContext(
		context.TODO(),
		"34a080c9-b17d-4187-ad80-5af20266e535",
	)
}
use resend_rs::{Resend, Result};

#[tokio::main]
async fn main() -> Result<()> {
  let resend = Resend::new("re_xxxxxxxxx");

  let _deleted = resend
    .templates
    .delete("34a080c9-b17d-4187-ad80-5af20266e535")
    .await?;

  Ok(())
}
import com.resend.*;

public class Main {
    public static void main(String[] args) {
        Resend resend = new Resend("re_xxxxxxxxx");

        DeleteTemplateResponseSuccess data = resend.templates().remove("34a080c9-b17d-4187-ad80-5af20266e535");
    }
}
using Resend;

IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI

await resend.TemplateDeleteAsync( new Guid( "34a080c9-b17d-4187-ad80-5af20266e535" ) );
curl -X DELETE 'https://api.resend.com/templates/34a080c9-b17d-4187-ad80-5af20266e535' \
     -H 'Authorization: Bearer re_xxxxxxxxx' \
     -H 'Content-Type: application/json'
resend templates delete 34a080c9-b17d-4187-ad80-5af20266e535
{
  "object": "template",
  "id": "34a080c9-b17d-4187-ad80-5af20266e535",
  "deleted": true
}