Templates
Template CRUD and cloning operations.
| Method | Path | Auth | Description | Example |
|---|---|---|---|---|
| GET | /api/templates | API Key | List templates for current user. | |
| GET | /api/templates/:id | API Key | Get template details by id. |
Everything you need to integrate, automate, and scale document generation with GJSDocs — from quickstart to advanced API reference.
Create an account, choose your membership plan, and open your dashboard to create templates, connect variables, and generate documents. GJSDocs is designed to move teams from manual editing to repeatable, data-driven document workflows.
The editor uses a three-panel layout: Variables on the left, document canvas in the center, and blocks/elements on the right. Save templates once, preview results with data, and export for delivery.
Use placeholders like {client.name} in templates. Global variables can be reused across all documents, while document-level values can override data for specific outputs.
Hello {client.name},
Your invoice #{document.number} is ready.
Total: {totals.total}
Regards,
{company.name}Connect Airtable, HubSpot, Google Sheets, Zapier, and REST API data sources to feed your variables. You can also import DOCX/PDF/DOC files into the project, then convert and optimize them for variable-driven generation.
The editor ships with an AI panel that generates new sections from a prompt and rewrites or translates existing content. Bring your own API key for Google Gemini, ChatGPT (OpenAI), or Claude (Anthropic) — GJSDocs adds no markup on token usage.
"Add a payment terms section with monthly schedule and late-fee policy""Translate the whole document to Ukrainian, keep variables intact""Make the tone more formal and shorten by ~30%""Generate an NDA between a startup and a contractor for a 12-month engagement"AI output uses the same {category.name} placeholder syntax as the rest of GJSDocs. Any new placeholders introduced by the AI appear in the Variables sidebar instantly — no save/reload required.
Template CRUD and cloning operations.
| Method | Path | Auth | Description | Example |
|---|---|---|---|---|
| GET | /api/templates | API Key | List templates for current user. | |
| GET | /api/templates/:id | API Key | Get template details by id. |
Generated documents and generation history.
| Method | Path | Auth | Description | Example |
|---|---|---|---|---|
| GET | /api/documents | API Key | List generated documents. | |
| GET | /api/documents/:id | API Key | Get one generated document. | |
| GET | /api/history | API Key | List generation history. | |
| GET | /api/history/:id | API Key | Get one history entry. |
Variable storage and document generation endpoints.
| Method | Path | Auth | Description | Example |
|---|---|---|---|---|
| GET | /api/variables | API Key | Get saved variable list. | |
| PUT | /api/variables | API Key | Update all saved variables. | |
| POST | /api/generate | API Key | Generate a document from template and data. | |
| POST | /api/generate/:id/regenerate | API Key | Regenerate a document from history. |
curl -X POST "https://api.gjsdocs.com/api/generate" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"template_id": "YOUR_TEMPLATE_ID",
"data": {
"client_name": "Acme Inc",
"invoice_number": "INV-1001"
},
"format": "pdf",
"response_mode": "json"
}'JSON mode returns metadata with download_url and file_url.