Base URL https://documint.anethoth.com/api/v1

Authentication

DocuMint uses API key authentication via the standard HTTP Authorization header. Obtain your key by calling /signup.

All authenticated endpoints require a Bearer token in the Authorization header. API keys are prefixed with dm_.
Authorization header
Authorization: Bearer dm_your_api_key_here

Errors

DocuMint uses standard HTTP status codes. Error responses are JSON with a descriptive error field.

Status
Meaning
400
Bad Request — missing or invalid parameters
401
Unauthorized — missing or invalid API key
429
Too Many Requests — rate limit or monthly quota exceeded
Error response shape
JSON
{
  "error": "Unauthorized: invalid or missing API key"
}
Example error responses
HTTP/1.1 401 Unauthorized
Content-Type: application/json

{
  "error": "Unauthorized: invalid or missing API key"
}
HTTP/1.1 400 Bad Request
Content-Type: application/json

{
  "error": "items is required and must be a non-empty array"
}
HTTP/1.1 429 Too Many Requests
Content-Type: application/json

{
  "error": "Monthly limit reached. Upgrade your plan to continue."
}

Plans & Limits

All plans include the same feature set. Limits apply per calendar month.

Free
$0/mo
5 invoices / month
Starter
$9/mo
100 invoices / month
Pro
$19/mo
1,000 invoices / month
Business
$39/mo
10,000 invoices / month
Upgrade anytime via the /checkout endpoint. Your API key stays the same after upgrading.

POST
/signup
Create an account and receive an API key.
● No authentication required
Request body
FieldTypeRequiredDescription
email string required Your email address. Used to identify your account.
Example request
curl
curl -X POST https://documint.anethoth.com/api/v1/signup \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]"
  }'
Response
{
  "api_key":        "dm_abc123xyz...",
  "plan":           "free",
  "monthly_limit":  5
}
POST
/invoice
Generate a PDF invoice. Returns the PDF binary directly.
🔒 Bearer token required
The response Content-Type is application/pdf. Save the binary body directly to a .pdf file.
Request body
FieldTypeRequiredDescription
items array required Line items. Each item: {description, quantity, unit_price}
from object optional Sender info: {name, address, email, phone}
to object optional Recipient info: {name, address, email}
invoice_number string optional Invoice identifier. Defaults to "INV-001"
date string optional Invoice date (e.g. "2025-04-11")
due_date string optional Payment due date
currency_symbol string optional Currency symbol shown on the PDF. Defaults to "$"
tax_rate number optional Tax percentage applied to the subtotal (e.g. 10 for 10%)
discount number optional Flat discount amount deducted from the subtotal
notes string optional Additional notes printed below the totals
footer string optional Footer text at the bottom of the page
logo_url string optional Public URL to a logo image (PNG or JPEG, max 2 MB)
payment_info string optional Payment instructions or bank details block
Example request
curl
curl -X POST https://documint.anethoth.com/api/v1/invoice \
  -H "Authorization: Bearer dm_your_api_key" \
  -H "Content-Type: application/json" \
  -o invoice.pdf \
  -d '{
    "invoice_number": "INV-042",
    "date": "2025-04-11",
    "due_date": "2025-05-11",
    "currency_symbol": "$",
    "from": {
      "name":    "Acme Corp",
      "address": "123 Startup Lane, San Francisco, CA 94107",
      "email":   "[email protected]",
      "phone":   "+1 555 000 1234"
    },
    "to": {
      "name":    "Wayne Enterprises",
      "address": "1 Wayne Tower, Gotham City, NY 10001",
      "email":   "[email protected]"
    },
    "items": [
      {
        "description": "API Integration — 40 hrs",
        "quantity":    40,
        "unit_price":  150
      },
      {
        "description": "Infrastructure setup",
        "quantity":    1,
        "unit_price":  800
      }
    ],
    "tax_rate":    8.5,
    "discount":    200,
    "notes":       "Thank you for your business!",
    "footer":      "Payment via wire transfer or ACH.",
    "payment_info":"Bank: First National\nRouting: 021000021\nAccount: 987654321",
    "logo_url":    "https://acme.com/logo.png"
  }'
Response
HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Disposition: attachment; filename="invoice.pdf"

%PDF-1.4 binary content...
HTTP/1.1 429 Too Many Requests
Content-Type: application/json

{
  "error": "Monthly limit reached. Upgrade your plan to continue."
}
GET
/usage
Check your current plan and invoice usage for the month.
🔒 Bearer token required
Example request
curl
curl https://documint.anethoth.com/api/v1/usage \
  -H "Authorization: Bearer dm_your_api_key"
Response
{
  "plan":                 "free",
  "invoices_this_month": 3,
  "monthly_limit":       5,
  "remaining":           2
}
POST
/checkout
Create a Stripe checkout session to upgrade your plan.
🔒 Bearer token required
Redirect the user to the returned checkout_url. After payment, DocuMint automatically upgrades your plan and the same API key gains the new limits.
Request body
FieldTypeRequiredDescription
plan string required One of "starter", "pro", or "business"
Example request
curl
curl -X POST https://documint.anethoth.com/api/v1/checkout \
  -H "Authorization: Bearer dm_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"plan": "starter"}'
Response
{
  "checkout_url": "https://checkout.stripe.com/pay/cs_live_..."
}
HTTP/1.1 400 Bad Request

{
  "error": "Invalid plan. Must be one of: starter, pro, business"
}
POST
/demo-invoice
Generate a PDF without an account. No API key needed.
● No authentication required ⚡ Rate limited — 5 requests / minute
!
This endpoint is intended for evaluation only. It accepts the same body as /invoice but is limited to 20 line items per request and 5 requests per minute per IP.
Example request
curl
curl -X POST https://documint.anethoth.com/api/v1/demo-invoice \
  -H "Content-Type: application/json" \
  -o demo.pdf \
  -d '{
    "invoice_number": "DEMO-001",
    "from": {"name": "My Company"},
    "to":   {"name": "Client Name"},
    "items": [
      {"description": "Consulting", "quantity": 5, "unit_price": 200}
    ]
  }'
Response
HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Disposition: attachment; filename="demo.pdf"

%PDF-1.4 binary content...
HTTP/1.1 429 Too Many Requests
Content-Type: application/json

{
  "error": "Rate limit exceeded. Maximum 5 demo requests per minute."
}
POST
/subscribe
Subscribe to the DocuMint newsletter for updates and tips.
● No authentication required
Request body
FieldTypeRequiredDescription
email string required Email address to subscribe
Example request
curl
curl -X POST https://documint.anethoth.com/api/v1/subscribe \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]"}'
Response
{
  "message": "Subscribed successfully."
}