Export PDF

You can export a design in PDF format using our REST Export API.

const fetch = require('node-fetch');

let url = 'https://api.unlayer.com/v2/export/pdf';

let options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Basic BASE64-ENCODED-API-KEY'},
  body: JSON.stringify({
    displayMode: 'email',
    design: {}, // json of your design
    mergeTags: {first_name: 'John', last_name: 'Doe'}

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));

Learn more at Export API documentation.


The API response will return an uploaded PDF URL.

  "success": true,
  "data": {
    "url": "https://.../1593082715347-8LCcNZuuBpU4D92W.pdf"

Did this page help you?