documents

Generate PDF document.

Generate PDF document from JSON design, HTML content, or URL.

post/documents/v1/generate

Request body

designobject required

Proprietary design format JSON

htmlstring

HTML content to convert to PDF

urlstring uri

URL to convert to PDF

mergeTagsobject

Optional merge tags for personalization

filenamestring

Optional filename for the generated PDF

Example request

{
  "design": {
    "counters": {
      "u_row": 1,
      "u_column": 1,
      "u_content_text": 1
    },
    "body": {
      "rows": [
        {
          "cells": [
            1
          ],
          "columns": [
            {
              "contents": [
                {
                  "type": "text",
                  "values": {
                    "text": "Hello World"
                  }
                }
              ]
            }
          ]
        }
      ]
    }
  }
}

Response

Default Response

documentIdstring

Unique document identifier

pdfUrlstring uri

URL to download the generated PDF

status'generating' | 'completed' | 'failed'
filenamestring

Generated filename

Changes