Developer API
Reformat API Documentation
Programmatically format Word documents with the same templates used in Reformat. Use the endpoints below to list templates, process documents, and monitor credit usage.
Overview
Everything you need to authenticate, send requests, and safely retry.
Base URL
All requests are scoped to v1.
https://web.reformatword.com/api/v1Authentication
Create API keys at web.reformatword.com/api-keys.
Authorization: Bearer rf_sk_your_api_keyIdempotency
Safe retries with a unique key.
Idempotency-Key: uuid-v4Request hashes are stored for 24 hours. Documents are never cached.
Credits
1 credit per document processing run.
Use GET /usage or read X-Credits-Remaining to monitor balances.
Endpoints
Core routes for templates, processing, and credit usage.
POST
/documents/process
Upload a .docx file, apply a template, and receive the processed document as base64.
Example Request
curl -X POST "https://web.reformatword.com/api/v1/documents/process" \
-H "Authorization: Bearer rf_sk_your_api_key" \
-H "Idempotency-Key: 35b9fe15-0b4a-4c9a-86a6-0b4b9e1d1f8a" \
-F "document=@./brief.docx" \
-F "templateId=template_123" \
-F "checkRequirements=true" \
-F "runFinalCheck=true"Example Response
{
"success": true,
"requestId": "req_abc123",
"data": {
"document": "BASE64_DOCX",
"filename": "brief_reformatted.docx",
"results": {
"templateApplied": {
"templateId": "template_123",
"templateName": "Litigation Brief",
"commandExecutions": [{ "name": "Heading 1", "status": "success", "affectedCount": 14 }],
"paragraphsFormatted": 42
},
"requirementsCheck": { "passed": true, "requirements": [] },
"finalDraftCheck": { "passed": true, "checks": [] }
}
},
"usage": { "creditsUsed": 1, "creditsRemaining": 118 }
}GET
/templates
Returns templates available to your organisation and user.
Example Request
curl "https://web.reformatword.com/api/v1/templates" \
-H "Authorization: Bearer rf_sk_your_api_key"Example Response
{
"success": true,
"requestId": "req_456",
"data": {
"templates": [
{
"id": "template_123",
"name": "Litigation Brief",
"type": "legal",
"isDefault": true,
"isCustom": false,
"commandCount": 12
}
]
}
}GET
/templates/{id}
Fetch a specific template and its style settings.
Example Request
curl "https://web.reformatword.com/api/v1/templates/template_123" \
-H "Authorization: Bearer rf_sk_your_api_key"Example Response
{
"success": true,
"requestId": "req_789",
"data": {
"template": {
"id": "template_123",
"styles": { "Heading 1": { "font": "Times New Roman" } },
"template": "Litigation Brief",
"type": "legal",
"isDefault": true
}
}
}GET
/usage
Retrieve the credit balance for your organisation.
Example Request
curl "https://web.reformatword.com/api/v1/usage" \
-H "Authorization: Bearer rf_sk_your_api_key"Example Response
{
"success": true,
"requestId": "req_102",
"data": {
"organisation": { "id": "org_01", "name": "Cleveland R&D Limited" },
"credits": {
"available": 118,
"breakdown": { "monthly": 80, "total": 30, "referral": 8 },
"resetDate": "2026-03-01T00:00:00.000Z"
}
}
}Use Cases
Copy-ready snippets in Python, Next.js, and curl.
Process a document with retries
Upload a .docx file, apply a template, and safely retry with an idempotency key.
curl -X POST "https://web.reformatword.com/api/v1/documents/process" \
-H "Authorization: Bearer rf_sk_your_api_key" \
-H "Idempotency-Key: 90a87be7-2e5e-4d6f-9ed6-4d3a87f8c1b1" \
-F "document=@./brief.docx" \
-F "templateId=template_123"Pick a template before processing
List available templates, then use the chosen templateId for processing.
curl "https://web.reformatword.com/api/v1/templates" \
-H "Authorization: Bearer rf_sk_your_api_key"Check credits before a batch run
Inspect remaining credits and plan a batch of document runs.
curl "https://web.reformatword.com/api/v1/usage" \
-H "Authorization: Bearer rf_sk_your_api_key"Interactive Swagger UI
Explore the full OpenAPI schema and try requests in your browser.