Skip to main content

Clients

A client is someone a business workspace bills. Clients exist only in business workspaces; every operation below returns 409 WORKSPACE_NOT_BUSINESS in a personal workspace. They are part of the Solo Business plan.

All paths are under /v1/workspaces/{workspaceID}/clients. Client IDs start with cli_.

OperationMethod and pathScope
list-clientsGET /clientsclients:read
get-clientGET /clients/{clientID}clients:read
create-clientPOST /clientsclients:write
update-clientPATCH /clients/{clientID}clients:write
archive-clientPOST /clients/{clientID}/archiveclients:write
restore-clientPOST /clients/{clientID}/restoreclients:write
delete-clientDELETE /clients/{clientID}clients:write

The clients:write scope is not offered to connected apps (OAuth or MCP clients), even with read and write access; clients:read is. See Scopes.

The client object​

{
"id": "cli_...",
"name": "Acme Design Studio",
"code": "ADS",
"payeeId": "vnd_...",
"contacts": [
{ "name": "Dana Example", "role": "Finance", "email": "dana@example.test", "phone": "+1 555 0100" }
],
"billingAddress": { "line1": "1 Example Way", "city": "Sampletown", "postalCode": "00000", "country": "Exampleland" },
"defaultTerms": {
"kind": "net_days",
"days": 30,
"depositPercent": "25",
"lateFeeText": "1.5% per month",
"label": { "key": "systemText.paymentTerms.netDays", "params": { "days": "30" }, "text": "Net 30" }
},
"taxId": "XX 123456",
"taxSetAsideBasisPoints": 3000,
"notes": "Pays within 14 days",
"metadata": { "external_id": "ABC-123" },
"archivedAt": null,
"createdAt": "2026-11-12T10:00:00Z",
"updatedAt": "2026-11-12T10:00:00Z"
}
  • name is required, up to 200 characters.
  • contacts is a list of up to 20 people; each needs a name, and email, when given, must be a plain email address. Every text field is at most 200 characters. On update the list is replaced as a whole.
  • billingAddress has the optional fields line1, line2, city, region, postalCode and country (200 characters each). On update it is replaced as a whole. Empty fields are returned as empty strings.
  • defaultTerms is optional: the payment terms new invoices for this client start from. It is left out of the response when the client has none.
  • taxId (64 characters) and notes (4000 characters) are free text.
  • taxSetAsideBasisPoints (0 to 10000, 2500 = 25%) is optional: this client's own tax set-aside share, replacing the business profile's for its payments; 0 means no set-aside for this client. It is left out of the response when the profile's share applies. On update, send "clear": ["taxSetAside"] to go back to the profile's share. A value outside the range returns 422. See Tax set-aside.
  • Amounts are not part of a client. Money on later business records uses the workspace's currency.

Tax set-aside​

A client can carry its own taxSetAsideBasisPoints, which replaces the business profile's share for that client's payments. How a set-aside is suggested and confirmed is described under invoices.

Payment terms​

defaultTerms holds a client's optional payment terms. A client has none unless you set them, and nothing in the API requires terms anywhere. The same object is used by a project's termsOverride (see Projects).

FieldTypeRules
kindstringdue_on_receipt, net_days or custom. Required.
daysintegerDays after the issue date. 0 for due_on_receipt; one of 7, 15, 30, 45 or 60 for net_days; 0 to 365 for custom.
depositPercentstring, optionalA decimal from 0 to 100 with up to four decimals, such as "12.5". Stored as given, without trailing zeros ("12.5000" is returned as "12.5"). A suggestion only: it prefills a deposit amount and the user confirms it: when a quote sets no deposit of its own, deposit.suggested of the quote billing report is this percentage of the quote total.
milestoneLabelstring, optionalUp to 80 characters, printed on documents.
lateFeeTextstring, optionalUp to 120 characters, printed on documents. Informational: no fee is calculated or charged.
notestring, optionalUp to 300 characters, printed under the terms.

Text lengths are counted in characters and surrounding spaces are trimmed. Responses add a label (a translation key with params, and the English text as fallback): Due on receipt for zero days, otherwise Net 30 and so on. label is output only; don't send it.

On update-client, defaultTerms replaces the whole object, so fields you leave out of it are removed. Leave defaultTerms out of the request to keep the current terms, or list it in clear ("clear": ["defaultTerms"]) to remove them. An archived client keeps its terms.

Terms that break these rules return 422 with one of the typed validation errors invalidPaymentTermsKind, invalidPaymentTermsDays, invalidPaymentTermsDeposit or invalidPaymentTermsText.

When an invoice needs terms, the first of these that exists applies: the invoice's own terms, the project's termsOverride, the client's defaultTerms, otherwise none. A project without an override uses its client's terms.

Short code​

code is a short code of 2 to 8 letters or digits, stored in upper case, and unique within the workspace. It fills the {CLIENT} placeholder of document numbers. Leave it out when creating a client and it is derived from the name: the initials of the words (Acme Design Studio becomes ADS) or the first four letters of a single word (Acme becomes ACME), with a number added when that is taken (ADS2). Accents are dropped (Müller gives MULL); a name with no Latin letters or digits gives CL.

A code already used by another client of the workspace, archived clients included, is refused with 409 CLIENT_CODE_TAKEN. Archived clients keep their code because numbers already issued with it must stay unique. Codes are unique per workspace, not across workspaces.

A client's code can't be changed once documents carry a number built from it: update-client returns 409 CLIENT_CODE_IN_USE, and details.resource names the kind of record. That is the case once the client has a sent quote or an issued invoice, for one of its projects or for the client alone; a draft has no number yet. Everything else about the client stays editable. Until a numbered document exists, the code can be changed freely.

