Template API

Get the public Template Contract

Returns the current Template Contract. It covers supported fields, defaults, rendering guidance, limits, errors, and the recommended workflow for creating and publishing templates. Use it for PDFBolt-specific template rules and this OpenAPI document for exact request and response schemas. No authentication is required.

get/v1/templates/contract

Request

  • Base URL: https://api.pdfbolt.com
  • URL: https://api.pdfbolt.com/v1/templates/contract
  • Auth: none required

Response

Template Contract returned successfully.

contractVersionstring required

Version identifier for the returned Template Contract.

languagestring required

Language code used for the contract's human-readable guidance.

endpointBasestring required

Base path for the Template API endpoints described by the contract.

recommendedWorkflowstring[] required

Recommended programmatic workflow for creating or editing templates.

hintsstring[] required

Additional implementation guidance for Template API clients.

Example response

{
  "contractVersion": "2026-09-21",
  "language": "en",
  "endpointBase": "/v1/templates",
  "resources": {
    "openApiUrl": "https://pdfbolt.com/openapi.yaml",
    "apiReferenceUrl": "https://pdfbolt.com/docs/api-reference",
    "templateApiDocsUrl": "https://pdfbolt.com/docs/api-endpoints/template-api",
    "templateGuideUrl": "https://pdfbolt.com/docs/pdf-templates",
    "conversionParametersDocsUrl": "https://pdfbolt.com/docs/parameters",
    "rateLimitsDocsUrl": "https://pdfbolt.com/docs/rate-limits"
  },
  "dashboardLinks": {
    "templateDesignerUrlPattern": "https://app.pdfbolt.com/templates/edit/{templateId}"
  },
  "authentication": {
    "publicEndpoints": [
      "/v1/templates/contract"
    ]
  },
  "templatePayload": {
    "fields": [
      {
        "name": "templateId",
        "type": "string",
        "required": false,
        "allowedValues": [],
        "description": "Existing template UUID used only by POST /v1/templates/drafts. Omit this field to create a new template, or provide a UUID to update an existing template. Do not send null."
      },
      {
        "name": "name",
        "type": "string",
        "required": false,
        "allowedValues": [],
        "description": "Human-readable template name. Required when creating a template. When updating a draft, omit it to preserve the current name or provide a non-blank string; null is invalid."
      },
      {
        "name": "description",
        "type": "string",
        "required": false,
        "allowedValues": [],
        "description": "Short internal description. When creating a template, an omitted or null description is stored as an empty string. When updating a draft, omit it to preserve the current description, send an empty string to clear it, or provide a string; null is invalid."
      },
      {
        "name": "templateEngine",
        "type": "string",
        "required": false,
        "allowedValues": [
          "HANDLEBARS"
        ],
        "description": "Template engine used to evaluate content with sample data. Required for validate, preview and new draft creation. For diff or an existing draft update, omit it to reuse the current engine; null is invalid when saving a draft."
      },
      {
        "name": "content",
        "type": "string",
        "required": false,
        "allowedValues": [],
        "description": "Base64-encoded complete HTML document with CSS. Required for validate, preview, diff and new draft creation. For an existing draft update, omit it to preserve the current document or provide a value to replace the complete document; null is invalid."
      },
      {
        "name": "sampleData",
        "type": "object",
        "required": false,
        "allowedValues": [],
        "description": "JSON object used to evaluate the Handlebars template. Required for validate, preview, diff and new draft creation. For an existing draft update, omit it to preserve the current object, provide an object to replace it, or send {} to clear it; null is invalid."
      },
      {
        "name": "parameters",
        "type": "object",
        "required": false,
        "allowedValues": [],
        "description": "Template default options. Required for validate, preview and diff. Optional when creating a template; missing fields use template creation defaults. For an existing draft update, this is a shallow patch: omitted fields are preserved and null is invalid for the parameters object itself. Sending only templateId and parameters={} is rejected because it changes nothing; {} is valid alongside another changed top-level field.\n"
      }
    ]
  },
  "authoring": {
    "waitForFunctionRecipes": [
      {
        "waitForFunction": "() => document.readyState === 'complete'"
      }
    ]
  },
  "limits": {
    "templateNameMaxChars": 100,
    "templateDescriptionMaxChars": 500,
    "contentMaxBytes": 2097152,
    "sampleDataMaxBytes": 2097152,
    "parametersMaxBytes": 2097152
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.