Skip to main content

Starter Templates

Pre-built templates to help you get started quickly. The list endpoint is public (no authentication required), while cloning requires an API key.

List Starter Templates

GET https://api.getdocuforge.dev/v1/starter-templates Public — no authentication required. Returns all available starter templates with their metadata and sample data.

Example

curl https://api.getdocuforge.dev/v1/starter-templates

Response

{
  "data": [
    {
      "slug": "invoice",
      "name": "Professional Invoice",
      "description": "A clean, professional invoice template with line items and tax calculation.",
      "category": "business",
      "sample_data": {
        "company": "Acme Corp",
        "items": [{ "description": "Consulting", "qty": 10, "rate": 150 }],
        "total": 1500
      }
    }
  ]
}

Get Starter Template

GET https://api.getdocuforge.dev/v1/starter-templates/:slug Public — no authentication required. Get the full details of a starter template including its HTML content.

Path Parameters

ParameterTypeDescription
slugstringTemplate slug (e.g., "invoice")

Response

{
  "slug": "invoice",
  "name": "Professional Invoice",
  "description": "A clean, professional invoice template with line items and tax calculation.",
  "category": "business",
  "html_content": "<!DOCTYPE html><html>...</html>",
  "sample_data": {
    "company": "Acme Corp",
    "items": [{ "description": "Consulting", "qty": 10, "rate": 150 }],
    "total": 1500
  }
}

Clone Starter Template

POST https://api.getdocuforge.dev/v1/starter-templates/:slug/clone Requires authentication. Clone a starter template into your account as a new editable template.

Path Parameters

ParameterTypeDescription
slugstringTemplate slug to clone (e.g., "invoice")

Example

curl -X POST https://api.getdocuforge.dev/v1/starter-templates/invoice/clone \
  -H "Authorization: Bearer df_live_sk_..."

Response — 201 Created

{
  "id": "tmpl_abc123",
  "name": "Professional Invoice",
  "version": 1,
  "created_at": "2026-03-15T10:30:00.000Z"
}

Errors

StatusCodeDescription
401UNAUTHORIZEDInvalid or missing API key (clone only)
404NOT_FOUNDStarter template not found
429RATE_LIMITEDToo many requests
500INTERNAL_ERRORServer error