cURL
curl --request POST \ --url http://localhost:3000/api/canary/authentication/api-key/update \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "keyId": "key_12345", "name": "My Updated API Key", "enabled": true, "metadata": { "env": "production" } } '
{ "statusCode": 400, "message": [ "Invalid input data" ], "error": "Bad Request" }
Update an API key’s properties
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
The ID of the API key to update
"key_12345"
The new name of the API key
"My Updated API Key"
Whether the API key is enabled
true
Metadata for the API key
{ "env": "production" }
API key updated successfully