Rotate the reseller API key secret (secret returned ONCE)
POST/admin/keys/:id/rotate
The public part of api_key DOES NOT CHANGE; only the secret is rotated. The old secret becomes invalid IMMEDIATELY (immediate rotate — 24h grace / dual-secret v2 backlog). The APCu auth cache is invalidated. The reseller_id in the body is an ownership guard — another reseller's key returns 404 key_not_found (isolation, no leak).
Request
Responses
- 200
- 401
- 403
- 404
- 422
Secret rotated (plaintext ONCE)
X-Admin-Token missing or wrong (unauthorized)
Admin API not configured (admin_disabled)
No key, revoked/expired, or belongs to another reseller (key_not_found)
reseller_id missing/invalid (invalid_input)