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_.
| Operation | Method and path | Scope |
|---|---|---|
list-clients | GET /clients | clients:read |
get-client | GET /clients/{clientID} | clients:read |
create-client | POST /clients | clients:write |
update-client | PATCH /clients/{clientID} | clients:write |
archive-client | POST /clients/{clientID}/archive | clients:write |
restore-client | POST /clients/{clientID}/restore | clients:write |
delete-client | DELETE /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"
}
nameis required, up to 200 characters.contactsis a list of up to 20 people; each needs aname, andemail, 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.billingAddresshas the optional fieldsline1,line2,city,region,postalCodeandcountry(200 characters each). On update it is replaced as a whole. Empty fields are returned as empty strings.defaultTermsis 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) andnotes(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;0means 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 returns422. 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).
| Field | Type | Rules |
|---|---|---|
kind | string | due_on_receipt, net_days or custom. Required. |
days | integer | Days 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. |
depositPercent | string, optional | A 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. |
milestoneLabel | string, optional | Up to 80 characters, printed on documents. |
lateFeeText | string, optional | Up to 120 characters, printed on documents. Informational: no fee is calculated or charged. |
note | string, optional | Up 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.
Payee link
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-clientwithoutpayeeIdcreates a payee named after the client (it appears in the payee list and counts toward the payee ceiling like any other). Give an existingpayeeIdof this workspace to link that payee instead; an unknown or foreign payee returns404payeeNotFound.update-clientwith a differentpayeeIdrelinks the client. A payee that has been merged into another payee is refused withclientPayeeMerged; link the payee it was merged into.- The link follows payee merges.
merge-payeesrepoints every client whose payee was merged away to the surviving payee, and counts those clients inupdatedReferenceCount. - A payee that a client uses can't be deleted:
delete-payeereturnspayeeIsLinkedToAClientAndCannotBeDeleted. 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
402PLAN_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
409CLIENT_IN_USEwhile business records reference it, projects included (details.resourceisproject), and so are quotes and invoices made for the client alone, drafts too (quote,invoice). Thedetails.resourcefield 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 returns422and names the key. - Write:
metadatais optional on create and on update. On update the pairs are merged per key: a value sets or overwrites the key,nullor""removes it,{}changes nothing, and"metadata": nullremoves every key. On create,nulland""values are ignored. - Archived clients stay metadata-writable.
- Filter:
list-clientstakes an exact-match filter writtenmetadata[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 (
409WORKSPACE_HAS_BUSINESS_DATA). - Clients are part of workspace backups. A backup that holds clients can only
be restored into a business workspace (
409WORKSPACE_NOT_BUSINESSotherwise); restored clients get new IDs and are linked to the restored payees. The restore also counts the archive's active clients againstclients.max(402PLAN_LIMIT_EXCEEDEDwhen they don't fit). - The data export (
data.json) has aclientsarray, and the archive has aclients.csvfile (id,name,code,payeeId,taxId,archived). Each client indata.jsonalso carriesdefaultTermswhen it has them. Each record indata.jsoncarries itsmetadataobject (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
| Status | Code | Meaning |
|---|---|---|
402 | PLAN_LIMIT_EXCEEDED (clients.max) | No client place left on the plan (create, restore). |
402 | PLAN_FEATURE_REQUIRED | The plan does not include clients (create, update, restore). |
404 | CLIENT_NOT_FOUND | No such client in this workspace. |
409 | WORKSPACE_NOT_BUSINESS | The workspace is personal. |
409 | CLIENT_CODE_TAKEN | Another client in the workspace uses the code. details.code repeats it. |
409 | CLIENT_CODE_IN_USE | A numbered document was built from the client's code, so it can't change. |
422 | invalidPaymentTermsKind, invalidPaymentTermsDays, invalidPaymentTermsDeposit, invalidPaymentTermsText | The payment terms break the rules in Payment terms. |
409 | CLIENT_IN_USE | Business records reference the client, so it can't be deleted. |