How can we help you?

Delete an email template

Product: FeraEmail Topic: API Versions: Applies to all documented versions Current

Audience: Application developers
Editorial status: Published — Source Validated
Product: FeraEmail
Classification: administrative

DELETE /api/v1/templates/{uuid}

Overview

Implements controller.destroy in routes/api/v1/template/routes.js:14. The authenticated owner boundary enforces view/edit permission and never returns SMTP passwords; templates and profiles are isolated by instance owner.

Deprecated compatibility paths

  • DELETE /api/templates/{uuid}

Use the versioned canonical path for new integrations.

Authentication and access

Security scheme: authToken

Control Contract
Authentication authenticated
Authorization The handler requires EDIT.TEMPLATE
Licensing If the instance header identifies a lifecycle-managed FeraEmail tenant, non-Active product state returns 403 before the router executes.
Instance Context The instance header scopes FeraAuth permission checks and owner-scoped SMTP configurations/templates; explicit owner fields are limited by the handler’s lookup rules.
Ownership Configuration and template persistence/lookups are owner-scoped; cross-owner UUID/name lookups do not return a resource.

Parameters

Name Location Type Required Description
uuid path string (uuid) Yes Stable owner-scoped configuration or template UUID selected by this route.

Request body

No request body.

Example request

cURL

curl --request DELETE \ \
  --url 'https://email.feradel.com/api/v1/templates/715c9ebb-0470-11f1-a928-0ed2cd1b87df' \
  --header 'x-auth-token: $FERA_AUTH_TOKEN'

Responses

200 The source-traced Email handler completed and returned its profile, template, send, lifecycle, or shared-owner result.

Content type: application/json; schema: EmailResult

{
    "success": true,
    "uuid": "715c9ebb-0470-11f1-a928-0ed2cd1b87df",
    "items": [],
    "data": {
        "uuid": "715c9ebb-0470-11f1-a928-0ed2cd1b87df",
        "parentUuid": "715c9ebb-0470-11f1-a928-0ed2cd1b87df"
    }
}

400 Validation, sender/recipient, template registration, fields JSON, or payload rules rejected the request.

Content type: application/json; schema: EmailError

{
    "success": false,
    "message": "The email operation could not be completed.",
    "error": {
        "stage": "validation"
    }
}

401 The x-auth-token or lifecycle HMAC is invalid.

Content type: application/json; schema: EmailError

{
    "success": false,
    "message": "The email operation could not be completed.",
    "error": {
        "stage": "validation"
    }
}

403 Send/view/edit, managed-product, owner, or lifecycle sender permission is missing.

Content type: application/json; schema: EmailError

{
    "success": false,
    "message": "The email operation could not be completed.",
    "error": {
        "stage": "validation"
    }
}

404 The owner-scoped configuration, template, or import source was not found.

Content type: application/json; schema: EmailError

{
    "success": false,
    "message": "The email operation could not be completed.",
    "error": {
        "stage": "validation"
    }
}

500 Persistence, template build, SMTP transport, lifecycle, or provisioning failed unexpectedly.

Content type: application/json; schema: EmailError

{
    "success": false,
    "message": "The email operation could not be completed.",
    "error": {
        "stage": "validation"
    }
}

Status and retry matrix

Status Condition Retryable Developer action
200 The source-traced Email handler completed and returned its profile, template, send, lifecycle, or shared-owner result. No Continue with the returned resource or SMTP acceptance result.
400 Validation, sender/recipient, template registration, fields JSON, or payload rules rejected the request. No Correct credential, owner, content, permission, state, or dependency before retrying.
401 The x-auth-token or lifecycle HMAC is invalid. No Correct credential, owner, content, permission, state, or dependency before retrying.
403 Send/view/edit, managed-product, owner, or lifecycle sender permission is missing. No Correct credential, owner, content, permission, state, or dependency before retrying.
404 The owner-scoped configuration, template, or import source was not found. No Correct credential, owner, content, permission, state, or dependency before retrying.
500 Persistence, template build, SMTP transport, lifecycle, or provisioning failed unexpectedly. Yes Correct credential, owner, content, permission, state, or dependency before retrying.

Related operations and events

  • Operation email_post_templates
  • Operation email_get_templates
  • Operation email_post_templatesRIUuid}
  • Operation email_get_templatesNNamedOOwnerFFields}
  • Operation email_get_templatesG
  • Operation email_get_templatesUuid}

Source trace

Repository: feradelinc/feradel.email.api
Branch: agent/catch-up-email-api
Commit: b4278c2d3ef83b95a6cd26c1fd6ec45a0adb99b5
Route: routes/api/v1/template/routes.js
Handler: controller.destroy
Contract: OpenAPI 3.1, source-traced and publication-validated.