---
title: "Deployment data model"
url: "https://docs.unified.to/compute/deployment/model"
description: "The Deployment data model object in Unified's Deployment API: 16 fields, including created_at, updated_at and service_id, with types and enum values."
---
# Deployment 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 deployment                                                                                                             |
| created\_at              | string (date-time)                                                                         | No       | When the deployment was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                                                                         |
| updated\_at              | string (date-time)                                                                         | No       | When the deployment was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                                                                    |
| service\_id              | string                                                                                     | No       | The service this deployment belongs to                                                                                                           |
| status                   | enum                                                                                       | No       | Normalized deployment status; set to CANCELED on update to cancel Values: QUEUED, BUILDING, DEPLOYING, LIVE, FAILED, CANCELED, SUPERSEDED, OTHER |
| trigger                  | enum                                                                                       | No       | What started the deployment Values: GIT, MANUAL, API, ROLLBACK, OTHER                                                                            |
| environment              | enum                                                                                       | No       | Target environment Values: PRODUCTION, PREVIEW, DEVELOPMENT, OTHER                                                                               |
| commit\_identifier       | string                                                                                     | No       | Source commit SHA (reference to RepoCommit)                                                                                                      |
| commit\_message          | string                                                                                     | No       | Source commit message                                                                                                                            |
| branch                   | string                                                                                     | No       | Source branch                                                                                                                                    |
| image                    | string                                                                                     | No       | Container image deployed, for image-based services                                                                                               |
| url                      | string                                                                                     | No       | URL where this deployment is served                                                                                                              |
| started\_at              | string (date-time)                                                                         | No       | When the build started (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                                                                                  |
| finished\_at             | string (date-time)                                                                         | No       | When the deployment finished (live, failed or canceled) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                                                 |
| error                    | string                                                                                     | No       | Failure description                                                                                                                              |
| metadata                 | [ComputeMetadata](https://docs.unified.to/compute/deployment/model.md#ComputeMetadata)\[\] | No       | Vendor labels, tags and metadata                                                                                                                 |
| metadata\[\].id          | string                                                                                     | No       |                                                                                                                                                  |
| metadata\[\].slug        | string                                                                                     | No       | The label, tag or metadata key                                                                                                                   |
| metadata\[\].value       | object                                                                                     | No       | The label, tag or metadata value                                                                                                                 |
| metadata\[\].namespace   | string                                                                                     | No       | The origin of the value (eg. labels, tags, metadata)                                                                                             |
| metadata\[\].format      | enum                                                                                       | No       | The data type of the value Values: TEXT, NUMBER, DATE, BOOLEAN, ARRAY, OBJECT                                                                    |
| metadata\[\].extra\_data | object                                                                                     | No       |                                                                                                                                                  |

## TypeScript

```typescript
export type ComputeDeployment = {
	id?: string; // Unique identifier for the deployment
	created_at?: string-time; // When the deployment was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // When the deployment was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	service_id?: string; // The service this deployment belongs to
	status?: 'QUEUED' | 'BUILDING' | 'DEPLOYING' | 'LIVE' | 'FAILED' | 'CANCELED' | 'SUPERSEDED' | 'OTHER'; // Normalized deployment status; set to CANCELED on update to cancel
	trigger?: 'GIT' | 'MANUAL' | 'API' | 'ROLLBACK' | 'OTHER'; // What started the deployment
	environment?: 'PRODUCTION' | 'PREVIEW' | 'DEVELOPMENT' | 'OTHER'; // Target environment
	commit_identifier?: string; // Source commit SHA (reference to RepoCommit)
	commit_message?: string; // Source commit message
	branch?: string; // Source branch
	image?: string; // Container image deployed, for image-based services
	url?: string; // URL where this deployment is served
	started_at?: string-time; // When the build started (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	finished_at?: string-time; // When the deployment finished (live, failed or canceled) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	error?: string; // Failure description
	metadata?: []; // Vendor labels, tags and metadata
	raw?: any; // Raw data from integration
} 
```

## Zod

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

export const ZodComputeDeployment = z.object({
	id: z.string().optional().describe("Unique identifier for the deployment"),
	created_at: z.string-time().optional().describe("When the deployment was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("When the deployment was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	service_id: z.string().optional().describe("The service this deployment belongs to"),
	status: z.enum("QUEUED", "BUILDING", "DEPLOYING", "LIVE", "FAILED", "CANCELED", "SUPERSEDED", "OTHER").optional().describe("Normalized deployment status; set to CANCELED on update to cancel"),
	trigger: z.enum("GIT", "MANUAL", "API", "ROLLBACK", "OTHER").optional().describe("What started the deployment"),
	environment: z.enum("PRODUCTION", "PREVIEW", "DEVELOPMENT", "OTHER").optional().describe("Target environment"),
	commit_identifier: z.string().optional().describe("Source commit SHA (reference to RepoCommit)"),
	commit_message: z.string().optional().describe("Source commit message"),
	branch: z.string().optional().describe("Source branch"),
	image: z.string().optional().describe("Container image deployed, for image-based services"),
	url: z.string().optional().describe("URL where this deployment is served"),
	started_at: z.string-time().optional().describe("When the build started (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	finished_at: z.string-time().optional().describe("When the deployment finished (live, failed or canceled) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	error: z.string().optional().describe("Failure description"),
	metadata: z.array().optional().describe("Vendor labels, tags and metadata"),

});
```

## Python

```python
import dataclasses

@dataclasses.dataclass
class ComputeDeploymentStatus(str, Enum):
	QUEUED = 'QUEUED'
	BUILDING = 'BUILDING'
	DEPLOYING = 'DEPLOYING'
	LIVE = 'LIVE'
	FAILED = 'FAILED'
	CANCELED = 'CANCELED'
	SUPERSEDED = 'SUPERSEDED'
	OTHER = 'OTHER'

@dataclasses.dataclass
class ComputeDeploymentTrigger(str, Enum):
	GIT = 'GIT'
	MANUAL = 'MANUAL'
	API = 'API'
	ROLLBACK = 'ROLLBACK'
	OTHER = 'OTHER'

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

@dataclasses.dataclass
class ComputeDeployment:
	"""Unique identifier for the deployment"""
	id: Optional[str]
	"""When the deployment was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""When the deployment was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""The service this deployment belongs to"""
	service_id: Optional[str]
	"""Normalized deployment status; set to CANCELED on update to cancel"""
	status: Optional[ComputeDeploymentStatus]
	"""What started the deployment"""
	trigger: Optional[ComputeDeploymentTrigger]
	"""Target environment"""
	environment: Optional[ComputeDeploymentEnvironment]
	"""Source commit SHA (reference to RepoCommit)"""
	commit_identifier: Optional[str]
	"""Source commit message"""
	commit_message: Optional[str]
	"""Source branch"""
	branch: Optional[str]
	"""Container image deployed, for image-based services"""
	image: Optional[str]
	"""URL where this deployment is served"""
	url: Optional[str]
	"""When the build started (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	started_at: Optional[str]
	"""When the deployment finished (live, failed or canceled) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	finished_at: Optional[str]
	"""Failure description"""
	error: Optional[str]
	"""Vendor labels, tags and metadata"""
	metadata: Optional[PropertyComputeDeploymentMetadata]

```
