---
title: "Envvar data model"
url: "https://docs.unified.to/compute/envvar/model"
description: "The Envvar data model object in Unified's Envvar API: 8 fields, including created_at, updated_at and service_id, with types and enum values."
---
# Envvar data model

 View field support, webhooks, and list parameters for each integration on the [Supported Integrations](https://docs.unified.to/compute/integrations.md) page. 

| Field        | Type               | Required | Description                                                                          |
| ------------ | ------------------ | -------- | ------------------------------------------------------------------------------------ |
| id           | string             | No       | Unique identifier for the environment variable                                       |
| created\_at  | string (date-time) | No       | When the variable was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)               |
| updated\_at  | string (date-time) | No       | When the variable was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)          |
| service\_id  | string             | No       | The service the variable belongs to                                                  |
| name         | string             | No       | Variable name                                                                        |
| value        | string             | No       | Variable value (write-only; never returned)                                          |
| environments | enum               | No       | Environments the variable applies to Values: PRODUCTION, PREVIEW, DEVELOPMENT, OTHER |
| is\_secret   | boolean            | No       | Whether the vendor stores the value as a secret                                      |

## TypeScript

```typescript
export type ComputeEnvvar = {
	id?: string; // Unique identifier for the environment variable
	created_at?: string-time; // When the variable was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-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?: ( 'PRODUCTION' | 'PREVIEW' | 'DEVELOPMENT' | 'OTHER' )[]; // Environments the variable applies to
	is_secret?: boolean; // Whether the vendor stores the value as a secret
	raw?: any; // Raw data from integration
} 
```

## Zod

```typescript
import { z } from 'zod';

export const ZodComputeEnvvar = z.object({
	id: z.string().optional().describe("Unique identifier for the environment variable"),
	created_at: z.string-time().optional().describe("When the variable was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("When the variable was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	service_id: z.string().optional().describe("The service the variable belongs to"),
	name: z.string().optional().describe("Variable name"),
	value: z.string().optional().describe("Variable value (write-only; never returned)"),
	environments: z( 'PRODUCTION' | 'PREVIEW' | 'DEVELOPMENT' | 'OTHER' ).optional().describe("Environments the variable applies to"),
	is_secret: z.boolean().optional().describe("Whether the vendor stores the value as a secret"),

});
```

## Python

```python
import dataclasses

@dataclasses.dataclass
class ComputeEnvvarEnvironments(str, Enum):
	PRODUCTION = 'PRODUCTION'
	PREVIEW = 'PREVIEW'
	DEVELOPMENT = 'DEVELOPMENT'
	OTHER = 'OTHER'

@dataclasses.dataclass
class ComputeEnvvar:
	"""Unique identifier for the environment variable"""
	id: Optional[str]
	"""When the variable was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""When the variable was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""The service the variable belongs to"""
	service_id: Optional[str]
	"""Variable name"""
	name: Optional[str]
	"""Variable value (write-only; never returned)"""
	value: Optional[str]
	"""Environments the variable applies to"""
	environments: Optional[List[ComputeEnvvarEnvironments]]
	"""Whether the vendor stores the value as a secret"""
	is_secret: Optional[bool]

```
