API Reference

Delete template

DELETE /templates/:id — remove a template.

DELETE/templates/:id

Permanently deletes the template. Emails already sent are unaffected.

import { Mailblastr } from 'mailblastr';

const mb = new Mailblastr('mb_xxxxxxxxx');

const { data, error } = await mb.templates.remove('43f68331-0622-4e15-8202-246a0388854b');
console.log({ data, error });

Response

{ "object": "template", "id": "43f68331-0622-4e15-8202-246a0388854b", "deleted": true }
Returns not_found if no template with that id (or alias) belongs to you. See Errors.