# eCourtDate Document Generation API Documentation > The canonical reference for the eCourtDate Document Generation API > (https://api.pdfs.ecourtdate.com/v1). Generate court-ready PDF documents: > reusable, versioned templates with merge tags, one-off documents from blank > pages or HTML/CSS, image assets, batch generation, and a per-account audit > trail. ## Key resources - [API reference (interactive)](https://docs.pdfs.ecourtdate.com/reference/) - [OpenAPI 3.1 specification](https://docs.pdfs.ecourtdate.com/openapi.yaml) - [Guides index](https://docs.pdfs.ecourtdate.com/guides) - [Getting started](https://docs.pdfs.ecourtdate.com/guides/getting-started) - [Using the API with AI agents](https://docs.pdfs.ecourtdate.com/guides/ai-agents) - [Errors](https://docs.pdfs.ecourtdate.com/guides/errors) - [Warnings](https://docs.pdfs.ecourtdate.com/guides/warnings) ## Facts - Base URL: https://api.pdfs.ecourtdate.com/v1 - Authentication: API key in the `x-api-key` header on every request. Keys are created in the eCourtDate Console APIs page (https://console.ecourtdate.com/apis) and carry scopes: templates:read, templates:write, generate, audit:read. Write operations also require an `X-On-Behalf-Of` header (recorded in the audit trail). - Core model: templates hold immutable numbered versions (draft → ready → published → superseded); generation renders the published version unless a version is pinned. Versions declare typed merge tags; generation data is validated strictly by default. - One-off documents: POST /v1/documents renders blank pages with positioned fields, or whole documents authored in HTML/CSS (sanitized; JSON response mode required for HTML). - Field types: text (plain/markdown), field, checkbox, symbol, fill, image, barcode (QR / Code 128), table, html. Coordinates are PDF points, top-left origin, Y down. - Batch: up to 200 documents per job; poll GET /v1/jobs/{jobId}; download URLs re-signed on every read; jobs expire after 48 hours. - Conventions: snake_case fields, cursor pagination, RFC 9457 application/problem+json errors with stable error_code values, warn-and-skip rendering warnings with stable codes, Idempotency-Key support on POSTs (generation replays can never duplicate a document). - Data lifecycle: generated outputs are retained ~20 hours; download URLs last 1 hour and can be re-signed via GET /v1/outputs/{outputId}. - eCourtDate: https://www.ecourtdate.com