---
title: "CreateSchemaBody"
description: "Request body for creating a Schema."
section: "Reference"
group: "Types"
order: 182
---

## Definition

```ts
interface CreateSchemaBody {
  workspaceId: string;
  name: string;
  slug: string;
  description?: string | undefined;
  definition?: Record<string, unknown> | undefined;
}
```

## Fields

| Field         | Type                                   | Notes                                                |
| ------------- | -------------------------------------- | ---------------------------------------------------- |
| `workspaceId` | `string`                               | `required` — Workspace that will own the new schema. |
| `name`        | `string`                               | `required` — Schema name                             |
| `slug`        | `string`                               | `required` — URL-friendly slug                       |
| `description` | `string \| undefined`                  | `optional` — Schema description                      |
| `definition`  | `Record<string, unknown> \| undefined` | `optional` — Schema definition (JSON Schema)         |
