ClientCasa
API

Changelog

Notable changes to the ClientCasa REST API. Each entry lists added, changed, deprecated, and removed items so partner integrations can adapt safely.

ClientCasa uses versioned API endpoints. Breaking v1 changes are listed explicitly under Changed and Removed. Review these entries before updating an integration.

For the TypeScript SDK changelog (per-version codegen diffs), see the @clientcasa/sdk GitHub Releases.

How to read this page

Entries are reverse-chronological. Added = new and safe to use. Changed = behavior changed; the entry states any migration needed. Deprecated = still works but slated for removal in a future major. Removed = no longer available.

Unreleased

Changes that have landed on main and will ship in the next release.

Added — credit notes

  • Credit notes — a new read-only resource under the invoices:read scope. GET /v1/credit-notes lists credit notes, filtered by clientId or status. GET /v1/credit-notes/{id} returns one credit note with its application history. See Credit notes.
  • Four credit note webhook events — credit_note_issued, credit_note_applied, credit_note_unapplied and credit_note_voided. Subscribe to them through webhooks or the Zapier triggers of the same names. See Webhook events.
  • creditApplied and creditRefunded on Invoice — creditApplied is the credit currently applied to the invoice. creditRefunded is the total of the invoice's payments refunded from a credit note. While an invoice is open, balanceDue is total − amountPaid − creditApplied − creditRefunded.
  • Voiding an invoice that has credit applied is refused with invoice_not_closable (409). Ask the account owner to unapply the credit first.

Changed — review books changes before deleting charges and expenses

  • Transaction DELETE can return 409 with error.details.code: transaction_delete_preview_required. Review the amounts and periods in error.details.preview, then repeat DELETE for the same ID with X-Transaction-Delete-Acknowledgement set to the returned acknowledgement. If the preview changes, review the new response before trying again.
  • Transaction GET returns 404 after deletion. Exports keep charges and expenses with posted history and identify them as deleted.

Changed — sent invoices and sales keep what was sent

  • Once an invoice is sent (or a sale is recorded), its amounts, issue date and client are fixed. To correct them, revise the invoice: the client gets the new version and the sent one stays on record. Writes that would change a sent document are refused with a specific details.code (409):
    • issued_document_frozen: the write would change a sent invoice's amounts, issue date or client. Revise it instead.
    • issued_facts_immutable: a sent document's recorded line amounts can't be updated or deleted. Create a new version to correct them.
    • issued_document_delete_refused: a sent invoice or recorded sale can't be deleted. Void it instead. It is also listed on every delete endpoint's 409.
    • issuance_requires_finalization: an invoice can only be sent, and a sale recorded, through its own send or record action.
    • issued_header_mismatch: the document's totals changed while it was being sent, or no longer match its lines.
    • issued_revision_plan_bound: the invoice is part of a payment plan. Review the plan first.
    • issued_revision_blocked: a payment is in progress. Retry after it finishes.
    • issued_revision_unavailable: this invoice can't be changed here yet. Void it and send a new one.
    • issued_revision_superseded: the invoice changed after the revision started. Start again from the sent version.
    • waiver_below_amount_paid: a waiver can't take the total below what's already been paid.
    • waiver_no_reduction: the waiver doesn't lower the invoice total.
    • time_entry_billed: the time entry is on a sent invoice. Revise the invoice to change it.
    • qbo_invoice_refresh_refused: a QuickBooks import couldn't refresh an invoice, because it was edited in ClientCasa, has a payment or change in progress, or changed in a way that needs review. The saved version is kept.

Added — invoice_revised webhook event

  • invoice_revised fires when a sent invoice is revised. It carries the same invoice envelope as invoice_sent. Subscribe to it through webhooks or the Zapier trigger of the same name. See Webhook events.

Changed — project work and stage contracts

  • A project's read pipelineStageId now names the folded stage's labelId, including custom labels. Read foldedStage for category, lifecycle, evidence and readiness.
  • Timeline-item creation starts private: omit visibleTo or use only master, and omit publicVendorIds (an empty array is accepted). REST and MCP add_timeline_item refuse sharing grants with plan_new_placement_private. Create privately, PATCH the draft audience, then explicitly Share changes. The create schemas and generated SDK document only accepted values.

