# rotate_site_message_key

Source: https://modulify.ai/docs/mcp/messages/rotate-site-message-key

Replaces the texting key of a site with a new one, so the old key stops working at once and everywhere.

- Title: Rotate the texting key of a site
- Scope: `config:write`
- Access: Destructive

The preview gets the new key right away, but a published site keeps the old one until it is published again, so its texts fail until then, and the tool tells the client to remind you to publish right after. Anything outside Modulify that used the old key breaks until the new one is pasted in.

The new key is not returned, and `get_site_message_key` reads it. The tool tells the client to rotate only when a key has leaked or you ask, never as routine maintenance. It needs the **Delete projects** permission. See [Send texts from your site's code](https://modulify.ai/docs/built-in/messages#send-texts-from-your-sites-code).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id. |