Skip to main content
PATCH
/
v1
/
env_var
/
{env_var_id}
Partially update env_var
curl --request PATCH \
  --url https://api.braintrust.dev/v1/env_var/{env_var_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "value": "<string>"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "object_type": "organization",
  "object_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "created": "2023-11-07T05:31:56Z",
  "used": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

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.

Path Parameters

env_var_id
string<uuid>
required

EnvVar id

Body

application/json

Fields to update

name
string
required

The name of the environment variable

value
string | null

The value of the environment variable. Will be encrypted at rest.

Response

Returns the env_var object

id
string<uuid>
required

Unique identifier for the environment variable

object_type
enum<string>
required

The type of the object the environment variable is scoped for

Available options:
organization,
project,
function
object_id
string<uuid>
required

The id of the object the environment variable is scoped for

name
string
required

The name of the environment variable

created
string<date-time> | null

Date of environment variable creation

used
string<date-time> | null

Date the environment variable was last used