---
title: "CreateElementBody"
description: "Request body for creating an Element."
section: "Reference"
group: "Types"
order: 72
---

## Definition

```ts
interface CreateElementBody {
  workspaceId: string;
  name: string;
  description?: string | undefined;
  visibility?: "private" | "public" | undefined;
  files?: Array<{ path: string; content: string }> | undefined;
}
```

## Fields

| Field         | Type                                                     | Notes                                                                                |
| ------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| `workspaceId` | `string`                                                 | `required` — Workspace that will own the new element.                                |
| `name`        | `string`                                                 | `required` — Element name                                                            |
| `description` | `string \| undefined`                                    | `optional` — Element description                                                     |
| `visibility`  | `"private" \| "public" \| undefined`                     | `optional` — Visibility: private (default) or public                                 |
| `files`       | `Array<{ path: string; content: string; }> \| undefined` | `optional` — File path relative to the element source root (e.g. `src/element.tsx`). |
