---
title: "Create a rule"
method: POST
path: "/api/rules"
tags: ["Rules"]
---

# Create a rule

`POST /api/rules`

## Request

- Base URL: `https://api.historis.app`
- URL: `https://api.historis.app/api/rules`
- Auth: HTTP bearer

## Request body

- RuleInput
  - `name` string, required
  - `body` string, required: Markdown rule body
  - `enabled` boolean

## Response `201`

Created rule

- object

## Other responses

- `400`: Request failed schema validation
- `401`: Missing or invalid credentials
- `429`: Rate limit exceeded for the caller's identity/plan
- `500`: Internal server error

---

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