# Create

Launch stage: GA

`POST /api/2.1/unity-catalog/schemas`

Creates a new schema for catalog in the Metastore.
 The caller must be a metastore admin, or have the **CREATE_SCHEMA** privilege in the parent catalog.

API scopes: unity-catalog

## Request body

- `name` (string, optional)
  Name of schema, relative to parent catalog.
- `catalog_name` (string, optional)
  Name of parent catalog.
- `owner` (string, optional)
  Username of current owner of schema.
- `comment` (string, optional)
  User-provided free-form text description.
- `storage_root` (string, optional)
  Storage root URL for managed tables within schema.
- `enable_predictive_optimization` (string, optional)
  Whether predictive optimization should be enabled for this object and objects under it.
- `metastore_id` (string, optional)
  Unique identifier of parent metastore.
- `full_name` (string, optional)
  Full name of schema, in form of __catalog_name__.__schema_name__.
- `created_at` (int64, optional)
  Time at which this schema was created, in epoch milliseconds.
- `created_by` (string, optional)
  Username of schema creator.
- `updated_at` (int64, optional)
  Time at which this schema was created, in epoch milliseconds.
- `updated_by` (string, optional)
  Username of user who last modified schema.
- `catalog_type` (string, optional)
  The type of the parent catalog.
  Possible values: `MANAGED_CATALOG`, `DELTASHARING_CATALOG`, `SYSTEM_CATALOG`, `INTERNAL_CATALOG`, `FOREIGN_CATALOG`, `MANAGED_ONLINE_CATALOG`
- `storage_location` (string, optional)
  Storage location for managed tables within schema.
- `effective_predictive_optimization_flag` (object, optional)
  - `value` (string, optional)
    Whether predictive optimization should be enabled for this object and objects under it.
  - `inherited_from_type` (string, optional)
    The type of the object from which the flag was inherited. If there was no inheritance, this field is left blank.
  - `inherited_from_name` (string, optional)
    The name of the object from which the flag was inherited. If there was no inheritance, this field is left blank.
- `schema_id` (string, optional)
  The unique identifier of the schema.
- `browse_only` (boolean, optional)
  Indicates whether the principal is limited to retrieving metadata for the associated object through the BROWSE privilege when include_browse is enabled in the request.
- `custom_max_retention_hours` (int64, optional, Public Preview)
  Custom maximum retention period in hours for the schema.
- `properties` (object, optional)
  A map of key-value properties attached to the securable.
- `options` (object, optional)
  A map of key-value properties attached to the securable.

## Returns

Returns the SchemaInfo object.

## Response

```json
{
  "name": "string",
  "catalog_name": "string",
  "owner": "string",
  "comment": "string",
  "storage_root": "string",
  "enable_predictive_optimization": "string",
  "metastore_id": "string",
  "full_name": "string",
  "created_at": 0,
  "created_by": "string",
  "updated_at": 0,
  "updated_by": "string",
  "catalog_type": "string",
  "storage_location": "string",
  "effective_predictive_optimization_flag": {
    "value": "string",
    "inherited_from_type": "string",
    "inherited_from_name": "string"
  },
  "schema_id": "string",
  "browse_only": true,
  "custom_max_retention_hours": 0,
  "properties": {},
  "options": {}
}
```

