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)curl https://df-api.dataframer.ai/api/users/api-key/rotate \
-X POST \
-H "Authorization: Bearer $DATAFRAMER_API_KEY"{
"api_key": "a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef12345678",
"masked_key": "a1b2****5678",
"expires_at": "2027-02-19T01:24:05.000000+00:00"
}API Keys
Rotate API key
Revoke your current API key and receive a new one
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)curl https://df-api.dataframer.ai/api/users/api-key/rotate \
-X POST \
-H "Authorization: Bearer $DATAFRAMER_API_KEY"{
"api_key": "a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef12345678",
"masked_key": "a1b2****5678",
"expires_at": "2027-02-19T01:24:05.000000+00:00"
}Authorizations
API Key authentication. Format: "Bearer YOUR_API_KEY"

