API Documentation

Connect your bots, AI agents, and tools to InvoiceCave

Authentication

All API requests require an API key. Generate one from Dashboard → Settings → API Keys.

# Include in every request:

Authorization: Bearer ic_your_api_key_here

Base URL: https://www.invoicecave.com

REST API (v1)

Standard HTTP endpoints. Works with any HTTP client, bot, or automation tool (OpenClaw, n8n, Zapier, curl, etc.).

Dashboard

GET
/api/v1/dashboard

Get overview stats: outstanding amounts, overdue invoices, counts

Customers

GET
/api/v1/customers?search=acme

List customers. Optional search filter.

GET
/api/v1/customers/:id

Get single customer details

POST
/api/v1/customers

Create customer. Body: { displayName, email?, phone?, company?, currency? }

PUT
/api/v1/customers/:id

Update customer. Body: { displayName?, email?, phone?, company?, currency? }

DELETE
/api/v1/customers/:id

Delete customer (fails if has invoices)

Items (Products/Services)

GET
/api/v1/items?search=hosting

List items. Optional search filter.

GET
/api/v1/items/:id

Get single item details

POST
/api/v1/items

Create item. Body: { name, rate, type?, description?, tax? }

PUT
/api/v1/items/:id

Update item. Body: { name?, rate?, description?, tax?, unit? }

DELETE
/api/v1/items/:id

Delete item from catalog

Invoices

GET
/api/v1/invoices?status=Sent&search=acme

List invoices. Optional status, search, limit filters.

POST
/api/v1/invoices

Create invoice. Body: { customerName, lineItems: [{description, rate, quantity?, tax?}], currency?, terms? }

GET
/api/v1/invoices/:id

Get full invoice details with line items

PUT
/api/v1/invoices/:id

Update invoice. Body: { customerName?, currency?, status?, dueDate?, customerNotes?, discount?, shipping? }

DELETE
/api/v1/invoices/:id

Delete invoice (Draft/Void only)

POST
/api/v1/invoices/:id/send

Mark as Sent and get shareable link

GET
/api/v1/invoices/:id/link

Get the shareable public link

POST
/api/v1/invoices/:id/payment

Record payment. Body: { amount, paymentMode?, reference? }

GET
/api/v1/invoices/:id/pdf

Download invoice as PDF

POST
/api/v1/invoices/:id/email

Email invoice with PDF. Optional: { email: 'override@...' }

POST
/api/v1/invoices/:id/line-items

Add line item. Body: { description, quantity, rate, tax? }

PUT
/api/v1/invoices/:id/line-items

Update line item. Body: { lineItemIndex, description?, rate?, quantity? }

DELETE
/api/v1/invoices/:id/line-items

Remove line item. Body: { lineItemIndex } or { description }

Payments, Recurring, Accounting

GET
/api/v1/payments

List payments. Optional: invoiceId, customerId filters.

GET
/api/v1/recurring-invoices

List recurring invoice profiles

GET
/api/v1/recurring-payments

List recurring payment profiles

GET
/api/v1/accounts

Chart of accounts. Optional: type filter (Asset, Liability, etc.)

GET
/api/v1/journal-entries

List journal entries. Optional: status, limit.

GET
/api/v1/audit-log

View audit log. Optional: entity, limit.

MCP (Model Context Protocol)

For MCP-compatible clients like Claude Desktop, Cursor, and Codex.

// Add to your MCP client config:

{
  "mcpServers": {
    "invoicecave": {
      "url": "https://www.invoicecave.com/api/mcp/sse",
      "headers": {
        "Authorization": "Bearer ic_your_api_key"
      }
    }
  }
}

28 tools available: list_customers, get_customer, create_customer, edit_customer, delete_customer, list_items, get_item, create_item, edit_item, delete_item, list_invoices, get_invoice, create_invoice, update_invoice, delete_invoice, send_invoice, get_invoice_link, email_invoice, get_pdf_link, add_line_item, update_line_item, remove_line_item, record_payment, list_payments, get_payment, get_dashboard, list_recurring_invoices, list_recurring_payments, list_accounts, list_journal_entries, get_audit_log

OpenClaw Integration

Connect your OpenClaw bot to InvoiceCave using the REST API with web_fetch.

Step 1: Add the skill

# Download the skill file

curl -o invoicecave.md https://www.invoicecave.com/openclaw-skill.md

# Or point your bot to read it

openclaw message "Read https://www.invoicecave.com/openclaw-skill.md for InvoiceCave API instructions"

Step 2: Set your API key

# Store as environment variable

export INVOICECAVE_API_KEY="ic_your_key_here"

Step 3: Use it

# Tell your bot

"Create an invoice for Acme Corp for 40 hours of web development at 120 USD/hour using InvoiceCave"

The bot will use web_fetch to call the REST API endpoints with your API key.

Quick Test (curl)

# List your customers

curl -H "Authorization: Bearer ic_your_key" \

https://www.invoicecave.com/api/v1/customers

# Create an invoice

curl -X POST -H "Authorization: Bearer ic_your_key" \

-H "Content-Type: application/json" \

-d '{"customerName":"Acme","lineItems":[{"description":"Dev","rate":120,"quantity":40}]}' \

https://www.invoicecave.com/api/v1/invoices