---
title: "Add Account Rule"
method: POST
path: "/api/admin/account-rules"
tags: ["Admin"]
---

# Add Account Rule

`POST /api/admin/account-rules`

Add a typed account rule (Admin only).

## Request body

- AddAccountRuleRequest
  - `match_type` string, required — role|user_id|email|email_domain|company
  - `match_value` string, required — Value to match
  - `category` string, nullable — internal, pilot, or null (billing-only)
  - `label` string, nullable — Friendly display name (optional)
  - `exempt_billing` boolean — Waive invoices for matched accounts
  - `exempt_analytics` boolean — Hide matched accounts from admin stats
  - `reason` string, nullable — Why this rule exists

## Response `200`

Successful Response

- MessageResponse
  - `success` boolean
  - `message` string, required

## Other responses

- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/compresr/apis/compresr-platform-api.md) · [All operations](https://skmtc.net/compresr/apis/compresr-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/compresr/compresr-platform-api/revisions/93ee959dfa51/schema)
