Create Environment Variables - Project / Environment Level

POST {{base_url}}/api/v3/accounts/{{account_id}}/projects/{{project_id}}/environment-variables/bulk/

Note: Environment variables must be prefixed with DBT_ or DBT_ENV_SECRET_ . You can read more in the docs

The project key in the payload refer to the value that you want the env var to be by default (which other environments will use when they are not set):

Request Body

{"env_var"=>{"name"=>"DBT_ENV_TEST", "new_name"=>"DBT_ENV_TEST", "project"=>"foo", "{{development_environment_name}}"=>"dev_value", "{{deployment_environment_name}}"=>"deploy_value"}}