pentacent / keila

Open Source Newsletter Tool.
https://keila.io
GNU Affero General Public License v3.0
1.45k stars 81 forks source link

Rendering and sending a template trough API #349

Open viglu opened 1 week ago

viglu commented 1 week ago

It would be nice to render a template trough a API like [POST] /api/v1/templates/render/{id} or [POST] /api/v1/templates/sent/{id}

Both APIs will have the same input. It will retrieve contact data by id, will replace the tags in the email with contact data and will replace the tags with data. { "contact": { "id": "xxxxx" } "data": { "custom_attribute": "yyyyy"
} }

The render API with only render the HTML and is returned. The sent API will render the Email and will sent it out to the contact.