Update client sites
Authentication
Personal access token created in the Modular DS dashboard; read-only tokens can only call GET endpoints.
Path parameters
Request
Response
200 - Client with updated sites
Personal access token created in the Modular DS dashboard; read-only tokens can only call GET endpoints.
200 - Client with updated sites
Adds and/or removes websites on the Client. Both directions are idempotent - the same contract as a website’s tags - so a retried call converges on the same state. Answers 200 with the updated Client.
Body (JSON):
add_sites (integer array, required without remove_sites) - website ids to attach.remove_sites (integer array, required without add_sites) - website ids to detach.A website id listed in both directions is rejected (422). add_sites.*/remove_sites.* validate existence only (Rule::exists is unscoped by ownership) - a website of another organization is silently ignored rather than rejected. Removing a website also removes the Client from that website’s scheduled report recipient selections.
Requires a full-access token and the Client’s updateSites permission: a collaborator without it, or who did not create the Client, is denied as 404.