Skip to content

zerolooplabs/bytedoc-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bytedoc

License: MIT

Bytedoc is a SaaS REST API for PDF and DOCX document generation and filling. Upload templates, fill form fields, generate PDFs from HTML, manipulate documents, and more -- all through a simple HTTP interface.


Base URL and Authentication

Base URL:

https://api.bytedoc.dev/v1

Authentication:

All API requests require a Bearer token in the Authorization header. API keys are available from the dashboard.

Authorization: Bearer pk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Key Prefix Environment
pk_live_ Production
pk_test_ Sandbox

Quick Start

Fill a PDF Form

curl -X POST https://api.bytedoc.dev/v1/documents/fill \
  -H "Authorization: Bearer pk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "tpl_abc123",
    "data": {
      "first_name": "Jane",
      "last_name": "Doe",
      "email": "jane@example.com"
    },
    "options": { "flatten": true }
  }'

Generate a PDF from HTML

curl -X POST https://api.bytedoc.dev/v1/documents/generate \
  -H "Authorization: Bearer pk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "tpl_def456",
    "data": {
      "invoice_number": "INV-2026-001",
      "customer_name": "Acme Corp",
      "total": "$1,250.00"
    },
    "options": { "format": "A4" }
  }'

Fill a DOCX Template

curl -X POST https://api.bytedoc.dev/v1/documents/fill-docx \
  -H "Authorization: Bearer pk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "tpl_ghi789",
    "data": {
      "company_name": "Acme Corp",
      "date": "2026-03-11",
      "signatory": "Jane Doe"
    }
  }'

API Overview

Templates

Method Endpoint Description
POST /v1/templates Upload Template
POST /v1/templates/from-pdf Create Template from PDF via AI
GET /v1/templates List Templates
GET /v1/templates/:id Get Template
GET /v1/templates/:id/fields Get Template Fields
PATCH /v1/templates/:id/fields Update Template Fields
GET /v1/templates/:id/content Download Template File
PATCH /v1/templates/:id Replace Template File
DELETE /v1/templates/:id Delete Template

Documents

Method Endpoint Description
POST /v1/documents/fill Fill PDF Form
POST /v1/documents/generate Generate PDF from HTML
POST /v1/documents/fill-docx Fill DOCX Template
POST /v1/documents/merge Merge PDFs
POST /v1/documents/split Split PDF
POST /v1/documents/encrypt Encrypt PDF
GET /v1/documents List Documents
GET /v1/documents/:id Get Document
GET /v1/documents/:id/download Download Document
DELETE /v1/documents/:id Delete Document

Note: The Fill PDF and Generate PDF endpoints support an optional append parameter to append pages from other documents or templates.

Usage

Method Endpoint Description
GET /v1/usage Get Usage

Billing

Method Endpoint Description
POST /v1/billing/checkout Create Checkout
POST /v1/billing/portal Billing Portal
GET /v1/billing/status Billing Status
POST /v1/billing/change-plan Change Plan

Account

Method Endpoint Description
GET /v1/account Get Account
PATCH /v1/account Update Account

API Keys

Method Endpoint Description
GET /v1/api-keys List API Keys
POST /v1/api-keys Create API Key
DELETE /v1/api-keys/:id Delete API Key

Webhooks

Method Endpoint Description
POST /v1/webhooks Create Webhook
GET /v1/webhooks List Webhooks
GET /v1/webhooks/:id Get Webhook
PATCH /v1/webhooks/:id Update Webhook
DELETE /v1/webhooks/:id Delete Webhook

Health

Method Endpoint Description
GET /v1/health Health Check

Documentation

Document Description
API Reference Full endpoint documentation with request/response schemas
FileMaker Guide Integration guide for FileMaker / Claris developers
Error Codes Complete list of error codes and troubleshooting

Postman Collection

A pre-configured Postman collection is available for quick API exploration.

  1. Download the collection from postman/Bytedoc.postman_collection.json.
  2. Open Postman and click Import.
  3. Select the downloaded JSON file.
  4. Set the base_url variable to https://api.bytedoc.dev/v1.
  5. Set the api_key variable to your API key.

Code Examples

Language Location
curl examples/curl
TypeScript examples/typescript
Python examples/python
FileMaker examples/filemaker

Document Retention

Generated and filled documents are stored temporarily based on your plan.

Plan Retention
Free 7 days
Starter 30 days
Pro 90 days
Business 365 days
Enterprise Unlimited

After the retention period, documents are automatically deleted from storage. Download or transfer documents before expiry.


Sandbox Mode

Use API keys prefixed with pk_test_ to access sandbox mode. Sandbox mode is designed for development and testing with the following constraints:

  • Documents are watermarked.
  • Rate limit: 60 requests per minute.
  • Usage cap: 60 documents per day.
  • Document retention: 1 hour.
  • Webhooks are disabled.

Sandbox requests do not count toward your plan usage.


Dashboard

Manage templates, view documents, monitor usage, and configure API keys and webhooks from the web dashboard:

https://bytedoc.dev/dashboard


License

This project is licensed under the MIT License.

About

Bytedoc API documentation, examples, and Postman collection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors