clerk.rotate_machine_secret_key
Rotate the secret key for a machine in a connected Clerk instance.
Sensitive — the response includes the new secret key; do not log or expose it.
Call clerk.get_connected_accounts first. Pass clerk_instance_id to target a specific connection, or omit it to use the default account.
Returns the new secret key.
Cost = 10 tokens.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| machine_id | Yes | Clerk machine id (mch_...) to retrieve or modify. | |
| clerk_instance_id | No | Clerk instance id (ins_...) from clerk.get_connected_accounts. Omit to use the default connected account. | |
| previous_token_ttl | Yes | Seconds the previous secret key remains valid after rotation (0–28800). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| machine_secret_key | No | Rotated machine secret key payload from the Backend API. |