---
title: "Domain data model"
url: "https://docs.unified.to/compute/domain/model"
description: "The Domain data model object in Unified's Domain API: 8 fields, including created_at, updated_at and service_id, with types and enum values."
---
# Domain 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 domain                                           |
| created\_at   | string (date-time) | No       | When the domain was added (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)         |
| updated\_at   | string (date-time) | No       | When the domain was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)  |
| service\_id   | string             | No       | The service this domain routes to                                          |
| name          | string             | No       | The hostname (eg. app.example.com)                                         |
| status        | enum               | No       | DNS/ownership verification status Values: PENDING, VERIFIED, FAILED, OTHER |
| is\_primary   | boolean            | No       | Whether this is the service's primary domain                               |
| redirect\_url | string             | No       | Where the domain redirects, when it is a redirect                          |

## TypeScript

```typescript
export type ComputeDomain = {
	id?: string; // Unique identifier for the domain
	created_at?: string-time; // When the domain was added (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // When the domain was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	service_id?: string; // The service this domain routes to
	name?: string; // The hostname (eg. app.example.com)
	status?: 'PENDING' | 'VERIFIED' | 'FAILED' | 'OTHER'; // DNS/ownership verification status
	is_primary?: boolean; // Whether this is the service's primary domain
	redirect_url?: string; // Where the domain redirects, when it is a redirect
	raw?: any; // Raw data from integration
} 
```

## Zod

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

export const ZodComputeDomain = z.object({
	id: z.string().optional().describe("Unique identifier for the domain"),
	created_at: z.string-time().optional().describe("When the domain was added (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("When the domain was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	service_id: z.string().optional().describe("The service this domain routes to"),
	name: z.string().optional().describe("The hostname (eg. app.example.com)"),
	status: z.enum("PENDING", "VERIFIED", "FAILED", "OTHER").optional().describe("DNS/ownership verification status"),
	is_primary: z.boolean().optional().describe("Whether this is the service's primary domain"),
	redirect_url: z.string().optional().describe("Where the domain redirects, when it is a redirect"),

});
```

## Python

```python
import dataclasses

@dataclasses.dataclass
class ComputeDomainStatus(str, Enum):
	PENDING = 'PENDING'
	VERIFIED = 'VERIFIED'
	FAILED = 'FAILED'
	OTHER = 'OTHER'

@dataclasses.dataclass
class ComputeDomain:
	"""Unique identifier for the domain"""
	id: Optional[str]
	"""When the domain was added (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""When the domain was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""The service this domain routes to"""
	service_id: Optional[str]
	"""The hostname (eg. app.example.com)"""
	name: Optional[str]
	"""DNS/ownership verification status"""
	status: Optional[ComputeDomainStatus]
	"""Whether this is the service's primary domain"""
	is_primary: Optional[bool]
	"""Where the domain redirects, when it is a redirect"""
	redirect_url: Optional[str]

```
