> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Create project environment variable

> Create or upsert a Vercel project environment variable.

`createVercelProjectEnvironmentVariable` creates one variable on a project.

```ts automations/create-vercel-env.automation.ts theme={null}
import { automation } from "automate.ax"
import { createVercelProjectEnvironmentVariable } from "automate.ax/vercel"

export default automation("Configure Vercel project", () => {
  createVercelProjectEnvironmentVariable({
    key: "API_URL",
    project: "docs-site",
    targets: ["production", "preview"],
    upsert: true,
    value: "https://api.example.com",
  })
})
```

`project`, `key`, and `value` are required. `type` defaults to Vercel's recommended `"encrypted"`; `targets` defaults to production, preview, and development. `upsert` defaults to `false`. Optional `gitBranch`, `customEnvironmentIds`, and `comment` control narrower placement and context. The output contains Vercel's typed `created` variables.