Every client is linked to a payee through payeeId, so money received from the client is recorded against a payee the bank feed already knows.

  • create-client without payeeId creates a payee named after the client (it appears in the payee list and counts toward the payee ceiling like any other). Give an existing payeeId of this workspace to link that payee instead; an unknown or foreign payee returns 404 payeeNotFound.
  • update-client with a different payeeId relinks the client. A payee that has been merged into another payee is refused with clientPayeeMerged; link the payee it was merged into.
  • The link follows payee merges. merge-payees repoints every client whose payee was merged away to the surviving payee, and counts those clients in updatedReferenceCount.
  • A payee that a client uses can't be deleted: delete-payee returns payeeIsLinkedToAClientAndCannotBeDeleted. Archived clients still count, so delete the client or relink it to another payee first.
  • Deleting a client keeps its payee.

Archiving, restoring and deleting​

  • Archive hides the client from the default list and frees its place under the plan's client limit. It keeps its code, payee link and data. Archiving an archived client changes nothing.
  • Restore brings it back and counts it against the limit again, so it returns 402 PLAN_LIMIT_EXCEEDED (clients.max) when the plan has no room. Restoring an active client changes nothing.
  • Delete (owners and admins only) removes the client for good, and is refused with 409 CLIENT_IN_USE while business records reference it, projects included (details.resource is project), and so are quotes and invoices made for the client alone, drafts too (quote, invoice). The details.resource field names the kind of record; archive the client instead.

list-clients takes status (active, the default, archived or all), name (case-insensitive substring), page and pageSize (default 100, max 1000) and returns { clients, total, page, pageSize }, ordered by name.

Metadata​

A client carries your own key/value pairs in a metadata object, always present and {} when empty, for an external ID or any other reference from your own systems. It is internal: it is never printed on a document, snapshot, share link or email. The rules are the same for every record and are described once under Metadata.

  • Limits: at most 50 keys. A key is 1 to 40 characters from A-Z a-z 0-9 _ . -, a value 1 to 500 characters. A request that breaks a limit returns 422 and names the key.
  • Write: metadata is optional on create and on update. On update the pairs are merged per key: a value sets or overwrites the key, null or "" removes it, {} changes nothing, and "metadata": null removes every key. On create, null and "" values are ignored.
  • Archived clients stay metadata-writable.
  • Filter: list-clients takes an exact-match filter written metadata[key]=value. Several keys are AND-ed (at most 10), and it combines with the other filters:
GET /v1/workspaces/{workspaceID}/clients?metadata[external_id]=ABC-123
  • Access: the same scopes, role rules and plan feature as the rest of the record. No new scope.

Plan limit and downgrades​

Clients that are not archived count against the plan's clients.max, summed over all the workspaces the account owner owns (Solo Business is unlimited; other plans have none). create-client and restore-client return 402 PLAN_LIMIT_EXCEEDED with limit_key clients.max when no place is left.

Creating, editing and restoring clients also need a plan that includes clients, and return 402 PLAN_FEATURE_REQUIRED otherwise. Reading clients stays possible after a downgrade, so existing data is never hidden.

When a downgrade leaves the account over the client limit the whole account is read-only, exactly as for any other exceeded limit (423 plan_limits_exceeded, with the clients limit key and the action reduce_clients). archive-client and delete-client stay open while read-only, because they get the account back under the limit.

Workspace conversion, backup, export and clone​

  • A business workspace with any client, archived ones included, can't be converted back to personal (409 WORKSPACE_HAS_BUSINESS_DATA).
  • Clients are part of workspace backups. A backup that holds clients can only be restored into a business workspace (409 WORKSPACE_NOT_BUSINESS otherwise); restored clients get new IDs and are linked to the restored payees. The restore also counts the archive's active clients against clients.max (402 PLAN_LIMIT_EXCEEDED when they don't fit).
  • The data export (data.json) has a clients array, and the archive has a clients.csv file (id, name, code, payeeId, taxId, archived). Each client in data.json also carries defaultTerms when it has them. Each record in data.json carries its metadata object (always present, {} when empty; an additive field of format version 1).
  • Metadata is part of backups and clones, restored and copied with the client.
  • Cloning a business workspace copies its clients, with their payee links pointing at the clone's own payees. Active clients count against the cloner's client limit.

Events​

Each change publishes an event in the same transaction: client.created, client.updated (with changes for name, code and payee_id), client.archived, client.restored and client.deleted. They carry the client's ID, name, code, payee, archived flag and metadata, and no contact details. They are public webhook events: subscribe to them (or to client.*) on a webhook endpoint (see Webhook events), and read them from event history and the event stream. Reading them needs the clients:read scope in addition to events:read (event history and stream) or webhooks:read (the event catalog).

Errors​

StatusCodeMeaning
402PLAN_LIMIT_EXCEEDED (clients.max)No client place left on the plan (create, restore).
402PLAN_FEATURE_REQUIREDThe plan does not include clients (create, update, restore).
404CLIENT_NOT_FOUNDNo such client in this workspace.
409WORKSPACE_NOT_BUSINESSThe workspace is personal.
409CLIENT_CODE_TAKENAnother client in the workspace uses the code. details.code repeats it.
409CLIENT_CODE_IN_USEA numbered document was built from the client's code, so it can't change.
422invalidPaymentTermsKind, invalidPaymentTermsDays, invalidPaymentTermsDeposit, invalidPaymentTermsTextThe payment terms break the rules in Payment terms.
409CLIENT_IN_USEBusiness records reference the client, so it can't be deleted.