Archive sites
archive_sites
Puts one or more sites in the Archive of their workspace, at most 200 per call.
Archived sites leave the dashboard lists and list_sites, unless list_sites is called with archived as true, but they still count toward the plan and are billed exactly the same. A site in a folder leaves that folder, and unarchive_sites puts it back there when the folder still exists.
Archiving never unpublishes, so a live site stays live. If you also want it offline, the tool tells the client to confirm with you first and then call unpublish_site, which needs publish:write.
Sites from another workspace, sites already archived and deleted sites are skipped rather than failing the call, so read archivedIds in the response to see what was archived. When every site is skipped, the whole call is refused. See Archive projects.
Request
Call it with a POST to https://api.modulify.ai/v1/archive_sites, sending the inputs below as a JSON object. The token needs the sites:write scope.
It makes changes, so send an Idempotency-Key header whenever you might retry it. A retry with the same key gets the first answer back instead of running again.
curl -X POST https://api.modulify.ai/v1/archive_sites \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"workspaceId":"WORKSPACE_ID","projectIds":[]}'Over MCP, the same method is the archive_sites tool.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
workspaceId |
string | Yes | The workspace the sites belong to. |
projectIds |
array of strings | Yes | The site ids to archive, from list_sites, at most 200. |
Response
Every call answers with the JSON envelope of success, message, data, code and version. data holds the result described above, and on a method that returns a total, count carries it. The response headers carry the call's X-Request-Id and what is left of your per-minute budget in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Errors explains every status code a call can answer with.