---
title: "Update an envvar"
method: PATCH
path: "/compute/{connection_id}/envvar/{id}"
tags: ["compute", "envvar"]
---

# Update an envvar

`PATCH /compute/{connection_id}/envvar/{id}`

## Request

- Base URL: `https://api.unified.to`
- URL: `https://api.unified.to/compute/{connection_id}/envvar/{id}`
- Auth: API key in header `authorization`

## Path parameters

- `connection_id` string, required
- `id` string, required

## Query parameters

- `fields` string[]
- `raw` string

## Request body

- ComputeEnvvar
  - `id` string: Unique identifier for the environment variable
  - `created_at` string, date-time: When the variable was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `updated_at` string, date-time: When the variable was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `service_id` string: The service the variable belongs to
  - `name` string: Variable name
  - `value` string: Variable value (write-only; never returned)
  - `environments` string[]: Environments the variable applies to
  - `is_secret` boolean: Whether the vendor stores the value as a secret
  - `metadata` ComputeMetadata[]
    - `id` string: The label, tag or metadata identifier
    - `slug` string: The label, tag or metadata key
    - `value` union: The label, tag or metadata value
      - object
      - string
      - number
      - boolean
      - union[]
        - union
          - object
          - string
          - number
          - boolean
    - `namespace` string: The origin of the value (eg. labels, tags, metadata)
    - `format` 'TEXT' | 'NUMBER' | 'DATE' | 'BOOLEAN' | 'ARRAY' | 'OBJECT': The data type of the value
    - `extra_data` union: Additional data about the value
      - object
      - string
      - number
      - boolean
      - union[]
        - union
          - object
          - string
          - number
          - boolean
  - `raw` object: Raw data from integration

## Response `200`

Successful

- ComputeEnvvar
  - `id` string: Unique identifier for the environment variable
  - `created_at` string, date-time: When the variable was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `updated_at` string, date-time: When the variable was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `service_id` string: The service the variable belongs to
  - `name` string: Variable name
  - `value` string: Variable value (write-only; never returned)
  - `environments` string[]: Environments the variable applies to
  - `is_secret` boolean: Whether the vendor stores the value as a secret
  - `metadata` ComputeMetadata[]
    - `id` string: The label, tag or metadata identifier
    - `slug` string: The label, tag or metadata key
    - `value` union: The label, tag or metadata value
      - object
      - string
      - number
      - boolean
      - union[]
        - union
          - object
          - string
          - number
          - boolean
    - `namespace` string: The origin of the value (eg. labels, tags, metadata)
    - `format` 'TEXT' | 'NUMBER' | 'DATE' | 'BOOLEAN' | 'ARRAY' | 'OBJECT': The data type of the value
    - `extra_data` union: Additional data about the value
      - object
      - string
      - number
      - boolean
      - union[]
        - union
          - object
          - string
          - number
          - boolean
  - `raw` object: Raw data from integration

## Changes

- **2026-10-19** `39502239a975`: 3 info
  - added the new optional request property `metadata`
  - added the enum value `metadata` to the property `items/` of the `query` request parameter `fields`
  - added the optional property `metadata` to the response with the `200` status
- **2026-10-12** `32f1e856a6c9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/unified/apis/unified-to-api/changes/compute/:connection_id/envvar/:id/patch.md)

---

[API](https://skmtc.dev/unified/apis/unified-to-api.md) · [All operations](https://skmtc.dev/unified/apis/unified-to-api/llms.txt) · [OpenAPI document](https://skmtc.dev/unified/apis/unified-to-api/revisions/88a1fc7820d6?raw)
