For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterAPI KeysStatusSign In
GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelog
  • Introduction
    • Getting started
  • Email API
      • GETGet the list of email templates
      • DELDelete an inactive email template
      • POSTSend a template to your test list
      • POSTGenerate the rendered preview of transactional template
      • PUTUpdate an email template
      • GETReturns the template information
      • POSTCreate an email template
  • Transactional SMS
  • Transactional WhatsApp
  • Marketing Campaigns
  • Contact Management
  • Events
    • GETGet events
    • POSTCreate an event
    • POSTCreate events in batch
  • Object Management
  • Accounts and Settings
  • Sales CRM
  • Conversations
  • Ecommerce
  • Loyalty
LogoLogo
Help CenterAPI KeysStatusSign In
Email APIEmail templates

Delete an inactive email template

DELETE
https://api.brevo.com/v3/smtp/templates/:templateId
DELETE
/v3/smtp/templates/:templateId
1import { BrevoClient } from "@getbrevo/brevo";
2
3async function main() {
4 const client = new BrevoClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.transactionalEmails.deleteSmtpTemplate(1);
8}
9main();
Permanently delete a transactional email template by its numeric ID. Only inactive templates can be deleted; attempting to delete an active template returns a 405 error. To deactivate a template before deletion, use `PUT /smtp/templates/{templateId}` with `isActive` set to `false`. Deletion also removes associated newsletter template data and triggers asynchronous cleanup of shared assets.
Was this page helpful?
Previous

Send a template to your test list

Next
Built with

Permanently delete a transactional email template by its numeric ID. Only inactive templates can be deleted; attempting to delete an active template returns a 405 error. To deactivate a template before deletion, use PUT /smtp/templates/{templateId} with isActive set to false. Deletion also removes associated newsletter template data and triggers asynchronous cleanup of shared assets.

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Path parameters

templateIdlongRequired
id of the template

Response

Inactive transactional email template has been deleted

Errors

400
Bad Request Error
404
Not Found Error