> ## Documentation Index
> Fetch the complete documentation index at: https://pdfbase.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve a template

> Get a template's definition, schema, and defaults.

## Phase

**Phase 1 (Launch)**

## Path parameters

<ParamField path="id" type="string" required>
  Template ID, e.g., `tpl_abc123`.
</ParamField>

## Response

```json theme={null}
{
  "id": "tpl_abc123",
  "object": "template",
  "name": "invoice",
  "description": "Standard customer invoice",
  "html": "<!DOCTYPE html><html>...</html>",
  "css": null,
  "schema": {
    "number": "string",
    "customer": "string",
    "items": "array",
    "due_date": "date",
    "total": "string"
  },
  "defaults": {
    "format": "a4",
    "margin": "20mm",
    "compress": "medium"
  },
  "sample_data": {
    "number": "INV-001",
    "customer": "Acme Corp",
    "items": [
      { "name": "Widget", "qty": 10, "price": "$50.00" }
    ],
    "due_date": "2026-06-19",
    "total": "$500.00"
  },
  "version": 3,
  "render_count": 142,
  "created_at": "2026-05-19T10:00:00Z",
  "updated_at": "2026-05-22T14:30:00Z"
}
```

<ResponseField name="render_count" type="integer">
  Total number of times this template has been rendered. Useful for identifying unused templates.
</ResponseField>

## Example

```bash theme={null}
curl https://api.pdfbase.dev/v1/templates/tpl_abc123 \
  -H "Authorization: Bearer pk_live_xxx"
```
