Render an email
The email as a recipient would get it in one locale, as `templates.render` draws a template, with its subject and preview text filled in, and what sending it would be refused for there (a subject missing among them).
The email as a recipient would get it in one locale, as templates.render draws a template, with its subject and preview text filled in, and what sending it would be refused for there (a subject missing among them).
apiKey readAuthorizationBearer <token>A workspace API key (pf_…), created under Developers → API keys.
Scope: read
id*string^(email)_[0-9A-Za-z]{8}$idempotency-key?stringRun this write once: a retry with the same key gets the first answer (24 hours).
1 <= length <= 255application/json- body
versionId?stringuuidlocale*stringprofileId?stringuuideventId?stringuuidOK
application/json- response
versionId*stringuuidlocale*stringhtml*stringtext*stringsizeBytes*integerissues*array<>context*warnings*array<>subject*stringpreheader*stringcurl -X POST 'https://api.postforge.dev/v1/emails/string/render' \ -H 'Content-Type: application/json' \ -d '{ "locale": "string"}'{ "versionId": "14707576-2549-4848-82ed-f68f8a1b47c7", "locale": "string", "html": "string", "text": "string", "sizeBytes": 0, "issues": [ { "path": "string", "message": "string" } ], "context": { "profile": { "property1": null, "property2": null }, "store": { "property1": null, "property2": null }, "event": { "property1": null, "property2": null } }, "warnings": [ { "code": "near_gmail_clipping", "message": "string" } ], "subject": "string", "preheader": "string"}Get what an email is drawn with GET
As for a template: the published brand kit, where its files are, the published components it uses and the workspace’s custom fields.
Send a test of an email POST
Sends the email as it is now, in one locale, to up to 5 addresses from one of the workspace’s senders, filled in like the preview. The subject is its own, after “[Test]”. Refused before anything is sent when it has gaps in the locale (a subject among them) or the sender can’t send; consent isn’t asked for a test.