---
title: "Lists all Shared Environment Variables for a team"
method: GET
path: "/v1/env"
tags: ["environment"]
---

# Lists all Shared Environment Variables for a team

`GET /v1/env`

## Request

- Base URL: `https://api.vercel.com`
- URL: `https://api.vercel.com/v1/env`
- Auth: HTTP bearer

Lists all Shared Environment Variables for a team, taking into account optional filters.

## Query parameters

- `search` string
- `projectId` string: Filter SharedEnvVariables that belong to a project
- `ids` string: Filter SharedEnvVariables based on comma separated ids
- `exclude_ids` string: Filter SharedEnvVariables based on comma separated ids
- `exclude-ids` string: Filter SharedEnvVariables based on comma separated ids
- `exclude_projectId` string: Filter SharedEnvVariables that belong to a project
- `exclude-projectId` string: Filter SharedEnvVariables that belong to a project
- `teamId` string
- `slug` string

## Response `200`

- object
  - `data` object[], required
    - `applyToAllCustomEnvironments` false | true: whether or not this env varible applies to custom environments
    - `comment` string: A user provided comment that describes what this Shared Env Var is for.
    - `created` string, date-time, required: The date when the Shared Env Var was created.
    - `createdAt` number: Timestamp for when the Shared Env Var was created.
    - `createdBy` string, nullable: The unique identifier of the user who created the Shared Env Var.
    - `customEnvironmentIds` string[]: The custom environment IDs that this Shared Env Var is scoped to.
    - `decrypted` false | true, required: whether or not this env variable is decrypted
    - `deletedAt` number: Timestamp for when the Shared Env Var was (soft) deleted.
    - `deletedBy` string, nullable: The unique identifier of the user who deleted the Shared Env Var.
    - `id` string, required: The unique identifier of the Shared Env Var.
    - `key` string, required: The name of the Shared Env Var.
    - `lastEditedByDisplayName` string: The last editor full name or username.
    - `lastEditedByPrincipal` union
      - object: The principal that last edited this env var, when the editor id resolves to a known user or app. Lets clients render the right avatar instead of assuming every editor is a user.
        - `avatar` string
        - `id` string, required
        - `name` string, nullable
        - `type` 'user', required
        - `username` string, required
      - object: The principal that last edited this env var, when the editor id resolves to a known user or app. Lets clients render the right avatar instead of assuming every editor is a user.
        - `avatar` string
        - `id` string, required
        - `name` string, required
        - `type` 'app', required
    - `ownerId` string, nullable: The unique identifier of the owner (team) the Shared Env Var was created for.
    - `projectId` string[]: The unique identifiers of the projects which the Shared Env Var is linked to.
    - `securityIssues` string[], required
    - `target` string[]: environments this env variable targets
    - `type` 'encrypted' | 'plain' | 'sensitive' | 'system': The type of this cosmos doc instance, if blank, assume secret.
    - `updatedAt` number: Timestamp for when the Shared Env Var was last updated.
    - `updatedBy` string, nullable: The unique identifier of the user who last updated the Shared Env Var.
    - `value` string: The value of the Shared Env Var.
  - `pagination` Pagination, required: This object contains information related to the pagination of the current request, including the necessary parameters to get the next or previous page of data.
    - `count` number, required: Amount of items in the current page.
    - `next` number, nullable, required: Timestamp that must be used to request the next page.
    - `prev` number, nullable, required: Timestamp that must be used to request the previous page.

## Other responses

- `400`: One of the provided values in the request query is invalid.
- `401`: The request is not authorized.
- `403`: You do not have permission to access this resource.
- `404`
- `410`

## Changes

- **2026-09-24** `dd6a90982ed0`: 1 info
  - added the optional property `data/items/lastEditedByPrincipal` to the response with the `200` status
- **2026-09-11** `83dbc1a3d2a1`: 5 info
  - the response property `data/items/created` became required for the status `200`
  - the response property `data/items/decrypted` became required for the status `200`
  - the response property `data/items/id` became required for the status `200`
  - the response property `data/items/key` became required for the status `200`
  - …1 more
- **2026-09-01** `606993b34ea5`: 2 warning, 2 info
  - deleted the `query` request parameter `'exclude-ids'`
  - deleted the `query` request parameter `'exclude-projectId'`
  - added the new optional `query` request parameter `exclude-ids`
  - added the new optional `query` request parameter `exclude-projectId`
- **2026-07-21** `2ae10ee9d21c`: 1 info
  - added the non-success response with the status `410`
- **2026-06-11** `14b4658f819e`: 2 warning, 3 info
  - deleted the `query` request parameter `exclude-ids`
  - deleted the `query` request parameter `exclude-projectId`
  - added the new optional `query` request parameter `'exclude-ids'`
  - added the new optional `query` request parameter `'exclude-projectId'`
  - …1 more

[Operation history](https://skmtc.dev/vercel/apis/vercel-api/changes/v1/env/get.md)

---

[API](https://skmtc.dev/vercel/apis/vercel-api.md) - [All operations](https://skmtc.dev/vercel/apis/vercel-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vercel/apis/vercel-api/revisions/60686c0e1f6a?raw)
