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

# Vercel

> Vercel REST API for managing web deployments — list and inspect projects and deployments, read build logs, manage custom domains and DNS records, create or update environment variables, and cancel in-progress builds.

Vercel REST API for managing web deployments — list and inspect projects and deployments, read build logs, manage custom domains and DNS records, create or update environment variables, and cancel in-progress builds. Use when an agent needs to operate a user's own Vercel account: checking why a deploy failed, rolling out an env-var change, or auditing domains across a team. Unlike RunTM (agent sandboxes) or PlanetScale (databases), Vercel is the hosting/deployment layer for the user's production web apps. Lava slims project responses by default — drops dashboard-config sections, reduces embedded deployments to essentials, and strips values from embedded env-var definitions; pass filter.mode="full" for the raw response or filter.\_lava\_keep\_env="true" to keep full env definitions.

14 example endpoints available through Lava's AI Gateway. See the [Vercel API docs](https://vercel.com/docs/rest-api) for full documentation.

<Warning>This provider requires your own credentials — connect your API key or OAuth account before use.</Warning>

<Info>This is a **catch-all provider** — any valid URL under `https://api.vercel.com` is supported. Any Vercel REST API endpoint. Construct URL as [https://api.vercel.com/\&#123;path\&#125](https://api.vercel.com/\&#123;path\&#125); — auth is supplied automatically as a Bearer header. Version prefixes are per-resource, not global: /v10/projects (list), /v11/projects (create), /v9/projects/\{idOrName} (get/update/delete), /v10/projects/\{idOrName}/env (list/create env vars), /v9/projects/\{idOrName}/env/\{id} (update/delete env var), /v7/deployments (list), /v13/deployments/\{idOrUrl} (get), /v3/deployments/\{idOrUrl}/events (build logs), /v12/deployments/\{id}/cancel (PATCH), /v2/teams, /v2/user, /v5/domains. TEAM SCOPE: resources owned by a team require ?teamId=\{team\_id} (or ?slug=\{team\_slug}) on every request — without it the API operates on the token's personal account or returns 403; get team ids from GET /v2/teams. Pagination: list endpoints take ?limit (max 100) and return pagination.next — pass it back as ?from= on /v10/projects, or as ?until= on deployments/domains/teams lists. 429 responses include rate-limit headers — back off accordingly. MUTATION SAFETY: DELETE on projects or domains is irreversible, and POST /v13/deployments starts a real build that counts against the user's Vercel usage — confirm the user's intent before destructive or deploy-triggering calls. Full reference: [https://vercel.com/docs/rest-api](https://vercel.com/docs/rest-api). The endpoints below are curated examples.</Info>

## Endpoints

### Get the authenticated user. Use as the auth/connectivity check.

**GET** `https://api.vercel.com/v2/user` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.vercel.com/v2/user', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.vercel.com%2Fv2%2Fuser" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### List projects for the authenticated user or team (?teamId=), filterable with ?search= and paginated with ?limit (max 100), passing pagination.next back as ?from= for the next page. Lava slims each project to its essentials — pass filter.mode="full" for raw project objects.

**GET** `https://api.vercel.com/v10/projects?limit=20` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.vercel.com/v10/projects?limit=20', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.vercel.com%2Fv10%2Fprojects%3Flimit%3D20" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Get a single project by id or name, including framework, git repository link, and latest deployment info. Lava slims the project to its essentials — pass filter.mode="full" for the raw object or filter.\_lava\_keep\_env="true" to keep full embedded env-var definitions.

**GET** `https://api.vercel.com/v9/projects/{idOrName}` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.vercel.com/v9/projects/{idOrName}', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.vercel.com%2Fv9%2Fprojects%2F%7BidOrName%7D" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Update project settings by id or name: framework, build/install commands, root directory, node version, and more.

**PATCH** `https://api.vercel.com/v9/projects/{idOrName}` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.vercel.com/v9/projects/{idOrName}', { method: 'PATCH', body: {"buildCommand":"npm run build"} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X PATCH "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.vercel.com%2Fv9%2Fprojects%2F%7BidOrName%7D" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"buildCommand":"npm run build"}'
    ```
  </Tab>
</Tabs>

### List deployments for the user or team, filterable by ?projectId=, ?state= (BUILDING, ERROR, READY, CANCELED, …), and ?target=production; paginate with ?limit and ?until.

**GET** `https://api.vercel.com/v7/deployments?projectId={project_id}&limit=20` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.vercel.com/v7/deployments?projectId={project_id}&limit=20', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.vercel.com%2Fv7%2Fdeployments%3FprojectId%3D%7Bproject_id%7D%26limit%3D20" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Get a deployment by id or hostname, including build state, target environment, and alias assignments.

**GET** `https://api.vercel.com/v13/deployments/{idOrUrl}` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.vercel.com/v13/deployments/{idOrUrl}', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.vercel.com%2Fv13%2Fdeployments%2F%7BidOrUrl%7D" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Get the build logs of a deployment — the first stop when diagnosing a failed deploy.

**GET** `https://api.vercel.com/v3/deployments/{idOrUrl}/events` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.vercel.com/v3/deployments/{idOrUrl}/events', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.vercel.com%2Fv3%2Fdeployments%2F%7BidOrUrl%7D%2Fevents" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Cancel a deployment that is currently building — use to recover from accidental deploys or builds with known errors.

**PATCH** `https://api.vercel.com/v12/deployments/{deployment_id}/cancel` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.vercel.com/v12/deployments/{deployment_id}/cancel', { method: 'PATCH' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X PATCH "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.vercel.com%2Fv12%2Fdeployments%2F%7Bdeployment_id%7D%2Fcancel" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json"
    ```
  </Tab>
</Tabs>

### List environment variables for a project. Values of type encrypted/sensitive are redacted unless ?decrypt=true is allowed for the token.

**GET** `https://api.vercel.com/v10/projects/{idOrName}/env` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.vercel.com/v10/projects/{idOrName}/env', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.vercel.com%2Fv10%2Fprojects%2F%7BidOrName%7D%2Fenv" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Create one or more environment variables for a project. type is one of plain, encrypted, sensitive, system; target is any of production, preview, development. Add ?upsert=true to update an existing key instead of erroring.

**POST** `https://api.vercel.com/v10/projects/{idOrName}/env?upsert=true` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.vercel.com/v10/projects/{idOrName}/env?upsert=true', {
      body: {
    "key": "API_URL",
    "value": "https://api.example.com",
    "type": "encrypted",
    "target": [
      "production",
      "preview"
    ]
    },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.vercel.com%2Fv10%2Fprojects%2F%7BidOrName%7D%2Fenv%3Fupsert%3Dtrue" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"key":"API_URL","value":"https://api.example.com","type":"encrypted","target":["production","preview"]}'
    ```
  </Tab>
</Tabs>

### Delete an environment variable by its id (from the list-env-vars endpoint).

**DELETE** `https://api.vercel.com/v9/projects/{idOrName}/env/{env_var_id}` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.vercel.com/v9/projects/{idOrName}/env/{env_var_id}', { method: 'DELETE' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X DELETE "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.vercel.com%2Fv9%2Fprojects%2F%7BidOrName%7D%2Fenv%2F%7Benv_var_id%7D" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json"
    ```
  </Tab>
</Tabs>

### List teams the authenticated user belongs to — the source of teamId values for team-scoped requests.

**GET** `https://api.vercel.com/v2/teams` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.vercel.com/v2/teams', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.vercel.com%2Fv2%2Fteams" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### List domains registered to the user or team, with verification status and expiration.

**GET** `https://api.vercel.com/v5/domains?limit=20` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.vercel.com/v5/domains?limit=20', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.vercel.com%2Fv5%2Fdomains%3Flimit%3D20" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Rename an Edge Config (its slug). Edge Config items are updated separately via PATCH /v1/edge-config/\{edgeConfigId}/items.

**PUT** `https://api.vercel.com/v1/edge-config/{edge_config_id}` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.vercel.com/v1/edge-config/{edge_config_id}', { method: 'PUT', body: {"slug":"my-renamed-config"} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X PUT "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.vercel.com%2Fv1%2Fedge-config%2F%7Bedge_config_id%7D" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"slug":"my-renamed-config"}'
    ```
  </Tab>
</Tabs>

## Next Steps

<CardGroup cols={2}>
  <Card title="All Providers" icon="grid" href="/gateway/supported-providers">
    Browse all supported AI providers
  </Card>

  <Card title="Forward Proxy" icon="route" href="/gateway/forward-proxy">
    Learn how to construct proxy URLs and authenticate requests
  </Card>
</CardGroup>
