import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.templates.publish(
'34a080c9-b17d-4187-ad80-5af20266e535',
);
$resend = Resend::client('re_xxxxxxxxx');
$resend->templates->publish('34a080c9-b17d-4187-ad80-5af20266e535');
import resend
resend.api_key = "re_xxxxxxxxx"
resend.Templates.publish("34a080c9-b17d-4187-ad80-5af20266e535")
require "resend"
Resend.api_key = "re_xxxxxxxxx"
Resend::Templates.publish("34a080c9-b17d-4187-ad80-5af20266e535")
import (
"context"
"github.com/resend/resend-go/v3"
)
func main() {
client := resend.NewClient("re_xxxxxxxxx")
client.Templates.PublishWithContext(
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 _published = resend
.templates
.publish("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");
PublishTemplateResponseSuccess data = resend.templates().publish("34a080c9-b17d-4187-ad80-5af20266e535");
}
}
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
await resend.TemplatePublishAsync( new Guid( "34a080c9-b17d-4187-ad80-5af20266e535" ) );
curl -X POST 'https://api.resend.com/templates/34a080c9-b17d-4187-ad80-5af20266e535/publish' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json'
resend templates publish 34a080c9-b17d-4187-ad80-5af20266e535
{
"id": "34a080c9-b17d-4187-ad80-5af20266e535",
"object": "template"
}
Publish Template
Publish a template.
POST
/
templates
/
:template_id
/
publish
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.templates.publish(
'34a080c9-b17d-4187-ad80-5af20266e535',
);
$resend = Resend::client('re_xxxxxxxxx');
$resend->templates->publish('34a080c9-b17d-4187-ad80-5af20266e535');
import resend
resend.api_key = "re_xxxxxxxxx"
resend.Templates.publish("34a080c9-b17d-4187-ad80-5af20266e535")
require "resend"
Resend.api_key = "re_xxxxxxxxx"
Resend::Templates.publish("34a080c9-b17d-4187-ad80-5af20266e535")
import (
"context"
"github.com/resend/resend-go/v3"
)
func main() {
client := resend.NewClient("re_xxxxxxxxx")
client.Templates.PublishWithContext(
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 _published = resend
.templates
.publish("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");
PublishTemplateResponseSuccess data = resend.templates().publish("34a080c9-b17d-4187-ad80-5af20266e535");
}
}
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
await resend.TemplatePublishAsync( new Guid( "34a080c9-b17d-4187-ad80-5af20266e535" ) );
curl -X POST 'https://api.resend.com/templates/34a080c9-b17d-4187-ad80-5af20266e535/publish' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json'
resend templates publish 34a080c9-b17d-4187-ad80-5af20266e535
{
"id": "34a080c9-b17d-4187-ad80-5af20266e535",
"object": "template"
}
Path Parameters
The ID or alias of the template to publish.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.templates.publish(
'34a080c9-b17d-4187-ad80-5af20266e535',
);
$resend = Resend::client('re_xxxxxxxxx');
$resend->templates->publish('34a080c9-b17d-4187-ad80-5af20266e535');
import resend
resend.api_key = "re_xxxxxxxxx"
resend.Templates.publish("34a080c9-b17d-4187-ad80-5af20266e535")
require "resend"
Resend.api_key = "re_xxxxxxxxx"
Resend::Templates.publish("34a080c9-b17d-4187-ad80-5af20266e535")
import (
"context"
"github.com/resend/resend-go/v3"
)
func main() {
client := resend.NewClient("re_xxxxxxxxx")
client.Templates.PublishWithContext(
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 _published = resend
.templates
.publish("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");
PublishTemplateResponseSuccess data = resend.templates().publish("34a080c9-b17d-4187-ad80-5af20266e535");
}
}
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
await resend.TemplatePublishAsync( new Guid( "34a080c9-b17d-4187-ad80-5af20266e535" ) );
curl -X POST 'https://api.resend.com/templates/34a080c9-b17d-4187-ad80-5af20266e535/publish' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json'
resend templates publish 34a080c9-b17d-4187-ad80-5af20266e535
{
"id": "34a080c9-b17d-4187-ad80-5af20266e535",
"object": "template"
}
Was this page helpful?
⌘I