---
title: "Create an engineering rule"
method: POST
path: "/api/v1/engineering-rules"
tags: ["Execution"]
---

# Create an engineering rule

`POST /api/v1/engineering-rules`

## Request

- Base URL: `https://www.specky.space`
- URL: `https://www.specky.space/api/v1/engineering-rules`
- Auth: HTTP bearer

Creates a workspace-scoped engineering rule. Deactivate or update it through the id-specific endpoint; rules are never deleted from the engineering history.

## Request body

- EngineeringRuleRequest
  - `statement` string, required: Rule statement. Start with MUST, SHOULD, or MAY when possible.
  - `level` 'mandatory' | 'recommended' | 'optional'
  - `collection` string
  - `tags` string[]
  - `languages` string[]
  - `frameworks` string[]
  - `keywords` string[]
  - `must_include_files` string[]
  - `must_not_include_files` string[]
  - `provenance` string
  - `enabled` boolean

## Response `200`

Successful response. Always includes `summary` (string) and `ok: true`; mutating endpoints additionally include the created resource id under a tool-specific key.

- OkSummary
  - `ok` true
  - `summary` string: Human-readable result text.

## Other responses

- `400`: Invalid request body or path
- `401`: Missing or invalid bearer token

---

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