---
title: "Resolved env vars for a project (manual + integration-sourced, merged)."
method: GET
path: "/projects/{project_id}/env-vars/resolved"
tags: ["Projects"]
---

# Resolved env vars for a project (manual + integration-sourced, merged).

`GET /projects/{project_id}/env-vars/resolved`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/projects/{project_id}/env-vars/resolved`
- Auth: HTTP bearer

Returns the effective set of environment variables a deployment would see,
combining manually-defined vars with those contributed by linked external
services (Postgres, Redis, S3, etc.). Each entry is tagged with its source
so the UI can render an integration icon, and manual entries that shadow an
integration key carry a reference to the integration they override.

Values are always returned as a masked preview. Use the per-key reveal
endpoint for regular plaintext values (audit-logged). Marked secrets
cannot be revealed.

## Path parameters

- `project_id` integer, required

## Query parameters

- `environment_id` integer

## Response `200`

Resolved environment variables

- ResolvedEnvVarResponse[]
  - `environments` EnvironmentInfo[], required: Environments this var applies to. For integration-sourced vars this reflects every environment of the project (integrations are global).
    - `current_deployment_id` integer, nullable
    - `id` integer, required
    - `main_url` string, required
    - `name` string, required
  - `include_in_preview` boolean, required: Whether the var would be auto-applied to preview environments. Integration vars always surface in preview; manual vars follow the flag.
  - `key` string, required
  - `source` union, required: Where a resolved env var comes from. Integration-sourced vars may be "shadowed" by a manual entry with the same key, in which case the response carries `Manual` with `overrides_service` populated so the UI can still show the integration icon.
    - object: Manually-defined env var. If `overrides_service` is set, this key would otherwise have been supplied by an integration — the UI should show the integration icon plus an "overridden" indicator.
      - `overrides_service` EnvVarIntegrationInfo, nullable
        - `service_id` integer, required
        - `service_name` string, required
        - `service_slug` string, nullable
        - `service_type` string, required
        - `service_updated_at` string, required
      - `type` 'manual', required
      - `var_id` integer, required
    - object: Supplied by a linked external service (Postgres, Redis, S3, etc.).
      - `service` EnvVarIntegrationInfo, required
        - `service_id` integer, required
        - `service_name` string, required
        - `service_slug` string, nullable
        - `service_type` string, required
        - `service_updated_at` string, required
      - `type` 'integration', required
  - `value_preview` string, required: Masked or truncated preview. Never the raw value.

## Other responses

- `404`: Project not found
- `500`: Internal server error

## Changes

- **2026-11-25** `480a86944327`: 1 info
  - the endpoint scheme security `bearer_auth` was added to the API
- **2026-07-31** `00b2fffe41df`: 1 breaking, 1 info
  - added `subschema #1, subschema #2` to the `items/source` response property `oneOf` list for the response status `200`
  - removed `subschema #1, subschema #2` from the `items/source` response property `oneOf` list for the response status `200`
- **2026-04-25** `774be20905f2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/projects/:project_id/env-vars/resolved/get.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
