The official Terraform provider lets you describe your email templates in code, keep them under version control, and ship changes through CI/CD instead of editing them by hand in the dashboard. The provider is published on the Terraform Registry as skymanrm/fmailer.
The provider authenticates with your account token, on Dashboard → Profile in the Using Terraform card. It is shown in full whenever you open that page, and Generate New Token replaces it — the old value stops working immediately. Pass it to the provider (typically via a variable or the FMAILER_TOKEN environment variable rather than hard-coding it).
Despite the name, this token is not Terraform-specific: it is the credential for the whole account API, sent as a bare Authorization: <token> header — see Authenticating API calls. It carries everything your login can do, so treat it as a password. It is not the same thing as a domain token, which authenticates one domain for sending and SMTP only.
terraform {
required_providers {
fmailer = {
source = "skymanrm/fmailer"
}
}
}
provider "fmailer" {
token = var.fmailer_token
} Each fmailer_template resource maps to one template. Reference the body from a file so the markup lives next to the rest of your code, and list the locales you support for localized sends.
resource "fmailer_template" "welcome" {
name = "welcome"
subject = "Welcome!"
locales = ["ru", "en"]
body = file("templates/welcome.html")
} Run terraform init once to download the provider, then terraform plan and terraform apply to push your templates to Postwing. Wire the same commands into your pipeline to deploy template changes automatically on merge.
terraform init && terraform apply