Removed — direct project stage assignment

  • pipelineStageId is removed from ProjectCreate and ProjectUpdate. Supplying it to project POST or PATCH is refused with project_stage_is_derived.
  • Project creation accepts only omitted or active status. Non-active create status is refused with project_stage_is_derived. Record later project lifecycle changes through /api/v1/projects/{id}/acts; stage category follows recorded evidence.

Changed — email sending refusals (2026-10-21)

  • Oversized receipt sends use email_send_too_large (400, not retryable). Only account-volume and recipient-rate limits use email_sending_limit (429, retryable). Suppressed addresses remain email_address_suppressed (409).

Changed — error contract (2026-10-21)

  • Breaking refusal-code clarification in v1, approved during the free-user stage. Some refusals previously grouped under invalid_payload, record_immutable, record_has_dependents, or email_send_blocked now carry the specific details.code values below. Existing generic codes remain for other cases. Update integrations that assumed one generic code; branch on codes, never message text. HTTP status continues to distinguish validation (400), conflicts (409), sending limits (429), and temporary unavailability (503).
  • Declared refusals keep their specific message, including invalid merge fields and locked-document guidance. Internal failures publish safe generic copy; diagnostics remain in operator logs. Zapier receives the same declared refusal as REST.
  • Specific codes added: invoice_amounts_locked, contract_not_deletable, receipt_lines_locked, sale_amounts_locked, quote_lines_locked, time_entry_billed_locked, primary_contact_not_deletable, account_address_reserved, email_address_suppressed, email_sending_limit, testimonial_archived, installment_required, installment_remainder_duplicate, installment_remainder_order, installment_percent_total, depreciation_months_invalid, account_address_invalid, receipt_client_required, receipt_recipients_required, receipt_email_required, email_subject_invalid, email_message_invalid, time_entry_client_required, form_address_required, form_address_invalid, form_condition_invalid, form_step_required, signed_document_revision_forbidden, deposit_invoice_required.

