Create or replace env_var. If there is an existing env_var with the same name as the one specified in the request, will replace the existing env_var with the provided fields
Most Braintrust endpoints are authenticated by providing your API key as a header Authorization: Bearer [api_key] to your HTTP request. You can create an API key in the Braintrust organization settings page.
Any desired information about the new env_var object
The type of the object the environment variable is scoped for
organization, project, function The id of the object the environment variable is scoped for
The name of the environment variable
The value of the environment variable. Will be encrypted at rest.
Optional metadata associated with the environment variable when managed via the function secrets API
Optional classification for the secret (for example, the AI provider name)
Returns the new env_var object
Unique identifier for the environment variable
The type of the object the environment variable is scoped for
organization, project, function The id of the object the environment variable is scoped for
The name of the environment variable
Date of environment variable creation
Date the environment variable was last used
Optional metadata associated with the environment variable when managed via the function secrets API
Optional classification for the secret (for example, the AI provider name)
The category of the secret: env_var for regular environment variables, ai_provider for AI provider API keys
env_var, ai_provider