Skip to main content
PUT
/
branches
/
{id}
/
env-vars
Upsert environment variables
curl --request PUT \
  --url https://api.specular.dev/branches/{id}/env-vars \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "vars": [
    {
      "name": "<string>",
      "value": "<string>"
    }
  ]
}
'
{
  "environmentVariables": [
    {
      "id": "<string>",
      "name": "<string>",
      "value": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication with API key (format: Bearer sk_xxx)

Path Parameters

id
string
required

Branch ID

Body

application/json
vars
object[]
required

Environment variables to upsert

Response

Environment variables upserted

Environment variables upserted

environmentVariables
object[]