Added

  • Sales — a new read-only resource (scope sales:read): money collected at the moment of the exchange, from the point of sale, the sale composer, or a revenue connector importing an own-Stripe account. Read-only because a sale is born SETTLED — it carries its payment, line items and books entries in one transaction, and its line items are its posted revenue, so there is no field a create or a patch could safely touch. Filter by status, channel, clientId, businessId and date range. ⚠️ total is TAX-INCLUSIVE and will not equal a Schedule C revenue line. GET /v1/sales, GET /v1/sales/{id}. See Sales.

  • saleId on Payment — a payment settling a Sale now names it. The DTO exposed only the invoice arm, so a sale's payment came back with invoiceId: null and nothing to attribute it to. Also available as a list filter: GET /v1/payments?saleId=…. Exactly one of invoiceId / saleId is set.

  • Thirteen webhook events that could not be subscribed to at v1 — the v1 event list had drifted behind the dashboard's and is now derived from it, so it can't drift again. Newly subscribable: all five sale_* events, invoice_refunded, client_reply, client_revision_requested, email_delivery_failed, follow_up_due, payment_processing, receipt_viewed, contract_amended.

  • invoice_refunded now actually fires. It was offered as a subscribable event but no code ever emitted it. It fires once per refund on an invoice, with the refund amount, method and reason.

  • Inquiries — a new write endpoint (scope inquiries:write) for capturing leads from your own website into a ClientCasa organization. Named-field contract (name/email/phone/preferredDate/message + arbitrary labeled fields) — no form-field ids. Runs the full lead lifecycle (lead + contact create/match, inbox seed, owner alert + visitor confirmation) and records a source: external_api form submission you can read back via Form Submissions. POST /v1/inquiries. See Inquiries.

  • Document Versions — a new read-only resource (scope document-versions:read): the audit trail of issued versions across smart-files, invoices, and standalone contracts. Exposes version metadata, lifecycle timestamps, and lineage ids — never the frozen document content or client access tokens. GET /v1/document-versions, GET /v1/document-versions/{id} (issued versions only).

  • Forms — a new read-only resource (scope forms:read): your inquiry and questionnaire form definitions (kind, name, slug, enabled, isDefault). Built in the dashboard designer, so read-only. GET /v1/forms, GET /v1/forms/{id}.

  • Form Submissions — a new read-only resource (scope form-submissions:read): the submitted answers to your forms, with normalized responses. GET /v1/form-submissions, GET /v1/form-submissions/{id}.

  • Client Documents — a new read-only resource (scope client-documents:read): the composer-built proposals and smart-files clients view, sign, and pay. Exposes kind, title, status, the linked contact/client/project, and conversion lineage (engagementProjectId, quoteConvertedAt). Templates are excluded. GET /v1/client-documents, GET /v1/client-documents/{id}.

  • disputeTotal and unattributedTotal on Payout — the two terms that were missing from the payout reconciliation column. With both, a deposit closes on the public DTO alone: grossTotal - feeTotal - refundTotal - disputeTotal + unattributedTotal = amount. They ship together because either one alone leaves a term you cannot see.

    unattributedTotal — on a manual payout, how much of the deposit could not be matched to a payment. Stripe does not report which payments a manual payout contained, so the deposit is reconstructed from the balance transactions available when it was requested, and this is the remainder. null means NOT RECORDED: either the question does not apply (an automatic payout, whose contents Stripe reports exactly) or it was never asked (a payout synced before the field existed). 0 means the reconstruction ran and matched every balance transaction. Above 0 is real money in the deposit that no payment accounts for — not a fee, not a refund, not a dispute. Use the automatic field on the same object to tell "not applicable" from "not recorded".

    disputeTotal — the dispute withdrawals (chargebacks and dispute fees) Stripe took out of the deposit, as a positive amount, bucketed apart from fees and refunds. null means NOT RECORDED: the deposit was reconciled before dispute withdrawals were bucketed separately, or has not been reconciled yet. On those older rows a dispute was counted in paymentCount but landed in no bucket, so the identity above is short by exactly that amount — which is why the field reads null rather than 0. 0 means the deposit was examined and carried no dispute activity. Unlike unattributedTotal, this applies to automatic and manual payouts alike.

    ⚠️ Both are nullable, and null is not 0 on either. Coalescing reports a tie-out nobody verified. They are nullable for different reasons — unattributedTotal has an arm where the question does not apply; disputeTotal does not, and is nullable only because its column was added to a populated table — but the consumer-facing rule is the same: carry the null through, and treat an unknown term as unknown rather than as zero.

  • lastReconciledAt on Payout — when we last matched the deposit against your payments and computed the totals on it. null means we never have: grossTotal, feeTotal, refundTotal and paymentCount are all null alongside it, and every one of them is unknown rather than zero. A payout row is created from the Stripe payout object first and reconciled second, so a deposit whose reconciliation has not run — or failed — is a real and durable state. Its amount, arrivalDate, status, automatic and bank details come straight from Stripe and remain accurate on such a row.

    ⚠️ A non-null value does not imply every total is a number. disputeTotal stays null on deposits reconciled before dispute withdrawals were bucketed separately, and on those rows the identity is short by exactly the dispute amount. lastReconciledAt != null && disputeTotal == null is the signature of that population.

    ⚠️ Deposits reconciled before this field existed carry a backfilled value — the row's last-modified time, which for those deposits is the instant of their last sync. It is accurate to the sync rather than independently observed, so treat it at day resolution.

  • Clients — added taxSettings and invoiceRemindersEnabled (read + write), plus read-only recurringBilling ({ status, nextBillingDate }) and sourceSubmissionId.

  • Invoices — added read-only supersedesInvoice (void→reissue lineage) and a ?supersedesInvoice={id} list filter for the forward link.

