# Change the site secret (shown once)

`POST /protection/rotate` · Rivier · hosting

Change the site secret (shown once); the old one stops working. A person does this in the app.

- Scope: hosting:write
- Sdk: hosting.protection.rotate
- Cli: hosting protection rotate

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/protection/rotate' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{}'
```
