Update an existing email template’s content, subject, or settings using the AutoSend API.
curl --request PUT \
--url https://api.autosend.com/v1/templates/A-abc123def456ghi789jk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"templateName": "Updated Welcome Email",
"subject": "Welcome aboard, {{firstName}}!",
"emailTemplate": "<h1>Hey {{firstName}}!</h1><p>We are excited to have you at {{companyName}}.</p>",
"previewText": "Your journey starts here"
}'
{
"success": true,
"data": {
"templateId": "A-abc123def456ghi789jk",
"templateName": "Updated Welcome Email",
"description": "Welcome email for new users",
"subject": "Welcome aboard, {{firstName}}!",
"previewText": "Your journey starts here",
"emailTemplate": "<h1>Hey {{firstName}}!</h1><p>We are excited to have you at {{companyName}}.</p>",
"templateType": "transactional",
"builderType": "code",
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-03-17T14:45:00.000Z"
}
}
curl --request PUT \
--url https://api.autosend.com/v1/templates/A-abc123def456ghi789jk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"templateName": "Updated Welcome Email",
"subject": "Welcome aboard, {{firstName}}!",
"emailTemplate": "<h1>Hey {{firstName}}!</h1><p>We are excited to have you at {{companyName}}.</p>",
"previewText": "Your journey starts here"
}'
{
"success": true,
"data": {
"templateId": "A-abc123def456ghi789jk",
"templateName": "Updated Welcome Email",
"description": "Welcome email for new users",
"subject": "Welcome aboard, {{firstName}}!",
"previewText": "Your journey starts here",
"emailTemplate": "<h1>Hey {{firstName}}!</h1><p>We are excited to have you at {{companyName}}.</p>",
"templateType": "transactional",
"builderType": "code",
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-03-17T14:45:00.000Z"
}
}
<token>, where <token> is your auth token."A-abc123def456ghi789jk"90Example: "Updated Welcome Email"988Example: "Welcome aboard, {{firstName}}!"140Example: "Updated welcome email for new users"140Example: "Your journey starts here"<h1>Hey {{firstName}}!</h1>
<p>We are excited to have you at {{companyName}}.</p>
transactional, marketingExample: "transactional"{
"firstName": "string",
"companyName": "string"
}
"60d5ec49f1b2c72d9c8b4567"trueShow child attributes
"A-abc123def456ghi789jk""Updated Welcome Email""Welcome email for new users""Welcome aboard, {{firstName}}!""Your journey starts here""transactional""code""2026-01-15T10:30:00.000Z""2026-03-17T14:45:00.000Z"curl --request PUT \
--url https://api.autosend.com/v1/templates/A-abc123def456ghi789jk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"templateName": "Updated Welcome Email",
"subject": "Welcome aboard, {{firstName}}!",
"emailTemplate": "<h1>Hey {{firstName}}!</h1><p>We are excited to have you at {{companyName}}.</p>",
"previewText": "Your journey starts here"
}'
{
"success": true,
"data": {
"templateId": "A-abc123def456ghi789jk",
"templateName": "Updated Welcome Email",
"description": "Welcome email for new users",
"subject": "Welcome aboard, {{firstName}}!",
"previewText": "Your journey starts here",
"emailTemplate": "<h1>Hey {{firstName}}!</h1><p>We are excited to have you at {{companyName}}.</p>",
"templateType": "transactional",
"builderType": "code",
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-03-17T14:45:00.000Z"
}
}