REST API Reference
API Documentation

REST API Reference

Seamlessly build invoices, read statuses, and perform CRUD operations. Use standard JSON requests with API token headers.

Base URLhttps://app.invforge.com/api/public/v1

Authentication

Generate api keys inside the Organization Settings → API Keys page. All API keys must be kept private and secure. Include the key as a Bearer token in the request header:

Authorization: Bearer sk_live_your_key

Endpoints List

GET/invoices- List organization invoices
POST/invoices- Create a new invoice
GET/invoices/:id- Retrieve a specific invoice
PATCH/invoices/:id- Partially update an invoice
DELETE/invoices/:id- Delete an invoice
POST/invoices/:id/status- Set state to draft/sent/paid

Create Invoice

Submit a POST request with details such as client billing details and nested line items:

curl -X POST https://app.invforge.com/api/public/v1/invoices \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "client_name": "Apex Manufacturing Co.",
    "client_address": "890 Industrial Park Road, Dallas, TX 75201",
    "client_email": "[email protected]",
    "currency": "USD",
    "issue_date": "2026-07-26",
    "items": [
      {
        "description": "Industrial Equipment Maintenance",
        "qty": 6,
        "rate": 1200,
        "tax": 8.25
      }
    ],
    "status": "draft"
  }'

The create response includes invoice_url, a shareable URL for viewing the invoice. If client editing is enabled for the organization, the same URL lets the client update their name, address, and VAT details during the edit window.

{
  "id": "inv_123",
  "number": "INV-0042",
  "status": "draft",
  "total": 3300,
  "invoice_url": "https://app.invforge.com/i/9d4c7f..."
}

List Invoices

List invoices for your organization. Results are newest first and support pagination and status filtering.

GET/invoices?limit=20&offset=0&status=paid- limit 1–200
curl "https://app.invforge.com/api/public/v1/invoices?limit=20&offset=0&status=paid" \
  -H "Authorization: Bearer sk_live_..."
{
  "data": [{ "id": "inv_123", "number": "INV-0042", "status": "paid", "total": 3300 }],
  "total": 42,
  "limit": 20,
  "offset": 0
}

Retrieve Invoice

Fetch one invoice by its ID. IDs are returned by the create and list endpoints.

GET/invoices/:id
curl https://app.invforge.com/api/public/v1/invoices/inv_123 \
  -H "Authorization: Bearer sk_live_..."

Partially Update an Invoice

PATCH changes only the fields you send. Omitted fields remain unchanged. Send null for nullable fields such as due_date, notes, or terms.

PATCH/invoices/:id- partial update
curl -X PATCH https://app.invforge.com/api/public/v1/invoices/inv_123 \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "client_email": "[email protected]",
    "due_date": "2026-08-30",
    "notes": "Please pay by bank transfer.",
    "items": [
      { "description": "Monthly support", "qty": 2, "rate": 750, "tax": 8.25 }
    ]
  }'

To clear a value, explicitly send null. To replace line items, send the complete new items array.

curl -X PATCH https://app.invforge.com/api/public/v1/invoices/inv_123 \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "notes": null, "terms": null, "shipping": 25 }'

Delete an Invoice

Delete an invoice permanently. This action cannot be undone. The API also emits an invoice.deleted webhook.

DELETE/invoices/:id
curl -X DELETE https://app.invforge.com/api/public/v1/invoices/inv_123 \
  -H "Authorization: Bearer sk_live_..."
{ "ok": true, "id": "inv_123" }

Update Invoice Status

Use the status endpoint when you want a focused state transition. Valid values are draft, sent, and paid.

POST/invoices/:id/status
curl -X POST https://app.invforge.com/api/public/v1/invoices/inv_123/status \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "status": "paid" }'

Status changes can trigger invoice.status_changed and, for paid invoices, invoice.paid.

Clients

Clients are organization-scoped. Create a reusable client record, then use the returned details when creating invoices.

GET/clients- list clients
POST/clients- create client
curl -X POST https://app.invforge.com/api/public/v1/clients \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Apex Manufacturing Co.",
    "email": "[email protected]",
    "address": "890 Industrial Park Road, Dallas, TX 75201"
  }'

Creating an invoice does not require a client record; you can always provide client_name, client_email, and client_address directly.

Discounts & Taxes

You can set discounts or taxes either at the top-level invoice layer or per individual line items.

  • discount_type: can be "percent" or "fixed".
  • discount_value / discount: represents the actual value depending on the type.

Error Handling

InvForge uses standard HTTP codes to denote request outcomes:

CodeReason
401 UnauthorizedMissing or invalid API token.
404 Not FoundThe resource doesn't exist or is outside scope.
422 Invalid InputFailed schema validation rules.