Changed

  • Form Submissions — formId is now nullable. Submissions ingested via POST /v1/inquiries have no parent form (their answer schema is self-describing); form-originated submissions still carry their formId. Code that assumed formId is always present should handle null.

  • Payouts — grossTotal, feeTotal, refundTotal and paymentCount are now nullable. They were always 0 on a deposit that had not been reconciled, which was indistinguishable from a deposit that was reconciled and genuinely contained nothing — a zero meaning "we did not look" printed as one meaning "there is nothing there". They are null exactly when lastReconciledAt is null, so the new field is the reason for the widening and the way to read it. Code that assumed these are always numbers should handle null; do not coalesce to 0.

    paymentCount also loses its stored default of 0. Deposits that were never reconciled previously reported 0 payments from the moment they were created; they now report null. The outbound webhook payload omits the key for those deposits rather than sending 0.

All backwards-compatible — existing integrations are unaffected. Regenerate the SDK to pick up the new endpoints, fields, and the widened formId and payout totals.

2026-05-19 — v1.0.0 (initial release)

The public v1 API ships with 13 resources. Leads are not a separate resource — a lead is a client at an early lifecycle stage, fetched via /v1/clients?status=new|contacted|qualified.

Resources

  • Clients — list/create/get/update/delete (clients:read, clients:write)
  • Contacts — list/create/get/update/delete (contacts:read, contacts:write)
  • Projects — list/create/get/update/delete (projects:read, projects:write)
  • Invoices — list/create/get/update/delete (invoices:read, invoices:write). Status is payment-derived. Only draft, sent, void writable via the API (paid/partial/overdue are system-managed).
  • Contracts — list/create/get/update/delete (contracts:read, contracts:write). Create produces drafts only. Signing flow + Tiptap content are dashboard-managed.
  • Payments — list/create/get/update (payments:read, payments:write). Immutable after creation. No DELETE — refunds are negative-amount entries with kind=refund and refundOfId referencing the original.
  • Payouts — list/get (payouts:read). Read-only; Stripe-managed.
  • Time Entries — list/create/get/update/delete (time-entries:read, time-entries:write)
  • Milestones — list/create/get/update/delete (milestones:read, milestones:write). Polymorphic parent: parentType: 'projects' | 'client-documents'.
  • Calendar Events — list/create/get/update/delete (calendar-events:read, calendar-events:write). Events synced from Google/Microsoft/Apple are read-only.
  • Transactions — list/create/get/update/delete (transactions:read, transactions:write)
  • Catalog Items — list/create/get/update/delete (catalog-items:read, catalog-items:write)
  • Webhooks — list/create/get/update/delete (webhooks:read, webhooks:write). secret is write-only — never returned in any response. Each webhook gets a derived hasSecret: boolean instead.

Authentication

  • API keys — create at Settings → API Keys. Send as x-api-key header or Authorization: Bearer.
  • OAuth 2.0 with PKCE — for third-party apps acting on behalf of a user. Register apps at Settings → OAuth Apps. Access tokens are JWTs with an organizationId claim, valid for 1 hour; refresh tokens valid for 30 days.

Cross-cutting features

  • Standard error envelope — { error: { code, message, requestId, details? } }
  • Pagination — page/pageSize query params; max page size 100
  • Idempotency — Idempotency-Key header on POST/PATCH; 24-hour replay window
  • Rate limits — 1000 req/hour per key, with X-RateLimit-Limit/Remaining/Reset headers and Retry-After on 429
  • Cross-org isolation — resources outside your org return 404 not_found (not 403), preventing existence leaks

TypeScript SDK

Initial release of @clientcasa/sdk on npm. Stripe-style namespaced methods (cc.clients.listClients(), cc.invoices.createInvoice(), etc.), runtime Zod validation, typed errors, auto-retries, pagination iterators. Published via OIDC Trusted Publishing with provenance attestation.


Reporting issues

For API bugs, scope confusion, or breaking-change concerns, open an issue at clientcasa/sdk-typescript. For security reports, see SECURITY.md.

On this page