Update site service status

View as MarkdownOpen in Claude
Pauses or resumes one data service of a site — today only the WooCommerce store-statistics service. The new state is explicit, never a toggle, so repeating the call is a no-op. Path variables: - `site` (integer): exact site id, e.g. `12345`. Sites of other organizations answer 404. - `type` (string): service type. Only `woocommerce` is routable — any other value answers 404 at the route constraint. Body parameters: - `status` (string, required): `active` or `inactive`. Anything else answers 422 with a JSON:API errors document. Answers 200 with the `sites` resource document; `data.attributes` carries the usual site attributes plus `service_type`, `service_status`, `service_is_active` and `service_is_configured`. Resuming is a request, not a promise: a site without WooCommerce (or below the minimum supported version) answers 200 with `service_status: "inactive"`. A site that is not connected answers 400 (error code `904002`) — the endpoint carries the same connected-site gate as the dashboard. A read-only token answers 403; a site with no such service row answers 404. The MCP twin of this endpoint is the `sites-services-status-update` tool.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

sitestringRequired
typestringRequired

Request

This endpoint expects an object.
statusstringRequired

Response

Successful response