Skip to navigation

Update a client's websites

View as MarkdownOpen in Claude

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 unless remove_sites is sent): ids of the websites to assign.
  • remove_sites (array of integers, required unless add_sites is sent): ids of the websites to take away.

Errors

  • 422: an id is listed in both add_sites and remove_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_idstringRequired

Request

This endpoint expects an object.
add_siteslist of doublesOptional

Response

200 - Client with updated sites

dataobjectOptional
jsonapiobjectOptional

Errors

422
Unprocessable Entity Error