---
title: "Create Rule"
method: POST
path: "/mapping"
tags: ["enrichment", "mapping"]
---

# Create Rule

`POST /mapping`

Create a new mapping rule

## Request body

- MappingRuleDtoIn
  - `name` string, required
  - `description` string
  - `file_name` string
  - `priority` integer
  - `matchers` string[], required
  - `type` 'csv' | 'topology'
  - `rows` object[]

## Response `200`

Successful Response

- MappingRule
  - `id` integer
  - `tenant_id` string, required
  - `priority` integer
  - `name` string, required
  - `description` string
  - `file_name` string
  - `created_by` string
  - `created_at` string, date-time
  - `disabled` boolean
  - `override` boolean
  - `condition` string
  - `type` string, required
  - `matchers` string[], required
  - `rows` object[]
  - `updated_by` string
  - `last_updated_at` string, date-time

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/keephq/apis/keep-api.md) · [All operations](https://skmtc.net/keephq/apis/keep-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/keephq/keep-api/versions/bb4a0896091f/schema)
