Mailly文档

Render a template preview

POST
/templates/{templateKey}/render

Authorization

bearerAuth
headerAuthorizationBearer <token>

Mailly API key(Authorization: Bearer )

Path Parameters

templateKey*string

template stable key

Request Body

application/json
  1. body
version?number

Published version number

draft?boolean

Render the draft (mutually exclusive with version)

locale?string
variables?
[key: string]?unknown

Response Body

Render result

application/json
  1. response
success*boolean
templateKey*string
version*number|string
rendered*
[key: string]?unknown
curl -X POST 'https://api.mailly.site/templates/string/render' \  -H 'Content-Type: application/json' \  -d '{  "property1": null,  "property2": null}'
{  "success": true,  "templateKey": "string",  "version": 0,  "rendered": {    "property1": null,    "property2": null  },  "property1": null,  "property2": null}