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

const resend = new Resend('re_xxxxxxxxx');

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

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

resend.api_key = "re_xxxxxxxxx"

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

Resend.api_key = "re_xxxxxxxxx"

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

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

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

	client.Templates.DuplicateWithContext(
		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 _duplicated = resend
    .templates
    .duplicate("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");

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

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

await resend.TemplateDuplicateAsync( new Guid( "34a080c9-b17d-4187-ad80-5af20266e535" ) );
curl -X POST 'https://api.resend.com/templates/34a080c9-b17d-4187-ad80-5af20266e535/duplicate' \
     -H 'Authorization: Bearer re_xxxxxxxxx' \
     -H 'Content-Type: application/json'
resend templates duplicate 34a080c9-b17d-4187-ad80-5af20266e535
{
  "object": "template",
  "id": "e169aa45-1ecf-4183-9955-b1499d5701d3"
}

Path Parameters

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

const resend = new Resend('re_xxxxxxxxx');

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

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

resend.api_key = "re_xxxxxxxxx"

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

Resend.api_key = "re_xxxxxxxxx"

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

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

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

	client.Templates.DuplicateWithContext(
		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 _duplicated = resend
    .templates
    .duplicate("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");

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

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

await resend.TemplateDuplicateAsync( new Guid( "34a080c9-b17d-4187-ad80-5af20266e535" ) );
curl -X POST 'https://api.resend.com/templates/34a080c9-b17d-4187-ad80-5af20266e535/duplicate' \
     -H 'Authorization: Bearer re_xxxxxxxxx' \
     -H 'Content-Type: application/json'
resend templates duplicate 34a080c9-b17d-4187-ad80-5af20266e535
{
  "object": "template",
  "id": "e169aa45-1ecf-4183-9955-b1499d5701d3"
}