Quickstart
From zero to your first JSON response in about two minutes.
- Create a key. Sign in on the Agency plan and open Settings → API & webhooks. Choose a preset (Read only is a good start), name the key and copy it. It is shown once; only a hash is stored.
- Keep it secret. Put it in an environment variable, never in browser code or a public repo.
export INVOICE_STUDIO_KEY="is_ro_your_key_here" - Call the API. List your five newest invoices.
curl "https://invoicestudio.cc/api/v1/invoices?limit=5" \ -H "Authorization: Bearer $INVOICE_STUDIO_KEY"const res = await fetch("https://invoicestudio.cc/api/v1/invoices?limit=5", { headers: { Authorization: `Bearer ${process.env.INVOICE_STUDIO_KEY}`, }, }); if (!res.ok) throw new Error((await res.json()).error); const body = await res.json();import os, requests r = requests.get( "https://invoicestudio.cc/api/v1/invoices", params={ "limit": 5, }, headers={"Authorization": f"Bearer {os.environ['INVOICE_STUDIO_KEY']}"}, timeout=30, ) r.raise_for_status() print(r.json()) - Read the response. Lists return
data,next_cursorandhas_more. Single records returndata.{ "data": [ { "id": 42, "number": "INV-0042", "status": "partial", "currency": "USD", "total": 1250, "amount_paid": 450, "balance": 800 } ], "next_cursor": "eyJpZCI6NDF9", "has_more": true }
Building without real data? Use a test key. It reads and writes a sandbox workspace with sample clients, deals and invoices.
Authentication
Every request sends an API key in the Authorization header. All traffic is HTTPS; plain HTTP is refused.
GET /api/v1/me HTTP/1.1
Host: invoicestudio.cc
Authorization: Bearer is_ro_8c1e…Key formats
is_ro_… read only and is_rw_… read + write (live keys), is_test_… sandbox keys. A key belongs to one workspace.
Up to 10 active keys
Give each app its own key so you can revoke one without breaking the others. Revoked keys stop working on the next request.
Who can make keys
The account owner or an admin, in Settings → API & webhooks. Creating and revoking keys is written to the audit log.
OAuth for AI assistants
MCP clients such as ChatGPT connectors can sign in with an Invoice Studio account instead of a key. Only the MCP endpoint accepts OAuth tokens; the REST API always uses keys.
| Flow | OAuth 2.1 authorization code with PKCE (S256) and dynamic client registration (RFC 7591) |
|---|---|
| Discovery | /.well-known/oauth-protected-resource and /.well-known/oauth-authorization-server |
| Endpoints | /oauth/authorize (consent screen), /api/v1/oauth/register, /api/v1/oauth/token, /api/v1/oauth/revoke |
| Scopes | mcp:read, mcp:write, mcp:send_invoice |
| Tokens | Access tokens last 1 hour. Refresh tokens last 30 days and rotate on every use; reusing an old one ends the connection. |
| Revoke | Settings → API & webhooks, or POST /api/v1/oauth/revoke |
Setup steps for each assistant are on the MCP page.
Scopes & presets
Each key carries scopes. A call without the scope it needs returns 403 with code insufficient_scope. Pick a preset when you create a key, or choose scopes one by one. Keys made before scopes existed keep working: an is_ro_ key has every :read scope plus webhooks:write, and an is_rw_ key has every scope.
| Preset | Scopes | Good for |
|---|---|---|
| Read only | invoices:read, clients:read, deals:read, payments:read, webhooks:read, mcp:read | Dashboards, reporting, a read-only AI assistant |
| Zapier / Make | All invoices, clients, deals, payments and webhooks scopes | No-code automations with REST hooks |
| AI assistant (safe) | mcp:read, mcp:write, mcp:send_invoiceMCP only. Tools: every read tool plus update_deal_stage, draft_invoice, request_invoice_send and create_task (not create_order or add_order_message). | ChatGPT, Claude, Cursor and other MCP clients |
| Full access | Every scope | Two-way sync with your own app |
| Custom | Any mix, plus a per-key MCP tool allow-list | Least-privilege service keys |
| Scope | Allows |
|---|---|
invoices:read | List invoices and read one invoice with its items and payments. |
invoices:write | Create invoices (POST /invoices). |
clients:read | List and read clients and contacts. |
clients:write | Add clients and contacts. |
deals:read | List and read CRM deals. |
deals:write | Add CRM deals. |
payments:read | List payments. |
webhooks:read | List REST hook subscriptions. |
webhooks:write | Subscribe and unsubscribe REST hooks (Zapier, Make). |
mcp:read | AI assistant (MCP): read invoices, clients, deals, orders and payments. |
mcp:write | AI assistant (MCP): make draft invoices, move deals, add orders, tasks and messages. |
mcp:send_invoice | AI assistant (MCP): ask you to approve sending an invoice. It never sends by itself. |
Endpoints
Base URL https://invoicestudio.cc/api/v1. Requests and responses are JSON (UTF-8). Dates are YYYY-MM-DD; timestamps are UTC. Money is in major units (1250 = $1,250.00) with the record's currency.
/me
GET/invoices
GET/invoices/{id}
POST/invoices
GET/clients
GET/clients/{id}
POST/clients
GET/deals
GET/deals/{id}
POST/deals
GET/payments
GET/hooks
POST/hooks
DELETE/hooks/{id}
GET/hooks/sample/{event}
GET/openapi.json
POST/mcp
Account
/api/v1/meAny keyWho this key belongs to. Use it to test a key (Zapier uses it as the connection test).
Request
curl "https://invoicestudio.cc/api/v1/me" \
-H "Authorization: Bearer $INVOICE_STUDIO_KEY"const res = await fetch("https://invoicestudio.cc/api/v1/me", {
headers: {
Authorization: `Bearer ${process.env.INVOICE_STUDIO_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).error);
const body = await res.json();import os, requests
r = requests.get(
"https://invoicestudio.cc/api/v1/me",
headers={"Authorization": f"Bearer {os.environ['INVOICE_STUDIO_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())Response
{
"data": {
"id": 7,
"name": "Rafi Ahmed",
"email": "rafi@studio.example",
"business": "North Star Studio"
}
}Invoices
/api/v1/invoicesinvoices:readInvoices, quotes and other documents, newest first. Totals, amount paid and balance come from the app, so they match what your client sees.
| Parameter | Type | Notes |
|---|---|---|
limit | integer | 1 to 200, default 50. |
cursor | string | The next_cursor from the previous page. |
updated_since | string | Only records changed at or after this time (UTC): YYYY-MM-DD or YYYY-MM-DD HH:MM:SS. |
Request
curl "https://invoicestudio.cc/api/v1/invoices?limit=50&updated_since=2026-11-01" \
-H "Authorization: Bearer $INVOICE_STUDIO_KEY"const res = await fetch("https://invoicestudio.cc/api/v1/invoices?limit=50&updated_since=2026-11-01", {
headers: {
Authorization: `Bearer ${process.env.INVOICE_STUDIO_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).error);
const body = await res.json();import os, requests
r = requests.get(
"https://invoicestudio.cc/api/v1/invoices",
params={
"limit": 50,
"updated_since": "2026-11-01",
},
headers={"Authorization": f"Bearer {os.environ['INVOICE_STUDIO_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())Response
{
"data": [
{
"id": 42,
"number": "INV-0042",
"doc_type": "invoice",
"status": "partial",
"issue_date": "2026-11-02",
"due_date": "2026-11-16",
"currency": "USD",
"total": 1250,
"amount_paid": 450,
"balance": 800,
"client_id": 1042,
"deal_id": 318,
"updated_at": "2026-11-12 14:03:11"
}
],
"next_cursor": "eyJpZCI6NDF9",
"has_more": true
}/api/v1/invoices/{id}invoices:readOne invoice with sender, client, line items, taxes, discounts, notes and payments. The logo is replaced by "(image)" and the signature is left out.
| Parameter | Type | Notes |
|---|---|---|
id | integer | Invoice id (path). |
Request
curl "https://invoicestudio.cc/api/v1/invoices/42" \
-H "Authorization: Bearer $INVOICE_STUDIO_KEY"const res = await fetch("https://invoicestudio.cc/api/v1/invoices/42", {
headers: {
Authorization: `Bearer ${process.env.INVOICE_STUDIO_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).error);
const body = await res.json();import os, requests
r = requests.get(
"https://invoicestudio.cc/api/v1/invoices/42",
headers={"Authorization": f"Bearer {os.environ['INVOICE_STUDIO_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())Response
{
"data": {
"id": 42,
"number": "INV-0042",
"status": "partial",
"currency": "USD",
"issue_date": "2026-11-02",
"due_date": "2026-11-16",
"from": {
"name": "North Star Studio",
"logo": "(image)",
"signature": ""
},
"to": {
"name": "Emma Clarke",
"company": "Sweet Crumbs Bakery",
"email": "emma@sweetcrumbs.example"
},
"items": [
{
"description": "Three-tier wedding cake",
"quantity": 1,
"rate": 950,
"amount": 950
},
{
"description": "Delivery and setup",
"quantity": 1,
"rate": 300,
"amount": 300
}
],
"total": 1250,
"amount_paid": 450,
"balance": 800,
"payments": [
{
"amount": 450,
"paid_on": "2026-11-05",
"method": "Bank transfer"
}
]
}
}/api/v1/invoicesinvoices:writeIdempotency-KeyCreate an invoice from your own system (an online order, a booking). It is saved with status sent (or paid with mark_paid) and gets a pay link. Send client_id or a client object; a client object is matched by email or phone first. mark_paid records a payment, so invoice.paid fires and the CRM updates.
| Field | Type | Notes |
|---|---|---|
client_id | integer | An existing contact. Or send client. |
client | object | name, email, phone, company. Matched to an existing contact by email or phone. |
items | array | Required. Up to 100 items: description, quantity (default 1), rate. |
currency | string | ISO code like USD. Default: your business currency. |
due_date | date | YYYY-MM-DD. |
notes | string | Shown on the invoice. |
reference | string | Your order or PO number, up to 60 characters. |
mark_paid | boolean | Record full payment now. |
Request
curl -X POST "https://invoicestudio.cc/api/v1/invoices" \
-H "Authorization: Bearer $INVOICE_STUDIO_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"client": {
"name": "Emma Clarke",
"email": "emma@sweetcrumbs.example"
},
"currency": "USD",
"items": [
{
"description": "Three-tier wedding cake",
"quantity": 1,
"rate": 950
},
{
"description": "Delivery and setup",
"quantity": 1,
"rate": 300
}
],
"due_date": "2026-11-30",
"reference": "WEB-1187"
}'const res = await fetch("https://invoicestudio.cc/api/v1/invoices", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.INVOICE_STUDIO_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
"client": {
"name": "Emma Clarke",
"email": "emma@sweetcrumbs.example"
},
"currency": "USD",
"items": [
{
"description": "Three-tier wedding cake",
"quantity": 1,
"rate": 950
},
{
"description": "Delivery and setup",
"quantity": 1,
"rate": 300
}
],
"due_date": "2026-11-30",
"reference": "WEB-1187"
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const body = await res.json();import os, requests
import uuid
r = requests.post(
"https://invoicestudio.cc/api/v1/invoices",
headers={"Authorization": f"Bearer {os.environ['INVOICE_STUDIO_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
json={
"client": {
"name": "Emma Clarke",
"email": "emma@sweetcrumbs.example",
},
"currency": "USD",
"items": [
{
"description": "Three-tier wedding cake",
"quantity": 1,
"rate": 950,
},
{
"description": "Delivery and setup",
"quantity": 1,
"rate": 300,
},
],
"due_date": "2026-11-30",
"reference": "WEB-1187",
},
timeout=30,
)
r.raise_for_status()
print(r.json())Response
{
"data": {
"id": 43,
"number": "INV-0043",
"status": "sent",
"currency": "USD",
"total": 1250,
"balance": 1250,
"link": "https://invoicestudio.cc/i/7Hq2xK9pLm"
}
}Clients
/api/v1/clientsclients:readYour contacts (clients and leads), newest first.
| Parameter | Type | Notes |
|---|---|---|
limit | integer | 1 to 200, default 50. |
cursor | string | The next_cursor from the previous page. |
updated_since | string | Only records changed at or after this time (UTC): YYYY-MM-DD or YYYY-MM-DD HH:MM:SS. |
Request
curl "https://invoicestudio.cc/api/v1/clients?limit=100" \
-H "Authorization: Bearer $INVOICE_STUDIO_KEY"const res = await fetch("https://invoicestudio.cc/api/v1/clients?limit=100", {
headers: {
Authorization: `Bearer ${process.env.INVOICE_STUDIO_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).error);
const body = await res.json();import os, requests
r = requests.get(
"https://invoicestudio.cc/api/v1/clients",
params={
"limit": 100,
},
headers={"Authorization": f"Bearer {os.environ['INVOICE_STUDIO_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())Response
{
"data": [
{
"id": 1042,
"name": "Emma Clarke",
"company": "Sweet Crumbs Bakery",
"email": "emma@sweetcrumbs.example",
"phone": "+1 512 555 0142",
"address": "18 Baker St, Austin, TX",
"lifecycle": "customer",
"tags": "wedding,vip",
"source": "Website form",
"website": "https://sweetcrumbs.example",
"created_at": "2026-09-04 10:12:40",
"updated_at": "2026-11-10 08:30:02"
}
],
"next_cursor": "eyJpZCI6NDF9",
"has_more": true
}/api/v1/clients/{id}clients:readOne contact.
| Parameter | Type | Notes |
|---|---|---|
id | integer | Contact id (path). |
Request
curl "https://invoicestudio.cc/api/v1/clients/1042" \
-H "Authorization: Bearer $INVOICE_STUDIO_KEY"const res = await fetch("https://invoicestudio.cc/api/v1/clients/1042", {
headers: {
Authorization: `Bearer ${process.env.INVOICE_STUDIO_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).error);
const body = await res.json();import os, requests
r = requests.get(
"https://invoicestudio.cc/api/v1/clients/1042",
headers={"Authorization": f"Bearer {os.environ['INVOICE_STUDIO_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())Response
{
"data": {
"id": 1042,
"name": "Emma Clarke",
"company": "Sweet Crumbs Bakery",
"email": "emma@sweetcrumbs.example",
"phone": "+1 512 555 0142",
"address": "18 Baker St, Austin, TX",
"lifecycle": "customer",
"tags": "wedding,vip",
"source": "Website form",
"website": "https://sweetcrumbs.example",
"created_at": "2026-09-04 10:12:40",
"updated_at": "2026-11-10 08:30:02"
}
}/api/v1/clientsclients:writeIdempotency-KeyAdd a contact. A contact with the same email or phone returns 409 conflict with the existing contact named in the message. contact.created fires and your automations run.
| Field | Type | Notes |
|---|---|---|
name | string | Required. |
email | string | |
phone | string | |
company | string | |
job_title | string | |
website | string | |
address | string | |
lifecycle | string | lead (default), prospect, customer or inactive. |
tags | string | Comma-separated, up to 12. |
source | string | Where the contact came from. |
notes | string |
Request
curl -X POST "https://invoicestudio.cc/api/v1/clients" \
-H "Authorization: Bearer $INVOICE_STUDIO_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"name": "Liam Ortega",
"email": "liam@ortega.example",
"company": "Ortega Events",
"lifecycle": "lead",
"tags": "events",
"source": "Partner referral"
}'const res = await fetch("https://invoicestudio.cc/api/v1/clients", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.INVOICE_STUDIO_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
"name": "Liam Ortega",
"email": "liam@ortega.example",
"company": "Ortega Events",
"lifecycle": "lead",
"tags": "events",
"source": "Partner referral"
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const body = await res.json();import os, requests
import uuid
r = requests.post(
"https://invoicestudio.cc/api/v1/clients",
headers={"Authorization": f"Bearer {os.environ['INVOICE_STUDIO_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
json={
"name": "Liam Ortega",
"email": "liam@ortega.example",
"company": "Ortega Events",
"lifecycle": "lead",
"tags": "events",
"source": "Partner referral",
},
timeout=30,
)
r.raise_for_status()
print(r.json())Response
{
"data": {
"id": 1043,
"name": "Liam Ortega",
"company": "Ortega Events",
"email": "liam@ortega.example",
"lifecycle": "lead",
"tags": "events",
"source": "Partner referral"
}
}Deals
/api/v1/dealsdeals:readCRM deals with their stage name. value is in major units (1250 = $1,250.00).
| Parameter | Type | Notes |
|---|---|---|
limit | integer | 1 to 200, default 50. |
cursor | string | The next_cursor from the previous page. |
updated_since | string | Only records changed at or after this time (UTC): YYYY-MM-DD or YYYY-MM-DD HH:MM:SS. |
Request
curl "https://invoicestudio.cc/api/v1/deals?limit=50" \
-H "Authorization: Bearer $INVOICE_STUDIO_KEY"const res = await fetch("https://invoicestudio.cc/api/v1/deals?limit=50", {
headers: {
Authorization: `Bearer ${process.env.INVOICE_STUDIO_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).error);
const body = await res.json();import os, requests
r = requests.get(
"https://invoicestudio.cc/api/v1/deals",
params={
"limit": 50,
},
headers={"Authorization": f"Bearer {os.environ['INVOICE_STUDIO_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())Response
{
"data": [
{
"id": 318,
"title": "Sweet Crumbs: wedding cake order",
"value": 1250,
"currency": "USD",
"status": "open",
"stage": "Proposal sent",
"client_id": 1042,
"close_date": "2026-11-30",
"source": "Referral",
"created_at": "2026-10-21 16:45:00",
"updated_at": "2026-11-11 09:15:27"
}
],
"next_cursor": "eyJpZCI6NDF9",
"has_more": true
}/api/v1/deals/{id}deals:readOne deal.
| Parameter | Type | Notes |
|---|---|---|
id | integer | Deal id (path). |
Request
curl "https://invoicestudio.cc/api/v1/deals/318" \
-H "Authorization: Bearer $INVOICE_STUDIO_KEY"const res = await fetch("https://invoicestudio.cc/api/v1/deals/318", {
headers: {
Authorization: `Bearer ${process.env.INVOICE_STUDIO_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).error);
const body = await res.json();import os, requests
r = requests.get(
"https://invoicestudio.cc/api/v1/deals/318",
headers={"Authorization": f"Bearer {os.environ['INVOICE_STUDIO_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())Response
{
"data": {
"id": 318,
"title": "Sweet Crumbs: wedding cake order",
"value": 1250,
"currency": "USD",
"status": "open",
"stage": "Proposal sent",
"client_id": 1042,
"close_date": "2026-11-30",
"source": "Referral",
"created_at": "2026-10-21 16:45:00",
"updated_at": "2026-11-11 09:15:27"
}
}/api/v1/dealsdeals:writeIdempotency-KeyAdd a deal. Without stage_id it goes into the first stage of your default pipeline (or of pipeline_id / pipeline). new_client creates a lead with that name when you have no client_id.
| Field | Type | Notes |
|---|---|---|
title | string | Required. |
value | number | Major units, e.g. 1250. |
currency | string | Default: your business currency. |
stage_id | integer | A stage in your pipeline. |
client_id | integer | An existing contact. |
new_client | string | Name for a new lead. |
close_date | date | YYYY-MM-DD. |
source | string | |
notes | string | |
pipeline_id | integer | Optional. Default: your default pipeline. |
pipeline | string | Optional pipeline name instead of pipeline_id. |
custom_fields | object | Optional {field_key: value} for your deal custom fields. |
Request
curl -X POST "https://invoicestudio.cc/api/v1/deals" \
-H "Authorization: Bearer $INVOICE_STUDIO_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"title": "Ortega Events: spring gala desserts",
"value": 3200,
"currency": "USD",
"client_id": 1043,
"close_date": "2027-02-15",
"source": "Partner referral"
}'const res = await fetch("https://invoicestudio.cc/api/v1/deals", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.INVOICE_STUDIO_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
"title": "Ortega Events: spring gala desserts",
"value": 3200,
"currency": "USD",
"client_id": 1043,
"close_date": "2027-02-15",
"source": "Partner referral"
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const body = await res.json();import os, requests
import uuid
r = requests.post(
"https://invoicestudio.cc/api/v1/deals",
headers={"Authorization": f"Bearer {os.environ['INVOICE_STUDIO_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
json={
"title": "Ortega Events: spring gala desserts",
"value": 3200,
"currency": "USD",
"client_id": 1043,
"close_date": "2027-02-15",
"source": "Partner referral",
},
timeout=30,
)
r.raise_for_status()
print(r.json())Response
{
"data": {
"id": 319,
"title": "Ortega Events: spring gala desserts",
"status": "open"
}
}Payments
/api/v1/paymentspayments:readPayments recorded on your invoices, newest first, with the invoice number and currency. Payments are never edited, so updated_since filters on when the payment was recorded.
| Parameter | Type | Notes |
|---|---|---|
limit | integer | 1 to 200, default 50. |
cursor | string | The next_cursor from the previous page. |
updated_since | string | Only records changed at or after this time (UTC): YYYY-MM-DD or YYYY-MM-DD HH:MM:SS. |
Request
curl "https://invoicestudio.cc/api/v1/payments?limit=50" \
-H "Authorization: Bearer $INVOICE_STUDIO_KEY"const res = await fetch("https://invoicestudio.cc/api/v1/payments?limit=50", {
headers: {
Authorization: `Bearer ${process.env.INVOICE_STUDIO_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).error);
const body = await res.json();import os, requests
r = requests.get(
"https://invoicestudio.cc/api/v1/payments",
params={
"limit": 50,
},
headers={"Authorization": f"Bearer {os.environ['INVOICE_STUDIO_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())Response
{
"data": [
{
"id": 880,
"invoice_id": 42,
"number": "INV-0042",
"amount": 450,
"currency": "USD",
"paid_on": "2026-11-05",
"method": "Bank transfer",
"note": "50% deposit"
}
],
"next_cursor": "eyJpZCI6NDF9",
"has_more": true
}REST hooks
/api/v1/hookswebhooks:readREST hook subscriptions on this account, and the events you can subscribe to.
Request
curl "https://invoicestudio.cc/api/v1/hooks" \
-H "Authorization: Bearer $INVOICE_STUDIO_KEY"const res = await fetch("https://invoicestudio.cc/api/v1/hooks", {
headers: {
Authorization: `Bearer ${process.env.INVOICE_STUDIO_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).error);
const body = await res.json();import os, requests
r = requests.get(
"https://invoicestudio.cc/api/v1/hooks",
headers={"Authorization": f"Bearer {os.environ['INVOICE_STUDIO_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())Response
{
"data": [
{
"id": 12,
"app": "zapier",
"event": "invoice.paid",
"target_url": "https://hooks.zapier.com/…",
"last_status": 200,
"last_at": "2026-11-17 18:02:44",
"fails": 0,
"created_at": "2026-11-14 09:00:00"
}
],
"events": {
"invoice.paid": "Invoice paid in full",
"deal.won": "Deal won",
"…": "…"
}
}/api/v1/hookswebhooks:writeIdempotency-KeySubscribe a URL to one event (the Zapier / Make REST hook pattern). The response has the signing secret.
| Field | Type | Notes |
|---|---|---|
target_url | string | Required. A public https:// address. |
event | string | Required. One event name from GET /hooks. |
Request
curl -X POST "https://invoicestudio.cc/api/v1/hooks" \
-H "Authorization: Bearer $INVOICE_STUDIO_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"target_url": "https://example.com/hooks/invoice-paid",
"event": "invoice.paid"
}'const res = await fetch("https://invoicestudio.cc/api/v1/hooks", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.INVOICE_STUDIO_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
"target_url": "https://example.com/hooks/invoice-paid",
"event": "invoice.paid"
}),
});
if (!res.ok) throw new Error((await res.json()).error);
const body = await res.json();import os, requests
import uuid
r = requests.post(
"https://invoicestudio.cc/api/v1/hooks",
headers={"Authorization": f"Bearer {os.environ['INVOICE_STUDIO_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
json={
"target_url": "https://example.com/hooks/invoice-paid",
"event": "invoice.paid",
},
timeout=30,
)
r.raise_for_status()
print(r.json())Response
{
"id": 13,
"event": "invoice.paid",
"secret": "whsec_3f9a…"
}/api/v1/hooks/{id}webhooks:writeUnsubscribe.
| Parameter | Type | Notes |
|---|---|---|
id | integer | Hook id (path). |
Request
curl -X DELETE "https://invoicestudio.cc/api/v1/hooks/13" \
-H "Authorization: Bearer $INVOICE_STUDIO_KEY"const res = await fetch("https://invoicestudio.cc/api/v1/hooks/13", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.INVOICE_STUDIO_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).error);
const body = await res.json();import os, requests
r = requests.delete(
"https://invoicestudio.cc/api/v1/hooks/13",
headers={"Authorization": f"Bearer {os.environ['INVOICE_STUDIO_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())Response
{
"ok": true
}/api/v1/hooks/sample/{event}Any keyA sample event built from your newest real record, so a Zap or scenario can be mapped before anything happens.
| Parameter | Type | Notes |
|---|---|---|
event | string | Event name (path). |
Request
curl "https://invoicestudio.cc/api/v1/hooks/sample/invoice.paid" \
-H "Authorization: Bearer $INVOICE_STUDIO_KEY"const res = await fetch("https://invoicestudio.cc/api/v1/hooks/sample/invoice.paid", {
headers: {
Authorization: `Bearer ${process.env.INVOICE_STUDIO_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).error);
const body = await res.json();import os, requests
r = requests.get(
"https://invoicestudio.cc/api/v1/hooks/sample/invoice.paid",
headers={"Authorization": f"Bearer {os.environ['INVOICE_STUDIO_KEY']}"},
timeout=30,
)
r.raise_for_status()
print(r.json())Response
[
{
"id": "evt_sample_invoice.paid",
"event": "invoice.paid",
"created_at": "2026-11-18T09:30:00+00:00",
"data": {
"invoice_id": 42,
"invoice": {
"id": 42,
"number": "INV-0042",
"status": "paid",
"currency": "USD",
"total": 1250,
"amount_paid": 1250,
"balance": 0,
"client_name": "Emma Clarke",
"link": "https://invoicestudio.cc/i/7Hq2xK9pLm"
},
"contact": {
"id": 1042,
"name": "Emma Clarke",
"company": "Sweet Crumbs Bakery",
"email": "emma@sweetcrumbs.example"
}
}
}
]/api/v1/openapi.jsonNo key neededThe machine-readable OpenAPI 3 description of every endpoint above. Import it into Postman, Insomnia or a code generator, or give it to an AI coding assistant. Open the OpenAPI spec (JSON).
Pagination
Every list (/invoices, /clients, /deals, /payments) uses cursor pagination. Ask for up to limit=200 rows (default 50); pass the next_cursor you got back as cursor until has_more is false (next_cursor is null on the last page). Rows come newest first. Treat the cursor as opaque.
To sync only what changed, add updated_since (UTC, YYYY-MM-DD or YYYY-MM-DD HH:MM:SS) with the time of your last successful sync. On /payments it filters on when the payment was recorded.
async function* allInvoices(since) {
let cursor = "";
do {
const url = new URL("https://invoicestudio.cc/api/v1/invoices");
url.searchParams.set("limit", "200");
if (since) url.searchParams.set("updated_since", since);
if (cursor) url.searchParams.set("cursor", cursor);
const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.INVOICE_STUDIO_KEY}` } });
const page = await res.json();
yield* page.data;
cursor = page.has_more ? page.next_cursor : "";
} while (cursor);
}
for await (const inv of allInvoices("2026-11-01")) console.log(inv.number, inv.balance);import os, requests
def all_invoices(since=None):
params = {"limit": 200}
if since:
params["updated_since"] = since
while True:
r = requests.get("https://invoicestudio.cc/api/v1/invoices", params=params, timeout=30,
headers={"Authorization": f"Bearer {os.environ['INVOICE_STUDIO_KEY']}"})
r.raise_for_status()
page = r.json()
yield from page["data"]
if not page["has_more"]:
break
params["cursor"] = page["next_cursor"]
for inv in all_invoices("2026-11-01"):
print(inv["number"], inv["balance"])Rate limits
Limits count per API key or per OAuth connection, and MCP calls count too. Every response tells you where you stand. Over a limit, the API answers 429 rate_limited with Retry-After (seconds).
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Requests allowed per minute (120). |
X-RateLimit-Remaining | Requests left this minute. |
X-RateLimit-Reset | Unix time when the minute window ends (the day window when the daily limit is hit). |
X-RateLimit-Limit-Day | Requests allowed per day (5,000). |
X-RateLimit-Remaining-Day | Requests left today. |
Retry-After | On 429 only: seconds to wait before trying again. |
X-Quota-Remaining | API calls left in the plan's monthly quota (unlimited when there is no cap). |
X-Quota-Remaining-AI | On MCP write tools: AI actions left this month. |
HTTP/1.1 429 Too Many Requests
Retry-After: 18
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1795000000
X-RateLimit-Limit-Day: 5000
X-RateLimit-Remaining-Day: 3712
X-Request-Id: req_01JD4W6M2KErrors & retries
Errors use normal HTTP status codes and one JSON shape. error is a sentence you can show to a person, code is stable for your program, errors names invalid fields, and request_id matches the X-Request-Id header that every response carries. Quote it when you contact support. The same three values are repeated in error_detail.
{
"error": "This API key does not have the \"deals:write\" permission. Give it that scope in Settings → API & webhooks (or create a new key).",
"errors": [],
"code": "insufficient_scope",
"request_id": "req_01JD4W6M2K",
"error_detail": {
"code": "insufficient_scope",
"message": "This API key does not have the \"deals:write\" permission. …",
"request_id": "req_01JD4W6M2K"
}
}| Status | code | When | Retry? |
|---|---|---|---|
| 400 | bad_request | The body is not valid JSON or a parameter is wrong. invalid_idempotency_key: the Idempotency-Key header is not 1–255 visible ASCII characters. | No. Fix the request. |
| 401 | unauthorized | No key, a malformed key, or a revoked key or token. | No. Check the Authorization header. |
| 402 | quota_exceeded | The monthly API call or AI action quota of the plan is used up. | Next month, or after an upgrade. |
| 403 | forbidden | The API is off for this account or plan. insufficient_scope: the key or connected app lacks the scope for this call. | No. Use a key with the right scope. |
| 404 | not_found | Unknown endpoint, or the record is not in this workspace. | No. |
| 405 | method_not_allowed | Wrong HTTP method for this path. | No. |
| 409 | conflict | A contact with the same email or phone exists. idempotency_in_progress: a request with this Idempotency-Key is still running. | In progress: yes, after a moment. |
| 413 | payload_too_large | The request body is too large. | No. |
| 422 | validation_error | A field is missing or invalid; errors names the fields. idempotency_mismatch: the key was used with a different body in the last 24 hours. | No. Fix the field or use a new key. |
| 429 | rate_limited | Over 120 requests a minute or 5,000 a day for this key or connection. | Yes, after Retry-After seconds. |
| 500 | server_error | Something failed on our side. | Yes, with backoff. Send the request_id to support if it repeats. |
Retry safely: retry only 429, 500 and 503, network timeouts and 409 idempotency_in_progress. Wait Retry-After when it is sent, otherwise back off exponentially (1 s, 2 s, 4 s … up to 60 s, with jitter). Send an Idempotency-Key on every POST so a retry never creates a second record.
async function call(url, init = {}, tries = 5) {
for (let i = 0; ; i++) {
const res = await fetch(url, init);
if (res.ok) return res.json();
if (![429, 500, 503].includes(res.status) || i >= tries - 1) {
const err = await res.json();
throw new Error(`${err.code}: ${err.error} (${err.request_id})`);
}
const wait = Number(res.headers.get("Retry-After")) || Math.min(60, 2 ** i) + Math.random();
await new Promise((r) => setTimeout(r, wait * 1000));
}
}import random, time, requests
def call(method, url, tries=5, **kw):
for i in range(tries):
r = requests.request(method, url, timeout=30, **kw)
if r.ok:
return r.json()
if r.status_code not in (429, 500, 503) or i == tries - 1:
e = r.json()
raise RuntimeError(f"{e['code']}: {e['error']} ({e['request_id']})")
wait = float(r.headers.get("Retry-After") or min(60, 2 ** i) + random.random())
time.sleep(wait)Idempotency
Networks fail halfway. Send a unique Idempotency-Key header (1–255 visible ASCII characters; a UUID works) with POST /invoices, /clients and /deals, and with MCP write tools. If the same key arrives again from the same API key within 24 hours with the same body, the API returns the first response with Idempotent-Replayed: true instead of creating a second record.
- Same key, different body:
422 idempotency_mismatch. - First request still running:
409 idempotency_in_progress. Wait a moment and retry.
curl -X POST "https://invoicestudio.cc/api/v1/deals" \
-H "Authorization: Bearer $INVOICE_STUDIO_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 6f1c2a4e-1d8b-4f0e-9a51-3c7d2b8e9f10" \
-d '{"title": "Sweet Crumbs: wedding cake order", "value": 1250}'Use one key per logical action (for example your order id), and reuse it only when retrying that exact action.
Sandbox & test keys
Test keys start with is_test_. They work with every endpoint and MCP tool, but only inside a separate sandbox workspace filled with sample clients, deals, invoices and payments. A test key never sees your real data.
- Same URLs, responses and scopes as live keys.
- Test calls do not count toward your monthly quota.
- Webhooks from the sandbox carry
"test": true. - Create test keys next to live keys in Settings → API & webhooks.
- Swap the key in your environment to go live. No code changes.
# development
export INVOICE_STUDIO_KEY="is_test_4b9d…"
# production
export INVOICE_STUDIO_KEY="is_rw_8c1e…"Webhooks
Webhooks POST a JSON event to your HTTPS address the moment something happens. There are two ways to receive them:
Account webhooks
Add up to 10 addresses in Settings → API & webhooks and pick events (or all). The data object holds the ids of what changed; fetch the record with the API.
REST hooks
Subscribe one URL to one event with POST /hooks (Zapier and Make do this for you). Up to 50 per account. data already includes the expanded invoice, deal, order and contact.
POST /your/webhook HTTP/1.1
Content-Type: application/json
User-Agent: InvoiceStudio-Webhooks/1.0
X-InvoiceStudio-Event: invoice.paid
X-InvoiceStudio-Signature: t=1795000000,v1=5f2b8c…e41aEvent catalog
deal.createdA deal is added to the pipeline.
{
"id": "evt_9c1f0a7b2d4e6f81",
"event": "deal.created",
"created_at": "2026-11-18T09:30:00+00:00",
"data": {
"deal_id": 318
}
}deal.stageA deal moves to another open stage.
{
"id": "evt_9c1f0a7b2d4e6f81",
"event": "deal.stage",
"created_at": "2026-11-18T09:30:00+00:00",
"data": {
"deal_id": 318
}
}deal.wonA deal moves to a won stage.
{
"id": "evt_9c1f0a7b2d4e6f81",
"event": "deal.won",
"created_at": "2026-11-18T09:30:00+00:00",
"data": {
"deal_id": 318
}
}deal.lostA deal moves to a lost stage.
{
"id": "evt_9c1f0a7b2d4e6f81",
"event": "deal.lost",
"created_at": "2026-11-18T09:30:00+00:00",
"data": {
"deal_id": 318
}
}contact.createdA contact or lead is added (form, import, API, integration).
{
"id": "evt_9c1f0a7b2d4e6f81",
"event": "contact.created",
"created_at": "2026-11-18T09:30:00+00:00",
"data": {
"client_id": 1042
}
}quote.acceptedA client accepts a quote online.
{
"id": "evt_9c1f0a7b2d4e6f81",
"event": "quote.accepted",
"created_at": "2026-11-18T09:30:00+00:00",
"data": {
"invoice_id": 57
}
}invoice.paidAn invoice is paid in full.
{
"id": "evt_9c1f0a7b2d4e6f81",
"event": "invoice.paid",
"created_at": "2026-11-18T09:30:00+00:00",
"data": {
"invoice_id": 42
}
}invoice.overdueAn invoice passes its due date with money still owed (daily check).
{
"id": "evt_9c1f0a7b2d4e6f81",
"event": "invoice.overdue",
"created_at": "2026-11-18T09:30:00+00:00",
"data": {
"invoice_id": 42
}
}payment.receivedA payment is recorded on an invoice (full or partial).
{
"id": "evt_9c1f0a7b2d4e6f81",
"event": "payment.received",
"created_at": "2026-11-18T09:30:00+00:00",
"data": {
"invoice_id": 42,
"amount_paid": 450,
"status": "partial"
}
}bill.createdA supplier bill is added.
{
"id": "evt_9c1f0a7b2d4e6f81",
"event": "bill.created",
"created_at": "2026-11-18T09:30:00+00:00",
"data": {
"bill_id": 77
}
}order.createdA client work order is created.
{
"id": "evt_9c1f0a7b2d4e6f81",
"event": "order.created",
"created_at": "2026-11-18T09:30:00+00:00",
"data": {
"client_id": 1042,
"order_id": 233
}
}order.statusA work order changes status.
{
"id": "evt_9c1f0a7b2d4e6f81",
"event": "order.status",
"created_at": "2026-11-18T09:30:00+00:00",
"data": {
"client_id": 1042,
"order_id": 233,
"status": "review"
}
}contract.signedA client signs a contract.
{
"id": "evt_9c1f0a7b2d4e6f81",
"event": "contract.signed",
"created_at": "2026-11-18T09:30:00+00:00",
"data": {
"client_id": 1042,
"order_id": 233,
"contract_id": 19
}
}ticket.createdA client opens a support ticket.
{
"id": "evt_9c1f0a7b2d4e6f81",
"event": "ticket.created",
"created_at": "2026-11-18T09:30:00+00:00",
"data": {
"client_id": 1042,
"ticket_id": 61
}
}REST hooks can also subscribe to shop.order, meeting.booked, subscription.created and subscription.cancelled. GET /hooks lists every event; the Test button in the app sends a ping event. Events from the sandbox add "test": true.
Delivery, retries and disabling
- Answer with any 2xx within 4 seconds. Do slow work after you reply.
- Deliveries are sent once, as the event happens; there is no automatic re-delivery. Use
updated_sinceon the list endpoints to catch up after downtime. - Account webhooks switch off after 10 failed deliveries in a row; switch them back on in Settings. A success resets the count.
- REST hooks are removed after 20 failures in a row, or at once when your endpoint answers 410 Gone (how Zapier signals a Zap was turned off).
- Addresses must be public
https://URLs; redirects are not followed.
Verify webhook signatures
Every delivery is signed with the webhook's secret (whsec_…, shown when you add it). The header is X-InvoiceStudio-Signature: t=<unix time>,v1=<hex>, where v1 is HMAC-SHA256 of t + "." + raw body. Check it against the raw request body, compare in constant time and reject timestamps older than 5 minutes.
import crypto from "node:crypto";
import express from "express";
const app = express();
app.post("/hooks/invoice-studio", express.raw({ type: "application/json" }), (req, res) => {
const header = req.get("X-InvoiceStudio-Signature") || "";
const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
const expected = crypto
.createHmac("sha256", process.env.WEBHOOK_SECRET)
.update(`${parts.t}.${req.body}`)
.digest("hex");
const ok = parts.v1 && expected.length === parts.v1.length &&
crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
if (!ok || Math.abs(Date.now() / 1000 - Number(parts.t)) > 300) return res.sendStatus(400);
const event = JSON.parse(req.body);
console.log(event.event, event.data);
res.sendStatus(200);
});import hmac, hashlib, json, os, time
from flask import Flask, request, abort
app = Flask(__name__)
@app.post("/hooks/invoice-studio")
def invoice_studio():
raw = request.get_data()
parts = dict(p.split("=", 1) for p in request.headers.get("X-InvoiceStudio-Signature", "").split(",") if "=" in p)
signed = parts.get("t", "").encode() + b"." + raw
expected = hmac.new(os.environ["WEBHOOK_SECRET"].encode(), signed, hashlib.sha256).hexdigest()
if not hmac.compare_digest(expected, parts.get("v1", "")):
abort(400)
if abs(time.time() - int(parts["t"])) > 300:
abort(400)
event = json.loads(raw)
print(event["event"], event["data"])
return "", 200<?php
$raw = file_get_contents('php://input');
$header = $_SERVER['HTTP_X_INVOICESTUDIO_SIGNATURE'] ?? '';
parse_str(str_replace(',', '&', $header), $parts);
$expected = hash_hmac('sha256', ($parts['t'] ?? '') . '.' . $raw, getenv('WEBHOOK_SECRET'));
if (!hash_equals($expected, $parts['v1'] ?? '') || abs(time() - (int) ($parts['t'] ?? 0)) > 300) {
http_response_code(400);
exit;
}
$event = json_decode($raw, true);
error_log($event['event'] . ' ' . json_encode($event['data']));
http_response_code(200);MCP for AI assistants
Invoice Studio runs a Model Context Protocol server at https://invoicestudio.cc/api/v1/mcp (Streamable HTTP, JSON-RPC 2.0, one message per POST). ChatGPT, Claude, Cursor and other MCP clients can find clients, check payments, move deals and draft invoices, with the same scopes and limits as your keys.
- Read tools need
mcp:read, changesmcp:write, send requestsmcp:send_invoice; each key can also limit the tools. draft_invoicemakes drafts only.request_invoice_sendsends nothing until you approve it in the app.update_deal_stagecannot mark a deal Won. No tool takes payments.- Every tool call is written to the audit log.
curl -X POST "https://invoicestudio.cc/api/v1/mcp" \
-H "Authorization: Bearer $INVOICE_STUDIO_KEY" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Pricing & limits
Included in
Agency plan
$199/month
- REST API with up to 10 active keys
- Account webhooks (10) and REST hooks (50)
- MCP server for AI assistants
- Sandbox test keys
1. Create your account 2. Start the trial on Stripe. Nothing is charged for 14 days; cancel any time before. Or start free on the Free plan.
The API, webhooks and MCP come with the Agency plan, and Agency monthly starts with a 14-day free trial (once per account) so you can build and test against real data first. Free, Starter, Pro, Business and Enterprise do not include API keys; the Zapier and Make apps in the Integrations hub use the same API, so they also need Agency. The account owner can switch API & webhooks off in Settings → Features at any time.
| Limit | Value |
|---|---|
| Rate limit | 120 requests a minute and 5,000 a day, per key or OAuth connection (MCP calls count) |
| API calls a month | 100,000 on Agency. REST and MCP requests together; test keys do not count. Per plan; see pricing |
| AI actions a month | 5,000 on Agency. MCP write tools (moving deals, drafts, send requests, orders, tasks). Over a quota: 402 quota_exceeded. Per plan; see pricing |
| Page size | Up to 200 rows |
| Active keys | 10 per account |
| Webhooks | 10 account webhooks, 50 REST hooks |
Changelog
v1.1 Latest
- Rate limits: 120 a minute and 5,000 a day per key, with
X-RateLimit-*headers and429. - One error format
{error, code, request_id}and anX-Request-Idheader on every response. - Cursor pagination (
cursor,next_cursor,has_more) andupdated_sinceon every list. Idempotency-Keyon every POST.- Fine-grained scopes with presets; every API and MCP call in the audit log.
- Sandbox test keys (
is_test_…). - OpenAPI spec at
/api/v1/openapi.json. - MCP: OAuth sign-in for ChatGPT and other connectors; new tools
find_client,get_client,list_deals,update_deal_stage,get_payment_status,draft_invoice,request_invoice_send. - Monthly API call and AI action quotas per plan (
402 quota_exceeded,X-Quota-Remainingheaders).
- Rate limits: 120 a minute and 5,000 a day per key, with
v1.0
- REST API:
/me,/invoices,/clients,/deals,/payments; create invoices, contacts and deals. - Signed account webhooks for 14 events and REST hooks for Zapier and Make.
- MCP server with
list_orders,get_order,create_order,list_clients,list_invoices,create_task,add_order_message.
- REST API:
Invoice Studio API FAQ
Does Invoice Studio have a public API?
Yes. The REST API at https://invoicestudio.cc/api/v1 reads invoices, clients, deals and payments, creates invoices, contacts and deals, and manages webhook subscriptions. It comes with the Agency plan.
Which plan includes the API, webhooks and MCP?
The Agency plan ($199 a month). The account owner can also switch API & webhooks off in Settings → Features.
How do I authenticate?
Send your API key in the Authorization header as "Bearer is_…". Keys are created in Settings → API & webhooks, shown once, and stored only as a hash.
What are the rate limits?
120 requests a minute and 5,000 a day per key or OAuth connection, MCP calls included. Every response carries X-RateLimit headers; over the limit you get 429 with Retry-After. Each plan also has a monthly API call and AI action quota; over it you get 402 quota_exceeded.
Is there a sandbox?
Yes. Test keys start with is_test_ and only work inside a separate sandbox workspace filled with sample data. They never see real data and do not count toward the monthly quota.
Can an AI assistant send invoices on its own?
No. AI tools can create drafts. Sending needs you to press Approve in the app.