environment

Retrieve the decrypted value of a Shared Environment Variable by id.

Changed on

Retrieve the decrypted value of a Shared Environment Variable by id.

get/v1/env/{id}

Request

  • Base URL: https://api.vercel.com
  • URL: https://api.vercel.com/v1/env/{id}
  • Auth: HTTP bearer

Path parameters

idstring required

The unique ID for the Shared Environment Variable to get the decrypted value.

Query parameters

teamIdstring
Example:team_1a2b3c4d5e6f7g8h9i0j1k2l

The Team identifier to perform the request on behalf of.

slugstring
Example:my-team-url-slug

The Team slug to perform the request on behalf of.

Response

applyToAllCustomEnvironmentsfalse | true

whether or not this env varible applies to custom environments

commentstring

A user provided comment that describes what this Shared Env Var is for.

createdstring date-time

The date when the Shared Env Var was created.

createdAtnumber

Timestamp for when the Shared Env Var was created.

createdBystring nullable

The unique identifier of the user who created the Shared Env Var.

customEnvironmentIdsstring[]

The custom environment IDs that this Shared Env Var is scoped to.

decryptedfalse | true

whether or not this env variable is decrypted

deletedAtnumber

Timestamp for when the Shared Env Var was (soft) deleted.

deletedBystring nullable

The unique identifier of the user who deleted the Shared Env Var.

idstring

The unique identifier of the Shared Env Var.

keystring

The name of the Shared Env Var.

lastEditedByDisplayNamestring

The last editor full name or username.

ownerIdstring nullable

The unique identifier of the owner (team) the Shared Env Var was created for.

projectIdstring[]

The unique identifiers of the projects which the Shared Env Var is linked to.

targetstring[]

environments this env variable targets

type'encrypted' | 'plain' | 'sensitive' | 'system'

The type of this cosmos doc instance, if blank, assume secret.

updatedAtnumber

Timestamp for when the Shared Env Var was last updated.

updatedBystring nullable

The unique identifier of the user who last updated the Shared Env Var.

valuestring

The value of the Shared Env Var.

Example response

{
  "created": "2021-02-10T13:11:49.180Z",
  "createdAt": 1609492210000,
  "createdBy": "2qDDuGFTWXBLDNnqZfWPDp1A",
  "deletedAt": 1609492210000,
  "deletedBy": "2qDDuGFTWXBLDNnqZfWPDp1A",
  "id": "env_XCG7t7AIHuO2SBA8667zNUiM",
  "key": "my-api-key",
  "ownerId": "team_LLHUOMOoDlqOp8wPE4kFo9pE",
  "projectId": [
    "prj_2WjyKQmM8ZnGcJsPWMrHRHrE",
    "prj_2WjyKQmM8ZnGcJsPWMrasEFg"
  ],
  "target": [
    "production"
  ],
  "type": "encrypted",
  "updatedAt": 1609492210000,
  "updatedBy": "2qDDuGFTWXBLDNnqZfWPDp1A"
}

Changes