Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

Get an environment variable

GET/v1/environment-variables/{envVarId}Get an environment variable

⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️

Returns a single environment variable's metadata. The value is not returned.

Parameters

envVarIdstringpathrequired

pattern ^(envvar_)?([cC][^\s-]{8,}|[a-z0-9]+)$

Responses

200Returned the environment variable.application/json
object
dataobjectrequired
Show child attributes
branchIdnull | stringrequired
classstringrequired

one of "production", "preview"

createdAtstring · date-timerequired
idstringrequired
isManagedBySystembooleanrequired
keystringrequired
projectIdstringrequired
typestringrequired

const "environment-variable"

updatedAtstring · date-timerequired
urlstring · urirequired
valueKidstringrequired
Example response
{
  "data": {
    "branchId": "string",
    "class": "preview",
    "createdAt": "2026-06-09T00:00:00Z",
    "id": "string",
    "isManagedBySystem": true,
    "key": "string",
    "projectId": "string",
    "type": "environment-variable",
    "updatedAt": "2026-06-09T00:00:00Z",
    "url": "https://example.com",
    "valueKid": "string"
  }
}
401Missing or invalid authorization token.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
404Variable not found, or token does not have access to it.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
422Invalid request.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
Documentation menu