> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api.docs.modulards.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.docs.modulards.com/_mcp/server.

# Clients

The organization's customers, assigned to websites. Catalog: `app/Http/Queries/JsonApi/ClientQuery.php`. Attributes: `name` (required to create), `last_name`, `company`, `created_at`, `updated_at`; `sites_count` is computed - request it with `fields[clients]=sites_count` or sort by it - and only counts the websites the acting member can reach.

Public filters: `id[]` (exact client ids), `s` (search over name/last_name/company), `sites[]` (website ids), `channel` (`email`|`phone`). Public sorts: `name` (default, ascending), `last_name`, `company`, `created_at`, `sites_count`. Public includes: `contact_methods`, `sites`.

Deletion is selection-only through `bulk-destroy`; there is no single-record destroy. A Client keeps at most one email and one conventional phone, each replaced independently under `/clients/{client}/contact-methods` (`store` replaces the method of the same channel, `update` changes only `value`, `channel` is never accepted on update).

Writes are creator-scoped: a collaborator manages only the Clients they created; an administrator or a global manager (a permission, not a role) manages every Client of the organization. A Contact id resolved on a Client route, or a Client id resolved on a Contact route, answers 404 - the two share one underlying `contacts` table but are never interchangeable.