sendsend.email

Duplicate a template

POST/v1/templates/{id}/duplicate

Copies a version (the latest unless you name one) into a new template, at version 1.

Required scope: templates:manage

Parameters

NameInDescription
idrequiredpathThe template id.

Request body

FieldType
idrequiredstring
nameoptionalstring
versionoptionalinteger

Unknown fields are rejected, so a typo never silently does nothing.

Example

curl -X POST 'https://api.sendsend.email/v1/templates/ID/duplicate' \
  -H "Authorization: Bearer $SENDSEND_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "id": "welcome-copy"
}'

Response 201

{
  "object": "template",
  "id": "welcome-copy",
  "version": 1
}

Errors

StatusCodeWhen
400validation_errorThe request body or parameters are invalid. The message says which field.
404not_foundNo such resource in this project.
401unauthorizedThe API key is missing, invalid or revoked.
403forbiddenThe key does not have the scope this endpoint needs.

Every error has the same shape. See Errors.