Skip to main content

Create environment variable

POST 

/v2/acts/: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 a tilde-separated owner's username and Actor name.


    Example: janedoe~my-actor
    versionNumber string required

    Actor version


    Example: 0.1

Bodyrequired

  • name string required
    Example: MY_ENV_VAR
  • value string required
    Example: my-value
  • isSecret boolean | null nullable
    Example: false

Status 201

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