# rename_site

Source: https://modulify.ai/docs/api/sites/rename-site

Changes the name, description or infrastructure location of a site.

- Title: Rename or describe a site
- Scope: `sites:write`
- Access: Makes changes
- Endpoint: `POST /v1/rename_site`

Send only the fields you want to change, and anything you leave out stays as it is. A locked site refuses every change.

The public web addresses of a site are its subdomain and its custom domains, and neither changes here. `change_subdomain` changes the subdomain, and `add_custom_domain` and the other custom domain tools manage the domains.

A new `region` moves the published site to that infrastructure location on its next publish, so a live site keeps serving from the old one until then. The same publish moves the site's database to the data area of the new region, and the site is offline while the database is copied. Uploaded files follow in the background after that publish, without taking the site offline. Changing it needs a paid plan. On a free workspace the value is accepted and ignored and the call still reports success, so compare the `Region` in the answer, which is the region the site is actually on, with the one you sent. See [Project settings](https://modulify.ai/docs/editor/settings).

## Request

Call it with a `POST` to `https://api.modulify.ai/v1/rename_site`, 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/rename_site \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"projectId":"PROJECT_ID"}'
```

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

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id. |
| `name` | string | No | The new name, 3 to 64 characters. |
| `description` | string | No | The new description, at most 640 characters once trimmed. A longer one fails the call and nothing is changed. |
| `region` | string | No | Where the published site is hosted, shown as `Infrastructure location` in its settings. One of `ams`, `arn`, `cdg`, `dfw`, `ewr`, `fra`, `iad`, `lax`, `nrt`, `ord`, `sin`, `sjc` or `syd`. Any other code is refused. |

## 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.