Delete a template
Delete a template and all of its versions.
Deletes the template permanently — there is no undo. Sends that reference the deleted template id are rejected with 404 (template not found).
DELETE /v3/templates/{id}
Responses
| Status | Description |
|---|---|
200 | Deleted. { message: "Template deleted" }. |
401 | Missing or invalid API key. |
404 | No template with this id on your account. |
Code examples
cURL
curl -X DELETE https://api.wemail.io/v3/templates/{id} \
-H "Authorization: Bearer afn_live_…"Node.js
const res = await fetch("https://api.wemail.io/v3/templates/{id}", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.WEMAIL_API_KEY}`,
},
});
const data = await res.json();Python
import os, requests
r = requests.delete(
"https://api.wemail.io/v3/templates/{id}",
headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
)
data = r.json()