Create invoice

Create a draft invoice for a client with line items, dates and notes.

MCP tool invoice_ninja_write → create_invoice

write

Creates an invoice as a draft and returns its number and totals. A draft is invisible to the client, stays out of the client balance and cannot reach anyone until you send it with send_invoice. Invoice Ninja numbers the invoice from the pattern in Settings > Generated Numbers, and without a due date the invoice is due immediately. Totals are quantity times unit cost per line, in the client currency. create_invoice runs without asking first: a draft reaches nobody and you can delete it in Invoice Ninja.

Parameters

Parameters: create_invoice
NameTypeDescription
company string string Company name, for accounts with several companies. Default: the company open when you signed in.
client_id string required string Client ID from list_clients or create_client.
items array required array Line items. Each has product (name from list_products or free text), description, unit_cost and quantity (decimals allowed).
invoice_date date date Default: today.
due_date date date Default: none, which makes the invoice due immediately.
po_number string string The client's purchase order number, printed on the PDF.
public_notes string string Note the client sees on the invoice.

tools/call

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "invoice_ninja_write",
    "arguments": {
      "operation": "create_invoice",
      "arguments": {
        "client_id": "Wp3xq8Rnd5",
        "items": [
          {
            "product": "Design sprint",
            "description": "Design sprint, 10 hours",
            "unit_cost": 90,
            "quantity": 10
          },
          {
            "product": "Hosting setup",
            "description": "Hosting setup",
            "unit_cost": 150,
            "quantity": 1
          }
        ],
        "invoice_date": "2026-10-14",
        "due_date": "2026-11-13"
      }
    }
  }
}

Example response

JSON

{
  "content": [
    {
      "type": "text",
      "text": "{ ... same JSON as structuredContent ... }"
    }
  ],
  "structuredContent": {
    "invoice_number": "INV-0043",
    "client": "Northwind Studio",
    "status": "draft",
    "invoice_date": "2026-10-14",
    "due_date": "2026-11-13",
    "currency": "USD",
    "items": [
      {
        "product": "Design sprint",
        "description": "Design sprint, 10 hours",
        "unit_cost": 90,
        "quantity": 10,
        "line_total": 900
      },
      {
        "product": "Hosting setup",
        "description": "Hosting setup",
        "unit_cost": 150,
        "quantity": 1,
        "line_total": 150
      }
    ],
    "amount": 1050,
    "balance": 1050
  },
  "isError": false
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.