PUT
/
api
/
v0
/
secrets
/
update env var
curl --request PUT \
  --url https://console.vast.ai/api/v0/secrets/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "MY_API_KEY",
  "value": "xyz123"
}'
{
  "success": true,
  "msg": "Environment variable updated successfully"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
key
string
required

The key of the environment variable to update (will be converted to uppercase)

Example:

"MY_API_KEY"

value
string
required

The new value for the environment variable

Example:

"xyz123"

Response

Environment variable updated successfully

success
boolean
Example:

true

msg
string
Example:

"Environment variable updated successfully"