---
title: "create data model"
method: POST
path: "/data-models"
tags: ["data model"]
---

# create data model

`POST /data-models`

## Request body

- DataModelAPIModifyDataModel
  - `body` string — The python body of the data model
  - `description` string — The description of the data model
  - `displayName` string — The name used for the data model
  - `enabled` boolean — enables/disables a data model
  - `id` string, required — The id of the data model
  - `logTypes` string[] — The log type this data model should associate to. NOTE: only one data model can be assigned to a log type
  - `mappings` DataModelAPIDataModelMapping[]
    - `method` string — the python function name that should be called
    - `name` string, required — the name of the mapping
    - `path` string — the json path

## Response `200`

OK response.

- DataModelAPIDataModel
  - `body` string — The python body of the data model
  - `createdAt` string
  - `description` string — The description of the data model
  - `displayName` string — The name used for the data model
  - `enabled` boolean — enables/disables a data model
  - `id` string — The id of the data model
  - `lastModified` string
  - `logTypes` string[] — The log type this data model should associate to. NOTE: only one data model can be assigned to a log type
  - `mappings` DataModelAPIDataModelMapping[]
    - `method` string — the python function name that should be called
    - `name` string, required — the name of the mapping
    - `path` string — the json path

## Other responses

- `400` — bad_request: Bad Request response.
- `409` — exists: Conflict response.

---

[API](https://skmtc.dev/panther/apis/panther-rest-api.md) · [All operations](https://skmtc.dev/panther/apis/panther-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/panther/panther-rest-api/revisions/eb177cb9d6a1/schema)
