curl -X DELETE 'https://api.weir.ai/mail/template/tpl_123456789' \
-H 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN'
{
"message": "Template deleted successfully",
"status": "success"
}
Delete an email template
curl -X DELETE 'https://api.weir.ai/mail/template/tpl_123456789' \
-H 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN'
{
"message": "Template deleted successfully",
"status": "success"
}
curl -X DELETE 'https://api.weir.ai/mail/template/tpl_123456789' \
-H 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN'
{
"message": "Template deleted successfully",
"status": "success"
}
const deleteMailTemplate = async (templateId, accessToken) => {
const response = await fetch(`https://api.weir.ai/mail/template/${templateId}`, {
method: 'DELETE',
headers: { 'Authorization': `Bearer ${accessToken}` }
});
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
return await response.json();
};
Was this page helpful?