Skip to content

API Key

Manage your Glomo API keys. Use this resource to rotate your secret key and maintain secure access to the API.

Rotate API key

Request

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
Bodyapplication/jsonrequired
expire_after_in_secondsinteger, [ 0 .. 604800 ]required

Duration (in seconds) for which the previous key remains valid after rotation. Must be an integer between 0 and 604800 (7 days). Use this window to update all integrations before the old key is revoked.

Example:3600
POST
/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
  }'

Responses

API key rotated successfully

Bodyapplication/json
secret_keystring

The newly generated secret API key. Store it securely — it will not be shown again.

Example:"<NEW_JWT>"
previous_key_expires_atstring, (date-time)

ISO 8601 timestamp (UTC) at which the previous key will be revoked.

Example:"2026-05-13T12:10:57Z"
Response
{ "secret_key": "<NEW_JWT>", "previous_key_expires_at": "2026-05-13T12:10:57Z" }