Skip to main content

Create environment variable

POST 

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

Creates an environment variable of an Actor using values specified in a EnvVar object passed as JSON in the POST payload.

The request must specify name and value parameters (as strings) in the JSON payload and a Content-Type: application/json HTTP header.

{
"name": "ENV_VAR_NAME",
"value": "my-env-var"
}

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

Request

Path Parameters

    actorId string required

    Actor ID or the username of the Actor owner and the Actor name, separated by a tilde (~).


    Example: compass~google-maps-extractor
    versionNumber string required

    Actor version.


    Example: 0.1

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 201

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