Skip to main content
POST
/
api
/
users
/
api-key
/
rotate
Python
import os
from dataframer import Dataframer

client = Dataframer(
    api_key=os.environ.get("DATAFRAMER_API_KEY"),  # This is the default and can be omitted
)
response = client.api_keys.rotate()
print(response.api_key)
{
  "api_key": "a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef12345678",
  "masked_key": "a1b2****5678",
  "expires_at": "2027-02-19T01:24:05.000000+00:00"
}

Authorizations

Authorization
string
header
required

API Key authentication. Format: "Bearer YOUR_API_KEY"

Response

Key rotated successfully

Response from a successful API key rotation

api_key
string

The new API key. Store securely — it will not be shown again.

masked_key
string

Masked version of the key showing first 4 and last 4 characters (e.g. a1b2****5678)

expires_at
string<date-time>

Expiration timestamp of the new API key