CraftMyPDF API

Beginner's Pick Documents & Productivity / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

CraftMyPDF lets you generate PDF documents programmatically from reusable templates using a drag-and-drop editor. You design templates once and then populate them with dynamic data through a simple REST API call. It is ideal for generating invoices, reports, contracts, and other structured documents at scale.

Beginner Tip

Start by creating a free template in the CraftMyPDF dashboard and note its template ID — you will pass this ID in your API request along with your JSON data to generate a PDF.

Available Data

randomly generated data
customizable output format
CraftMyPDF data via REST API

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from CraftMyPDF",
    "description": "Generate PDF documents from templates with a drop-and-drop editor and a simple API",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

status Result status of the request, typically "success" or "error".
file Temporary URL to download the generated PDF file.
transaction_ref Unique reference ID for this PDF generation transaction.
download_url Direct download link for the generated PDF (same as file in most responses).

Implementation Example

Request
const url = "https://craftmypdf.com/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized Missing or invalid X-API-KEY header.
Include your API key in the X-API-KEY request header.
400 Bad Request – template not found The template_id does not exist or belongs to a different account.
Copy the exact template ID from your CraftMyPDF dashboard and verify it matches your account.
Empty or blank PDF generated The JSON data keys do not match the variable names defined in the template.
Open the template editor and confirm variable names exactly match the keys you send in the data object.

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS NO
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →