Preview an inline template
POST
/v1/templates/preview
const url = 'https://shareout.site/v1/templates/preview';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"subject":"example","html":"example","text_body":"example","data":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://shareout.site/v1/templates/preview \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "subject": "example", "html": "example", "text_body": "example", "data": {} }'Render an unsaved template with sample data.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
subject
required
string
html
required
string
text_body
string
data
object
Example generated
{ "subject": "example", "html": "example", "text_body": "example", "data": {}}Responses
Section titled “ Responses ”Rendered preview
Media type application/json
object
subject
string
html
string
text
string
Example generated
{ "subject": "example", "html": "example", "text": "example"}