Update an environment API key
Requires an Account API key with the account:environments:api_keys:update scope. Create one from Account API keys in the dashboard.
Updates an Environment API key. Changes the display name and/or scopes of an Environment API key. scopes replaces the key's current scopes. The secret does not change, but removing a scope makes requests that need it fail with 403.
keyUuid is the UUID returned when the key was created.
Response example
{
"data": {
"id": 456,
"uuid": "123e4567-e89b-12d3-a456-426614174001",
"display_name": "provisioned-ci",
"scopes": ["environment:deploy"],
"last_used_at": null,
"created_at": "2026-08-18T12:00:00.000Z"
}
}Change the display name and/or scopes of an Environment API key. Requires an Account API key with the account:environments:api_keys:update scope.
bearerAuthAuthorizationBearer <token>An Environment API key from your Tenklo environment, or an Account API key for account-level endpoints.
environmentUuid*stringEnvironment UUID that owns the key.
uuidkeyUuid*stringAPI-key UUID.
uuidapplication/json- body
1 <= propertiesdisplay_name?stringNew display name for the key. Must be unique within the environment.
1 <= length <= 255scopes?array<string>Environment scopes that replace the key's current scopes, such as environment:deploy or environment:*.
1 <= itemsSuccessfully updated the Environment API key
application/json- response
data*curl -X PATCH 'https://api.tenklo.dev/environments/123e4567-e89b-12d3-a456-426614174000/api-keys/123e4567-e89b-12d3-a456-426614174001' \ -H 'Content-Type: application/json' \ -d '{}'{ "data": { "id": 0, "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "display_name": "string", "scopes": [ "string" ], "last_used_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z" }}