---
title: "AppDomain"
description: "The `AppDomain` entity."
section: "Reference"
group: "Types"
order: 24
---

## Definition

```ts
interface AppDomain {
  id: string;
  appId: string;
  hostname: string;
  status: "pending" | "active" | "failed";
  lastError: string | null;
  createdBy: string;
  createdAt: string;
  updatedAt: string;
}
```

## Fields

| Field       | Type                                | Notes                                                                                     |
| ----------- | ----------------------------------- | ----------------------------------------------------------------------------------------- |
| `id`        | `string`                            | `readonly` `required`                                                                     |
| `appId`     | `string`                            | `required` — App this custom domain points at.                                            |
| `hostname`  | `string`                            | `required` — Fully-qualified hostname bound to the app (e.g. 'shop.acme.com').            |
| `status`    | `"pending" \| "active" \| "failed"` | `required` — 'pending' during verification, 'active' once SSL is live, 'failed' on error. |
| `lastError` | `string \| null`                    | `required` — Most recent verification or provisioning error, if any.                      |
| `createdBy` | `string`                            | `required` — User who added the domain.                                                   |
| `createdAt` | `string`                            | `readonly` `required` — ISO-8601 timestamp of creation.                                   |
| `updatedAt` | `string`                            | `readonly` `required` — ISO-8601 timestamp of the last update.                            |
