Publish Template
Publish a template. Publishing generates a new version, marks the template as published, and sets has_unpublished_versions to false.
POST
/templates/{template_id}/publishRequires a full_access API key.
Path Parameters
template_idstringrequiredThe template ID (UUID) or alias string.
Response Fields
idstringThe template ID.
objectstringAlways "template".
curl -X POST 'https://api.postflare.app/templates/e5f6a7b8-c9d0-1234-efab-345678901234/publish' \
-H 'Authorization: Bearer re_xxxxxxxxx'const response = await fetch(
'https://api.postflare.app/templates/welcome-email/publish',
{
method: 'POST',
headers: {
'Authorization': 'Bearer re_xxxxxxxxx',
},
}
);
const data = await response.json();Response
{
"id": "e5f6a7b8-c9d0-1234-efab-345678901234",
"object": "template"
}