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 Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
subject
required
string
html
required
string
text_body
string
data
object
Examplegenerated
{ "subject": "example", "html": "example", "text_body": "example", "data": {}}Responses
Section titled “Responses”Rendered preview
Media typeapplication/json
object
subject
string
html
string
text
string
Examplegenerated
{ "subject": "example", "html": "example", "text": "example"}