Promote Template
Copy a test template onto production. Requires a production API key.
If a production template with the same user_id already exists, its content is replaced. Otherwise a new production template is created. The test template is left in place so you can keep iterating.
This is the only way a production key can act on a test template. Get, update, delete, and send with a production key only resolve production templates.
POST
/templates/:template_id/promote
Example:
/templates/welcome/promote
Path Parameters
template_id
string
required
The test template TypeID or user_id.
Example
curl -X POST https://api.mailcast.io/v1/templates/:template_id/promote \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Response
200
{
"template_id": "template_01k3tgwp77en0s357he9s5kj1h",
"user_id": "welcome",
"name": "welcome",
"mjml": "<mjml><mj-body><mj-section><mj-column><mj-text>Hello {{name}}</mj-text></mj-column></mj-section></mj-body></mjml>",
"from": "hello@example.com",
"to": null,
"subject": "Welcome {{name}}",
"test_only": false,
"created_at": "2025-08-29T12:00:00Z",
"updated_at": "2025-08-29T13:30:00Z"
}