---
title: "Add an always-allow rule"
method: POST
path: "/v1/approval-rules"
tags: ["Board"]
---

# Add an always-allow rule

`POST /v1/approval-rules`

## Request

- Base URL: `https://api.shardflux.dev`
- URL: `https://api.shardflux.dev/v1/approval-rules`
- Auth: HTTP bearer

Requests for `tool` whose command (or path, URL) starts with `pattern` are approved for the board’s conversations of the project (`project_id`), or of every project (null, people only).

## Request body

- object
  - `tool` string, required
  - `pattern` string, required
  - `project_id` string, uuid, nullable: UUIDv7, lowercase canonical form.
  - `organization_id` string, uuid: UUIDv7, lowercase canonical form.

## Response `201`

Default Response

- ApprovalRule
  - `id` string, required
  - `tool` string, required: The tool as the harness names it (Bash, WebFetch, Edit).
  - `pattern` string, required: The command prefix (or path, URL) it allows; empty allows every use of the tool.
  - `project_id` string, uuid, nullable, required: UUIDv7, lowercase canonical form.
  - `created_at` string, date-time, required: RFC 3339 UTC timestamp with Z.

## Other responses

- `4XX`: Default Response
- `5XX`: Default Response

---

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