The Invoice Ferry API
Studio plan. Base URL https://invoiceferry.com/api/v1. JSON in, JSON out.
Authentication
Make a key in Settings → Account → API keys. It looks like ifk_ followed by 64 hex characters, and is shown once. Send it as a bearer token:
Authorization: Bearer ifk_…
Content-Type: application/json
Each key has scopes: read (list and read), write (create, update, take down, stop) and send (email a client, start a repeat or a reminder — anything that makes us write to your client). A call outside the key's scopes is 403 scope_required_<scope>. A revoked key, or a plan that is no longer Studio, is 401 invalid_api_key / 402 plan_required on the very next request.
Use a key from a server or from Zapier. A browser page on another origin is refused on purpose.
Documents
A document is the JSON the app itself uses: type, number, currency, locale, issueDate, dueDate, business (name, email, …), client (name, email, …), items (description, qty, unitPrice, taxRate), taxMode, taxRate, discount, shipping, amountPaid, paymentDetails, notes, terms. Money is entered as decimal strings.
| scope | ||
|---|---|---|
GET /documents | Your shared documents with status and views | read |
POST /documents | { id?, document, status?, days? | expiresAt? } → { id, url, status, expiresAt }. Same id again updates it and keeps the link | write |
GET /documents/{id} | The stored document, its status and balanceDueMinor | read |
POST /documents/{id}/status | { status: "sent" | "paid" | "void" } | write |
POST /documents/{id}/revoke | Takes the link down and deletes our copy | write |
POST /documents/{id}/send | Emails it to the client (or { to }) with the PDF attached | send |
Creating a document shares it: a copy is stored on our servers, sealed, and expires (7 days by default, 180 at most). That is what lets the API read, send and chase it. Status viewed is only ever set by a real visit to the link; paid is yours to set.
Your browser stays the source of truth for your own saved copy: marking a document paid here updates the shared link and the client portal, not the document in your browser until you open it.
Sending, and what counts
POST /documents/{id}/send renders the PDF on our side and emails it. Every email we send for you is one row in one ledger, whether it came from the app, a repeating invoice, a reminder or the API, and that ledger is what the monthly allowance (Studio: 5,000) counts. A send we fail to make is not counted. At the limit you get 429 month_limit.
GET /usage?month=YYYY-MM (default: this month):
{ "ok": true, "plan": "studio", "allowance": 5000, "usedThisMonth": 42, "remainingThisMonth": 4958,
"month": "2026-11", "total": 42,
"bySource": { "app": 30, "schedule": 4, "reminder": 6, "api": 2 },
"byKey": [{ "id": "…", "name": "Zapier", "sends": 2 }],
"byDay": [{ "date": "2026-11-13", "sends": 7 }] }
Nothing is charged for going over: the allowance is a hard stop. The operator's month-end report (POST /api/admin/usage, admin token) lists every account's sends by source from the same ledger.
Repeating invoices (send scope to create)
| scope | ||
|---|---|---|
GET /schedules | read | |
POST /schedules | { document, every: "week"|"month"|"quarter"|"year", nextAt: "YYYY-MM-DD", until?, timezone?, sendHour?, numberPrefix?, numberNext? } | send |
POST /schedules/{id}/stop | Stops it and deletes our copy | write |
Payment reminders (send scope to create)
Made from a shared document: the client, amount and due date come from it.
| scope | ||
|---|---|---|
GET /reminders | read | |
POST /reminders | { documentId, steps?: [-3, 0, 7, 14], timezone?, sendHour? } | send |
POST /reminders/{documentId}/stop | write |
Reminders need the daily summary switched on (Settings → Account), because that is how we learn an invoice was paid. Without it: 409 digest_required.
Client portals
| scope | ||
|---|---|---|
GET /portals | read | |
POST /portals | { clientName, days? | expiresAt? } → { portal: { url, expiresAt, … } } | write |
POST /portals/expiry | { clientName, days | expiresAt } | write |
POST /portals/revoke | { clientName } | write |
Safe retries
Send an Idempotency-Key header (up to 64 characters: letters, digits and . _ : ~ -) with any POST. The first request with that key is run and its answer is kept for 24 hours; the same key again returns that answer instead of doing the work twice, with an Idempotent-Replay: true header. This is what stops a retried send from emailing a client twice. A key is bound to the exact request it first came with: the same key for a different request is 422 idempotency_key_reused, and while the first is still running a repeat is 409 request_in_progress. A 5xx answer is not kept, because the work may not have happened; retry it with the same key. Keys are per API key. Without a header there is no protection, so give every send one.
Rate limits
Every key has its own request budget, on top of the per-address limit, so one busy key does not slow another. Over it you get 429 rate_limited: wait a few seconds and retry.
Webhooks
Be told when something happens instead of polling. Register an https address (a public one: private networks are refused) and the events you want; the response carries the signing secret once.
| scope | ||
|---|---|---|
GET /webhooks | read | |
POST /webhooks | { url, events?: [...] } (no events = all) → { id, secret } | write |
POST /webhooks/{id}/test | Sends a signed webhook.test now and tells you what your server answered | write |
GET /webhooks/{id}/deliveries | The last 25 deliveries and their state | read |
POST /webhooks/{id}/delete | write |
Events: document.viewed (a client opened the link; firstView says whether it was the first), document.status_changed, email.sent (any source), email.delivered, email.bounced, portal.viewed. Up to 10 webhooks.
Each delivery is a POST with a JSON body { id, event, createdAt, data } and these headers: Invoiceferry-Event, Invoiceferry-Delivery (the same id on every retry, so you can de-duplicate) and Invoiceferry-Signature: t=<unix seconds>,v1=<hex>, where v1 is the HMAC-SHA256 of "<t>.<raw body>" with your secret. Recompute it, compare, and reject a timestamp more than a few minutes old. Answer with any 2xx. Anything else (or no answer in 10 seconds) is retried after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours, then given up on. A webhook whose last six deliveries all failed is switched off. We do not follow redirects.
Errors
{ "ok": false, "error": "<code>", "message": "…" } with an HTTP status. 401 bad key, 402 plan, 403 scope, 404 not found, 409 precondition, 422 the document is incomplete (with problems), 429 limit or rate_limited, 502 the email service refused.
Not in v1
Creating or sending from a client list (your clients live in your browser, so every document carries its own client), and charging for sends beyond the monthly allowance (there is none: the allowance is a hard stop).