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:
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 |
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 }
}'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" }
}'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"
}
}'| 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 |
| 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
appendparameter to append pages from other documents or templates.
| Method | Endpoint | Description |
|---|---|---|
GET |
/v1/usage |
Get Usage |
| 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 |
| Method | Endpoint | Description |
|---|---|---|
GET |
/v1/account |
Get Account |
PATCH |
/v1/account |
Update Account |
| 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 |
| 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 |
| Method | Endpoint | Description |
|---|---|---|
GET |
/v1/health |
Health Check |
| 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 |
A pre-configured Postman collection is available for quick API exploration.
- Download the collection from
postman/Bytedoc.postman_collection.json. - Open Postman and click Import.
- Select the downloaded JSON file.
- Set the
base_urlvariable tohttps://api.bytedoc.dev/v1. - Set the
api_keyvariable to your API key.
| Language | Location |
|---|---|
| curl | examples/curl |
| TypeScript | examples/typescript |
| Python | examples/python |
| FileMaker | examples/filemaker |
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.
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.
Manage templates, view documents, monitor usage, and configure API keys and webhooks from the web dashboard:
This project is licensed under the MIT License.