Create an email template (draft)
Create an email template (draft) with the Mailly email API for AI agents: POST /templates. Parameters, request body, responses and code samples.
POST
bearerAuthheader
AuthorizationBearer <token>Mailly API key(Authorization: Bearer )
application/json- body
templateKey?stringname?stringdefinition?unknownTemplate definition (from/subject/body/variables/emailType/topic, etc.)
[key: string]?unknownCreated
application/json- response
success*booleantemplate*[key: string]?unknowncurl -X POST 'https://api.mailly.site/templates' \ -H 'Content-Type: application/json' \ -d '{ "property1": null, "property2": null}'{ "success": true, "template": { "property1": null, "property2": null }, "property1": null, "property2": null}Archive a template POST
Archive a template with the Mailly email API for AI agents: POST /templates/{templateKey}/archive. Parameters, request body, responses and code samples.
Publish a new template version POST
Publish a new template version with the Mailly email API for AI agents: POST /templates/{templateKey}/publish. Parameters, request body, responses and code samples.