curl -X POST https://api.dotlookup.dev/v1/auth/regenerate-key \
-H "X-API-Key: your_current_api_key"
import requests
resp = requests.post(
"https://api.dotlookup.dev/v1/auth/regenerate-key",
headers={"X-API-Key": old_key},
)
new_key = resp.json()["api_key"]
# Persist new_key BEFORE making any other call — old_key is now invalid
{
"api_key": "dl_new_a1b2c3d4e5f6..."
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "API key is required"
}
}
Account
Regenerate API Key
Rotate your API key, invalidating the previous one
POST
/
v1
/
auth
/
regenerate-key
curl -X POST https://api.dotlookup.dev/v1/auth/regenerate-key \
-H "X-API-Key: your_current_api_key"
import requests
resp = requests.post(
"https://api.dotlookup.dev/v1/auth/regenerate-key",
headers={"X-API-Key": old_key},
)
new_key = resp.json()["api_key"]
# Persist new_key BEFORE making any other call — old_key is now invalid
{
"api_key": "dl_new_a1b2c3d4e5f6..."
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "API key is required"
}
}
Generates a new API key for your account and invalidates the previous one immediately. Use when you suspect a key has leaked, or as part of a regular rotation schedule.
The previous key is invalidated server-side as part of the same transaction that creates the new one — there is no overlap window where both work.
This endpoint requires an API key — the current one, which is what’s being rotated. After the response, the old key returns 401 on every subsequent request. Update your integrations atomically.
curl -X POST https://api.dotlookup.dev/v1/auth/regenerate-key \
-H "X-API-Key: your_current_api_key"
import requests
resp = requests.post(
"https://api.dotlookup.dev/v1/auth/regenerate-key",
headers={"X-API-Key": old_key},
)
new_key = resp.json()["api_key"]
# Persist new_key BEFORE making any other call — old_key is now invalid
{
"api_key": "dl_new_a1b2c3d4e5f6..."
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "API key is required"
}
}