# unarchive_sites

Source: https://modulify.ai/docs/api/sites/unarchive-sites

Brings one or more archived sites back out of the Archive, at most 200 per call.

- Title: Unarchive sites
- Scope: `sites:write`
- Access: Makes changes
- Endpoint: `POST /v1/unarchive_sites`

The sites show in the dashboard lists and `list_sites` again. A site that was in a folder when it was archived goes back into that folder when the folder still exists, and otherwise lands in the main list outside any folder. Nothing is published or unpublished.

Sites from another workspace, sites that are not archived and deleted sites are skipped rather than failing the call, so read `unarchivedIds` in the response to see what came back. When every site is skipped, the whole call is refused. See [Archive projects](https://modulify.ai/docs/projects/archive#unarchive-a-project).

## Request

Call it with a `POST` to `https://api.modulify.ai/v1/unarchive_sites`, sending the inputs below as a JSON object. The token needs the `sites:write` scope.

It makes changes, so send an [Idempotency-Key](https://modulify.ai/docs/api/idempotency) header whenever you might retry it. A retry with the same key gets the first answer back instead of running again.

```bash
curl -X POST https://api.modulify.ai/v1/unarchive_sites \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"workspaceId":"WORKSPACE_ID","projectIds":[]}'
```

Over MCP, the same method is the [unarchive_sites tool](https://modulify.ai/docs/mcp/sites/unarchive-sites).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `workspaceId` | string | Yes | The workspace the sites belong to. |
| `projectIds` | array of strings | Yes | The archived site ids to bring back, from `list_sites` called with `archived` as true, at most 200. |

## Response

Every call answers with the [JSON envelope](https://modulify.ai/docs/api/requests-and-responses#the-response) 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](https://modulify.ai/docs/api/requests-and-responses#headers-on-every-method-call) 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](https://modulify.ai/docs/api/errors) explains every status code a call can answer with.