Rotates the secret API key for your account, generating a new key immediately. The previous key remains valid until expire_after_in_seconds has elapsed, giving you time to update your integrations. Once the expiry period passes, the old key is revoked and any requests using it will return 401 Unauthorized.
Security
JWT
Duration (in seconds) for which the previous key remains valid after rotation. Must be an integer between 0 and 604800 (7 days), sent as a JSON number. A value outside that range, or a string such as "3600", returns 400. Use this window to update all integrations before the old key is revoked.
Example:3600
- Production serverhttps://api.glomopay.com/api/v1/api-keys/rotate
curl -i -X POST \
https://api.glomopay.com/api/v1/api-keys/rotate \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"expire_after_in_seconds": 3600
}'API key rotated successfully
Response
{ "secret_key": "<NEW_JWT>", "previous_key_expires_at": "2026-05-13T12:10:57Z" }