---
title: "Element"
description: "The `Element` entity."
section: "Reference"
group: "Types"
order: 71
---

## Definition

```ts
interface Element {
  id: string;
  workspaceId: string | null;
  name: string;
  description: string | null;
  status: "draft" | "live";
  visibility: "private" | "public";
  defaultVersionId: string | null;
  defaultExportName: string | null;
  createdBy: string | null;
  deletedAt: string | null;
  retentionTier: "short" | "medium" | "long" | "none" | null;
  createdAt: string;
  updatedAt: string;
}
```

## Fields

| Field               | Type                                              | Notes                                                                                                                                                                                                         |
| ------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                | `string`                                          | `readonly` `required`                                                                                                                                                                                         |
| `workspaceId`       | `string \| null`                                  | `required` — Workspace that owns this element.                                                                                                                                                                |
| `name`              | `string`                                          | `required` — Human-readable element name.                                                                                                                                                                     |
| `description`       | `string \| null`                                  | `required` — Optional longer-form description.                                                                                                                                                                |
| `status`            | `"draft" \| "live"`                               | `required` — Lifecycle status. Transitions from 'draft' to 'live' on first successful deploy.                                                                                                                 |
| `visibility`        | `"private" \| "public"`                           | `required` — Access mode — 'private' to the workspace, or 'public' across workspaces.                                                                                                                         |
| `defaultVersionId`  | `string \| null`                                  | `required` — Version served as the default when embedding; null until published.                                                                                                                              |
| `defaultExportName` | `string \| null`                                  | `required` — Named export of the default version's bundle. Null = `default`. Non-null when this element aliases a named export of another element's bundle (e.g. CardHeader aliasing the Card family bundle). |
| `createdBy`         | `string \| null`                                  | `required` — User who created the element.                                                                                                                                                                    |
| `deletedAt`         | `string \| null`                                  | `required` — ISO-8601 timestamp of soft-delete; null while active. Cleanup worker hard-deletes once `deletedAt + retentionTier.days` passes.                                                                  |
| `retentionTier`     | `"short" \| "medium" \| "long" \| "none" \| null` | `required` — Retention tier snapshotted at delete time. `short`=7d, `medium`=30d, `long`=90d, `none`=never. Null while active.                                                                                |
| `createdAt`         | `string`                                          | `readonly` `required` — ISO-8601 timestamp of creation.                                                                                                                                                       |
| `updatedAt`         | `string`                                          | `readonly` `required` — ISO-8601 timestamp of the last update.                                                                                                                                                |
