---
updatedAt: 2026-05-26T14:23:39.000Z
agentTools:
  projectIndex: https://docs.getgreenspark.com/llms.txt
---

# Delete Template

Deprecated — redirects to v2. Use deleteTemplateV2.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/v1/email/templates/{templateId}": {
      "delete": {
        "deprecated": true,
        "description": "Deprecated — redirects to v2. Use deleteTemplateV2.",
        "operationId": "deleteTemplate",
        "parameters": [
          {
            "name": "templateId",
            "required": true,
            "in": "path",
            "description": "The id of the notification template.",
            "schema": {
              "example": "853b035dcd13c4ad66c6d618",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Template has been successfully deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationTemplateResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad request."
          },
          "401": {
            "description": "Provide your API key."
          },
          "403": {
            "description": "Please upgrade to a growth, premium or enterprise plan."
          },
          "404": {
            "description": "Not found."
          }
        },
        "security": [
          {
            "access-key": []
          }
        ],
        "summary": "Delete Template",
        "tags": [
          "Email"
        ]
      }
    }
  },
  "info": {
    "title": "Email",
    "description": "Manage custom email domains and notification templates. Use v2 routes; v1 routes are deprecated. Not exposed via ReadMe MCP v1 route toggles.\n\nAuthentication: `x-api-key` header (required). Create keys in the Greenspark dashboard after registration — separate key per environment.\n\nEnvironments: `https://api.getgreenspark.com` (production key) or `https://sandbox.getgreenspark.com` (sandbox key). Always match host and key.\n\nReadMe MCP (v1): `https://greenspark.readme.io/mcp` — read-only live calls on enabled GET routes. POST/PUT/DELETE are documented for integration building; use `get-endpoint` for schemas, not `execute-request` for writes.\n\nAPI keys: Accepts all standard API key types — individual routes may restrict allowed types.",
    "version": "v1",
    "contact": {}
  },
  "servers": [
    {
      "url": "https://api.getgreenspark.com",
      "description": "Production environment — use a production API key with this host."
    },
    {
      "url": "https://sandbox.getgreenspark.com",
      "description": "Sandbox environment — use a sandbox API key with this host."
    },
    {
      "url": "https://demo-api.getgreenspark.com",
      "description": "Demo environment — use a demo API key with this host."
    }
  ],
  "components": {
    "securitySchemes": {
      "access-key": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    },
    "schemas": {
      "TypeDto": {
        "type": "object",
        "properties": {
          "isScheduleCustom": {
            "type": "boolean",
            "description": "Boolean flag indicates customized schedule.",
            "example": "false"
          },
          "isTriggerCustom": {
            "type": "boolean",
            "description": "Boolean flag indicates customized trigger.",
            "example": "false"
          },
          "name": {
            "type": "string",
            "description": "Name of the template",
            "example": "Customer invitation template"
          },
          "schedule": {
            "description": "Sets how many days after an impact creation a signup nudging email is sent out to your customer.",
            "example": "[3, 7, 14]",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "template": {
            "type": "object",
            "description": "The type of the template.",
            "example": "invitation"
          },
          "trigger": {
            "description": "Choose the impact action which triggers your email to be sent out.",
            "example": "[\"offsetPerOrder\", \"offsetPerProduct\"]",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "isScheduleCustom",
          "isTriggerCustom",
          "name",
          "schedule",
          "template",
          "trigger"
        ]
      },
      "EmailDto": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "description": "The domain name used for sending emails based on this template.",
            "example": "get-greenspark.com"
          },
          "name": {
            "type": "string",
            "description": "The name part of the email address.",
            "example": "hello"
          }
        },
        "required": [
          "domain",
          "name"
        ]
      },
      "ScheduleDto": {
        "type": "object",
        "properties": {
          "endDate": {
            "format": "date-time",
            "type": "string",
            "description": "The end date of the scheduled email sending.",
            "example": "2023-03-08T13:26:33.969Z"
          },
          "isEndDateCustom": {
            "type": "boolean",
            "description": "Boolean flag indicates customized schedule end date.",
            "example": "false"
          },
          "startDate": {
            "format": "date-time",
            "type": "string",
            "description": "The start date of the scheduled email sending.",
            "example": "2023-02-08T13:26:33.969Z"
          }
        },
        "required": [
          "endDate",
          "isEndDateCustom",
          "startDate"
        ]
      },
      "SettingsDto": {
        "type": "object",
        "properties": {
          "alias": {
            "type": "string",
            "description": "This is the name display for the specified sender email address.",
            "example": "Greenspark"
          },
          "from": {
            "description": "The email address used for sending emails.",
            "allOf": [
              {
                "$ref": "#/components/schemas/EmailDto"
              }
            ]
          },
          "isAliasCustom": {
            "type": "boolean",
            "description": "Boolean flag indicates customized alias.",
            "example": "false"
          },
          "isPreheaderCustom": {
            "type": "boolean",
            "description": "Boolean flag indicates customized preheader.",
            "example": "false"
          },
          "isSubjectCustom": {
            "type": "boolean",
            "description": "Boolean flag indicates customized subject.",
            "example": "false"
          },
          "preheader": {
            "type": "string",
            "description": "The preheader is the text following the subject line when an email is previewed.",
            "example": "Activate your Greenspark dashboard & grow your impact today."
          },
          "schedule": {
            "description": "You can choose to send your template continuously starting at the selected start date or only during a specific date range.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ScheduleDto"
              }
            ]
          },
          "subject": {
            "type": "string",
            "description": "Your subject line is one of the first things that your customers read and is a key driver in successful open rates.",
            "example": "Your {{type}} with {{sellerName}} {{impactsTextPast}}. Track your impact here."
          }
        },
        "required": [
          "alias",
          "from",
          "isAliasCustom",
          "isPreheaderCustom",
          "isSubjectCustom",
          "preheader",
          "schedule",
          "subject"
        ]
      },
      "ContentDto": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "description": "Use our pre-defined email body or customise it to fit your brand. Add dynamic data by using the variables provided.",
            "example": "Thanks so much for your order!"
          },
          "headerImage": {
            "type": "string",
            "description": "Add your own logo to the top of the email or use our pre-defined header image. If you use your own header image please ensure it is maximum 1370 x 700, or has a 2:1 aspect ratio.",
            "example": "http://res.cloudinary.com/dlilerh6s/image/upload/v1670515295/templates/abgf9boicpxujispedpy.png"
          },
          "isBodyCustom": {
            "type": "boolean",
            "description": "Boolean flag indicates customized body.",
            "example": "false"
          },
          "isFooterHidden": {
            "type": "boolean",
            "description": "Hide our email footer explaining the benefits of Greenspark.",
            "example": "false"
          },
          "isFooterHiddenCustom": {
            "type": "boolean",
            "description": "Boolean flag indicates customized hidden footer setting.",
            "example": "false"
          },
          "isHeaderImageCustom": {
            "type": "boolean",
            "description": "Boolean flag indicates customized header image.",
            "example": "false"
          },
          "isTotalImpactHidden": {
            "type": "boolean",
            "description": "Hide your total impact so far within your emails.",
            "example": "false"
          },
          "isTotalImpactHiddenCustom": {
            "type": "boolean",
            "description": "Boolean flag indicates customized hidden total impact setting.",
            "example": "false"
          }
        },
        "required": [
          "body",
          "headerImage",
          "isBodyCustom",
          "isFooterHidden",
          "isFooterHiddenCustom",
          "isHeaderImageCustom",
          "isTotalImpactHidden",
          "isTotalImpactHiddenCustom"
        ]
      },
      "NotificationTemplateResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The id of the template.",
            "example": "63e3a30d093df17fa11c1fbe"
          },
          "isCustom": {
            "type": "boolean",
            "description": "Boolean flag indicates customized template.",
            "example": "false"
          },
          "type": {
            "$ref": "#/components/schemas/TypeDto"
          },
          "settings": {
            "$ref": "#/components/schemas/SettingsDto"
          },
          "content": {
            "$ref": "#/components/schemas/ContentDto"
          }
        },
        "required": [
          "id",
          "isCustom",
          "type",
          "settings",
          "content"
        ]
      }
    }
  }
}
```