Update a client's websites
Adds websites to a client and removes websites from it, in one call. Use it to keep the websites of a customer up to date. Adding a website the client already has, or removing one it does not have, changes nothing, so a retried call ends in the same state.
Removing a website also removes the client from that website’s scheduled report recipients. Your role must be allowed to change the client’s websites: a collaborator can change the websites of only the clients they created; anyone else without the permission gets 404.
Body
add_sites(array of integers, required unlessremove_sitesis sent): ids of the websites to assign.remove_sites(array of integers, required unlessadd_sitesis sent): ids of the websites to take away.
Errors
- 422: an id is listed in both
add_sitesandremove_sites, or an id is not a website. A website your token cannot reach, for example one of another organization, is ignored without an error.
Authentication
AuthorizationBearer
Personal access token created in the Modular DS dashboard; read-only tokens can only call GET endpoints.
Path parameters
client_id
Request
This endpoint expects an object.
add_sites
Response
200 - Client with updated sites
data
jsonapi
Errors
422
Unprocessable Entity Error
