# /legacy-systems/counts - Replace the legacy systems counters **PUT /legacy-systems/counts** Stores how many systems each organization still has on the old my (legacy.my.nethesis.it). Called by the legacy sync with the owner API key, once per run; the values come back through `legacy` in /systems/totals and through `legacy_systems_count` in the organization stats and lists. The payload is the COMPLETE picture and replaces the stored counters wholesale: an organization missing from it is an organization with no legacy systems left. That is what lets a counter fall back to zero as machines migrate, which an upsert-only endpoint could never do. An empty `counts` array is therefore legitimate and clears every counter. Restricted to the Owner organization: the payload spans the whole fleet, so a partner writing it could inflate or erase any other partner's counter. Transitional endpoint: it exists for as long as two portals answer for the same partner, and is removed at the legacy decommission. ## Servers - Backend API server (port 8080): https://api.your-domain.com/api (Backend API server (port 8080)) - Collect API server (port 8081): https://collect.your-domain.com/api (Collect API server (port 8081)) ## Authentication methods - Bearer auth ## Parameters ### Body: application/json (object) - **counts** (array[object]) ## Responses ### 200 Counters stored #### Body: application/json (object) - **code** (integer) - **message** (string) - **data** (object) ### 400 Bad request - validation error #### Body: application/json (object) - **code** (integer) HTTP error code - **message** (string) Error message - **data** (object) ### 401 Unauthorized - invalid or missing token #### Body: application/json (object) - **code** (integer) - **message** (string) - **data** (object | null) ### 403 Forbidden - insufficient permissions #### Body: application/json (object) - **code** (integer) - **message** (string) - **data** (object | null) ### 500 Internal server error #### Body: application/json (object) - **code** (integer) - **message** (string) - **data** (object | null) [Powered by Bump.sh](https://bump.sh)