Rotate an agent key
The new key works at once. By default the old key keeps working for 24 hours (agent.previous_key_valid_until) so the running agent can be redeployed first; invalidate_immediately stops it now. agent_key (and env) is returned only in this response; target or include=install add the install command(s) with it filled in. delivery=claim rotates the same way but returns a single-use console link (claim_url) instead of the key.
Authorizations
Query Parameters
Body
Response
ok
- Option 1
- Option 2
Only with ?target= or ?include=install. Install snippets keyed by target: docker (docker run), compose, kubernetes (Secret + Deployment manifest), systemd (Linux service), launchd (macOS LaunchAgent) and binary (foreground, Linux or macOS). Only the requested target with ?target=, all of them with ?include=install. The systemd, launchd and binary snippets pick the right binary on the host (uname). Without prometheus_url they are for a probes-only agent. The agent key is filled in.

