MillionSend Docs

/templates

POST
/templates

Request Body

application/json
  1. body
name*string
Length1 <= length <= 200
subject?string

"" or null clears the subject

Lengthlength <= 998
html*string

Stored as sent; the dashboard sanitizes at render

Length1 <= length <= 500000
text?string

"" or null clears the text part

Lengthlength <= 500000
alias?string

Case-sensitive handle, unique per team; GET /templates/{alias} resolves it

Match^[A-Za-z0-9][A-Za-z0-9._-]*$
Length1 <= length <= 100
from?string

Not supported yet: any value is a 422

reply_to?|array<string>|

Not supported yet: any value is a 422

variables?array<unknown>

Not supported yet: a non-empty list is a 422

Response Body

Template created. Templates have no draft/publish cycle: every save is live, so status is always published.

application/json
  1. response
object*"template"
Value in"template"
id*string
Formatuuid
Example Request
curl -X POST 'https://api.millionsend.com/templates' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "html": "string"}'
Example Response
{  "object": "template",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"}