PUT /api-keys/:keyId
This endpoint allows you to update the name, description, and permissions of an existing API key.
Path Parameters
The ID of the API key to update.
Request Body
The new name for the API key.
The new description for the API key.
The new list of permissions for the API key.
Response
The updated metadata for the API key.
A list of the fields that were updated.
curl -X PUT https://api.llmgenerator.com/api/v1/api-keys/key_xxxxxxxxxxxxx \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Production Key",
"description": "A new description"
}'
{
"metadata": {
"name": "Updated Production Key",
"description": "A new description",
"permissions": ["generate"]
},
"updated": ["name", "description"]
}