Rotate analytics site key
analytics_rotate_keyRotate an analytics property's ingest site key and return the new key once; old key stays valid until overlapExpiresAt.
Instructions
Rotate a property's ingest site key via POST /api/v1/analytics/property/key/rotate. Target with propertyId ALONE (primary), or a project reference plus expectedPropertyId (409 analytics_property_changed on mismatch). The new siteKey is shown EXACTLY ONCE; the old key keeps working through overlapExpiresAt. NOT idempotent and never auto-retried: a manual retry performs a fresh rotation (safe — install the latest returned key). Does not use credits.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "analytics_rotate_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | No | Numeric project id (convenience shape; do not combine with propertyId). | |
| propertyId | No | Explicit analytics property id (primary target). Pass ALONE — combining with a project reference is rejected. When omitted, pass a project reference instead; that resolves only when the project has exactly one property (409 property_scope_ambiguous otherwise). | |
| projectUuid | No | Project UUID (alternative to projectId). | |
| expectedPropertyId | No | Required with a project reference: the property id you believe is current. Omit when targeting by propertyId. |