---
title: "Create model"
method: POST
path: "/v1/models"
tags: ["Models"]
---

# Create model

`POST /v1/models`

Create a new model. The typical workflow for using this endpoint is:

1. Create a schema model using this endpoint
2. Use the [Refresh schema](/api/models/refresh-schema) endpoint to load the schema for the created model
3. Create shared models based on the schema model

## Request body

- object
  - `connectionId` string, uuid, required — ID of the connection the model is based on.
  - `modelKind` 'SCHEMA' | 'SHARED' | 'SHARED_EXTENSION' | 'BRANCH' — Type of model. - `SCHEMA` - Mirrors the database structure - `SHARED` - Represents the universal, governed data model that workbooks are based on - `SHARED_EXTENSION` - Represents an extension to the `SHARED` model. Can be used to dynamically extend the `SHARED` model based on user attributes, or as a model that workbooks are based on in a departmental use case. - `BRANCH` - A model layer that is used to develop modifications to the production shared model For more information, see the [Modeling documentation](/modeling).
  - `modelName` string — Name of the model.
  - `baseModelId` string — **Applicable to branch and extension models.** ID of the base model.
  - `accessGrants` object[] — List of [access grants](/modeling/develop/data-access-control) for the model.
    - `name` string — Name of the access grant.
    - `accessBoostable` boolean — If `true`, the access grant can be boosted.
  - `allowAsWorkbookBase` boolean — **Only applicable to `SHARED_EXTENSION` models**. If `true`, allows the model to be selected as a base model when creating workbooks.
  - `useIsolatedBranches` boolean — **Only applicable to `SHARED_EXTENSION` models**. If `true`, branches are shown on the extension model page instead of parent shared model.

## Response `200`

Model created successfully

- object
  - `error` string — Error message if creation failed
  - `message` string — Additional message
  - `model` object — Details about the model
    - `id` string, uuid — ID of the created model.
    - `modelKind` string — The type of model.
    - `name` string — The name of the model.
  - `success` boolean — Indicates if the operation succeeded

## Other responses

- `400` — Bad Request Possible error messages: - `Bad Request: Invalid parameter value` - `Bad Request: Schema model already exists for the connection` - `Bad Request: Schema model does not exist when creating a non-schema model` - `Bad Request: Shared model cannot be created when branch schema refresh is enabled`
- `403` — Forbidden Possible error messages: - `Forbidden`
- `429` — Too Many Requests - Rate limit exceeded (60 requests/minute)

---

[API](https://skmtc.net/omni/apis/omni-api.md) · [All operations](https://skmtc.net/omni/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/omni/omni-api/revisions/6b02f7349d0e/schema)
