Skip to main content

Create a report template

Create a custom Smart Report template owned by the authenticated client. Only name is required; all branding, layout sections, reportTheme, sampleData, and PDF engine options are optional and can be updated later with Update a report template.

In headless and AI-driven pipelines, use this endpoint to persist layouts produced by Generate template layout, clone and brand a built-in starter from List theme starters, or provision environment-specific PDF templates for SmartBatch pipelines from code. Saving a template triggers asynchronous thumbnail generation and returns HTTP 200 (not 201) with the created document in { "data": ... }.

Endpoint​

POST https://api.verifik.co/v2/smart-report-templates

The Smart-Agent proxy (https://ai.verifik.co) exposes the same /v2/... paths and requires your own Authorization: Bearer <VERIFIK_JWT> header.

Headers​

NameValue
Content-Typeapplication/json
Acceptapplication/json
AuthorizationBearer <VERIFIK_JWT>

Body​

NameTypeRequiredDescription
namestringYesDisplay name for the template. Maximum 150 characters.
descriptionstringNoHuman-readable description of the template. Maximum 500 characters.
batchConfigurationstringNoObjectId of an associated SmartBatch configuration.
countrystringNoCountry identifier or label. Maximum 60 characters.
categorystringNoVerification domain: "citizen", "company", or "vehicle".
isActivebooleanNoWhether the template is active. Defaults to true.
logostringNoBrand logo URL or base64 data URI.
primaryColorstringNoPrimary brand accent hex color. Defaults to "#4F46E5".
identityColorstringNoSecondary/identity accent hex color. Defaults to "#000000".
pageBackgroundColorstringNoPage background hex color. Defaults to "#ffffff".
headerobjectNoCustom header layout and content configuration.
footerobjectNoCustom footer layout and content configuration.
legendstringNoFooter legend or compliance notice text. Maximum 2000 characters.
legendPositionstringNoLegend alignment: "left", "center", or "right".
termsAndConditionsstringNoLegal terms and conditions text. Maximum 4000 characters.
termsPositionstringNoTerms alignment: "left", "center", or "right".
sectionsobject[]NoOrdered array of ReportSection objects defining content blocks and data bindings (see ReportSection properties).
pageSizestringNoPDF paper size: "A4", "Letter", or "Legal". Defaults to "A4".
layoutVersionintegerNoLayout renderer version: 1 or 2.
orientationstringNoPage orientation: "portrait" or "landscape". Defaults to "portrait".
marginsobjectNoMargin object `{ "top": 40, "right": 40, "bottom": 40, "left": 40 }`. Defaults to 40 on all four sides.
pdfEnginestringNoPDF rendering engine: "puppeteer" or "pdfkit". Defaults to "puppeteer".
showPageNumbersbooleanNoShow page numbers on rendered PDFs.
pageNumberPositionstringNoPage number position: "top-left", "top-center", "top-right", "bottom-left", "bottom-center", or "bottom-right".
pageNumberDividerboolean / stringNoPage number divider configuration.
watermarkobjectNoWatermark overlay settings.
securityobjectNoPDF encryption settings `{ "enabled": true, "password": "..." }`.
signatureobjectNoSignature block configuration.
logoSettingsobjectNoLogo sizing and placement configuration.
sheetImagesobject[]NoEmbedded template image assets. Maximum 12 items.
customFontsobject[]NoCustom font declarations (Google Fonts, external URL, or uploaded file). Maximum 6 items.
headerLogosobject[]NoAdditional logos displayed in the header. Maximum 16 items.
bodyTopPaddingnumberNoTop padding applied to the document body, from 0 to 600.
sampleDataobjectNoSample verification payload (inputData, results, batchName, rowIndex) used as the fallback dataset for previews and sample downloads.
endpointDesignobjectNoEndpoint-specific presentation metadata.
reportThemestring / objectNoTheme preset ID ("premium_dark", "light_cards", "editorial", "dashboard") or full theme configuration object (see Theme configuration).

ReportSection properties​

Each element in sections describes one block in the report. Common properties include id, type, order, dataPath, label, staticContent, columns, columnsPerRow, keyOverrides, valueRules, chartKind, style, condition, and frame.

Supported type values include:

  • Core layout: header, text, table, field, image, divider, spacer, shape
  • Structured blocks: dataTable, card, badge, keyValueGrid, repeater, reportBlocks, themeBlock
  • Themed verification blocks: coverPage, scoreGauge, categoryBreakdown, checkTable, findings, sources, sourceCards

Theme configuration​

reportTheme accepts either a preset string ("premium_dark", "light_cards", "editorial", "dashboard") or an object containing:

{ id, scoreScale, scoreEnabled, scoreProfile, locale, density, eyebrow, coverTitle, headlines, legalNote, showVerifiedBadge, showWeights, showDeductions, showFields, showHowItWorks, blocks, tokens }

When migrating a payload tested on Preview template HTML, move top-level preview helpers (scoreScale, themeTokens, scoreSettings) into reportTheme (reportTheme.scoreScale, reportTheme.tokens, reportTheme.scoreEnabled, and reportTheme.scoreProfile) before saving.

Request​

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

async function run() {
const res = await fetch("https://api.verifik.co/v2/smart-report-templates", {
method: "POST",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
body: JSON.stringify({
name: "Colombia Driver Onboarding Report",
description: "Themed driver verification report for fleet onboarding",
country: "CO",
category: "citizen",
isActive: true,
pageSize: "A4",
layoutVersion: 2,
orientation: "portrait",
margins: { top: 40, right: 40, bottom: 40, left: 40 },
pdfEngine: "puppeteer",
primaryColor: "#4F46E5",
identityColor: "#111827",
pageBackgroundColor: "#ffffff",
showPageNumbers: true,
pageNumberPosition: "bottom-right",
reportTheme: {
id: "light_cards",
scoreEnabled: true,
scoreProfile: "cabify_driver",
scoreScale: "percent",
locale: "en",
showVerifiedBadge: true,
},
sections: [
{
id: "sec-header",
type: "header",
order: 0,
label: "Driver Verification Report",
},
{
id: "sec-score",
type: "scoreGauge",
order: 1,
label: "Verification Score",
},
{
id: "sec-subject",
type: "keyValueGrid",
order: 2,
label: "Subject Details",
dataPath: "inputData",
columnsPerRow: 2,
},
],
}),
});

console.log(await res.json());
}

run();

Response​

{
"data": {
"_id": "67c1f94b2d8a1c0012a4b301",
"client": "507f1f77bcf86cd799439013",
"name": "Colombia Driver Onboarding Report",
"description": "Themed driver verification report for fleet onboarding",
"country": "CO",
"category": "citizen",
"isActive": true,
"pageSize": "A4",
"layoutVersion": 2,
"orientation": "portrait",
"margins": {
"top": 40,
"right": 40,
"bottom": 40,
"left": 40
},
"pdfEngine": "puppeteer",
"primaryColor": "#4F46E5",
"identityColor": "#111827",
"pageBackgroundColor": "#ffffff",
"showPageNumbers": true,
"pageNumberPosition": "bottom-right",
"reportTheme": {
"id": "light_cards",
"scoreEnabled": true,
"scoreProfile": "cabify_driver",
"scoreScale": "percent",
"locale": "en",
"showVerifiedBadge": true
},
"sections": [
{
"id": "sec-header",
"type": "header",
"order": 0,
"label": "Driver Verification Report"
},
{
"id": "sec-score",
"type": "scoreGauge",
"order": 1,
"label": "Verification Score"
},
{
"id": "sec-subject",
"type": "keyValueGrid",
"order": 2,
"label": "Subject Details",
"dataPath": "inputData",
"columnsPerRow": 2
}
],
"createdAt": "2026-09-10T03:32:00.000Z",
"updatedAt": "2026-09-10T03:32:00.000Z"
}
}

Notes​

  • Successful creation returns HTTP 200 (not 201) and triggers asynchronous thumbnail generation in the background.
  • Top-level preview helpers (scoreScale, themeTokens, scoreSettings) used by Preview template HTML are not stored as top-level template fields. Place them inside reportTheme (scoreScale, tokens, scoreEnabled/scoreProfile) when persisting a template.
  • Save the returned _id to render sample PDFs, send stakeholder previews, or attach the template to automated SmartBatch jobs.