Regenerates an existing API key, invalidating the old key and creating a new one.
This action will immediately invalidate the old API key. Make sure to update your applications with the new key.
Path Parameters
The unique identifier of the API key to regenerate
Response
The unique identifier of the API key
The timestamp when the key was regenerated
The timestamp when the key was last used (will be null for new keys)
curl -X POST \
https://api.buena.ai/api/v2/keys/key_123/regenerate \
-H "x-api-key: YOUR_API_KEY"
{
"id": "key_123",
"key": "bai_new_generated_key_here",
"name": "Production API Key",
"created_at": "2024-01-01T00:00:00Z",
"last_used_at": null
}