Skip to main content

Update environment variable

PUT 

/v2/actors/:actorId/versions/:versionNumber/env-vars/:envVarName

Updates Actor environment variable using values specified by a EnvVar object passed as JSON in the POST payload. If the object does not define a specific property, its value will not be updated.

The request needs to specify the Content-Type: application/json HTTP header!

When providing your API authentication token, we recommend using the request's Authorization header, rather than the URL. (More info).

The response is the EnvVar object as returned by the Get environment variable endpoint.

Request

Path Parameters

    actorId string required

    Actor ID or a tilde-separated owner's username and Actor name.


    Example: janedoe~my-actor
    versionNumber string required

    Actor version.


    Example: 0.1
    envVarName string required

    The name of the environment variable


    Example: MY_ENV_VAR

Bodyrequired

  • name string required

    The name of the environment variable.


    Example: MY_ENV_VAR
  • value string required

    The value of the environment variable. If isSecret is true, this value isn't returned by the API.


    Example: my-value
  • isSecret boolean | null nullable

    Whether the environment variable is encrypted. Secret values aren't returned by the API.


    Example: false

Status 200

Response Headers
    {
    "data": {
    "name": "MY_ENV_VAR",
    "value": "my-value",
    "isSecret": false
    }
    }