Skip to main content
POST
/
templates
/
{id}
/
publish
import { Emailr } from 'emailr';

const emailr = new Emailr('em_xxxxxxxxx');

const { data, error } = await emailr.templates.publish(
  '34a080c9-b17d-4187-ad80-5af20266e535',
);
{
  "id": "34a080c9-b17d-4187-ad80-5af20266e535",
  "object": "template"
}
POST https://api.emailr.dev/templates/{id}/publish

Path Parameters

id | alias
string
The ID or alias of the template to publish.
import { Emailr } from 'emailr';

const emailr = new Emailr('em_xxxxxxxxx');

const { data, error } = await emailr.templates.publish(
  '34a080c9-b17d-4187-ad80-5af20266e535',
);
{
  "id": "34a080c9-b17d-4187-ad80-5af20266e535",
  "object": "template"
}