Rotate an API key
Creates a replacement key with the same name, network and access and returns its api_key once. The old key keeps working until previous.expires_at, then stops. A key can be rotated once; a revoked, expired or already rotating key returns 409. Served by the Activity host for all products. Read-only and publishable keys get 403.
Authorizations
Send Authorization: Bearer <key>. Testnet: lum_test_…; Mainnet: lum_live_…. A key works only on its own network, so pick the server that matches it (the other network answers 401). Publishable lum_pub_… keys call the GET data routes only, from an allowed browser origin. Webhook keys (whk_…) are not accepted here.
Path Parameters
API key ID: id from GET /v1/keys or from the create response. The example ID is a placeholder and answers 404: use your own.
"00000000-0000-4000-8000-000000000000"
Body
How long the old key keeps working: 0 revokes it now. Default 86400 (24 hours), maximum 604800 (7 days).
0 <= x <= 604800Response
The replacement key (api_key shown once) and the old key in previous.
Plaintext returned once. Never log or share a full or read key; a publishable key (lum_pub_…) is meant to be embedded in web pages.
mainnet, testnet The new key's expiry: null unless the old key had one, in which case the same lifetime restarts at the rotation. The old key's overlap end is previous.expires_at.
full, read for data-only keys, or publishable for browser keys.
full, read, publishable Publishable keys only: a request must send an Origin header equal to one of these. HTTPS is required except http://localhost and http://127.0.0.1; no wildcards; at most 150 characters each.
1 - 20 elementsExact origin, scheme://host[:port], normalized to lowercase without a default port.
Publishable keys only: requests per minute per end-user IP (default 60). The organization plan limit still applies.
1 <= x <= 600Publishable keys only: settled credits this key may use per billing period. At the cap the key gets 429 until the next period; other keys continue. Omitted when there is no cap.
1 <= x <= 1000000000000