---
title: "Create Command Rule"
method: POST
path: "/api/comms/{team_key}/tool-approvals/{approval_key}/rules"
tags: ["comms"]
---

# Create Command Rule

`POST /api/comms/{team_key}/tool-approvals/{approval_key}/rules`

## Request

- Base URL: `https://api.superit.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.superit.ai/api/comms/{team_key}/tool-approvals/{approval_key}/rules`
- Auth: HTTP bearer

Create command rule from a tool approval. Requires admin/engineer role on the team.

## Path parameters

- `team_key` string, required
- `approval_key` string, required

## Request body

- CreateCommandRuleRequest: Create command rule request.
  - `ruleType` 'allow' | 'block', required

## Response `201`

Successful Response

- CreateCommandRuleResponse: Create command rule response.
  - `key` string, required
  - `ruleType` string, required
  - `operatingSystem` string, required
  - `pattern` string, required
  - `description` string, required
  - `alreadyExists` boolean

## Other responses

- `400`: Invalid input
- `401`: Not authenticated
- `403`: Forbidden
- `404`: Not found
- `405`: Method not allowed
- `409`: Conflict
- `422`: Validation Error

---

[API](https://skmtc.dev/superit/apis/super-it-api.md) - [All operations](https://skmtc.dev/superit/apis/super-it-api/llms.txt) - [OpenAPI document](https://skmtc.dev/superit/apis/super-it-api/revisions/4944d556c2bb?raw)
