---
title: "Create Custom Rule"
method: POST
path: "/api/v1/custom-rules"
tags: ["custom-rules"]
---

# Create Custom Rule

`POST /api/v1/custom-rules`

## Request

- Base URL: `https://app.kaminari.ad`
- URL: `https://app.kaminari.ad/api/v1/custom-rules`
- Auth: HTTP bearer

Create a custom tag rule.

## Request body

- CreateCustomRuleRequest: Request body for POST /custom-rules.
  - `name` string, required
  - `tag_slug` string
  - `rule_type` string, required
  - `config` object, required
  - `target` string
  - `tag_visibility` object, nullable

## Response `201`

Successful Response

- CustomRuleResponse: Custom tag rule returned by API.
  - `id` string, uuid, required
  - `organization_id` string, uuid, nullable, required
  - `name` string, required
  - `tag_slug` string, required
  - `rule_type` string, required
  - `config` object, required
  - `target` string, required
  - `is_active` boolean, required
  - `created_at` string, date-time, required
  - `scope` string
  - `tag_visibility` object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/kaminari/apis/kaminari-ad-api.md) · [All operations](https://skmtc.dev/kaminari/apis/kaminari-ad-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kaminari/apis/kaminari-ad-api/revisions/013f86e2fd32?raw)
