---
title: "Create Category Rule"
method: POST
path: "/categories/rules"
tags: ["Category"]
---

# Create Category Rule

`POST /categories/rules`

Create a single category rule

## Request body

- CreateClientCategoryRule — Create client category rule
  - `description` string, required — Description of the transaction rule.
  - `categoryId` string, required — Identifier of the category
  - `transactionType` string — Transaction type (DEBIT/CREDIT)
  - `accountType` string — Account type (CHECKING_ACCOUNT/CREDIT_CARD)
  - `matchType` string — Type of match used to identify the rule (exact/contains/startsWith/endsWith), if not provided, defaults to 'exact'

## Response `200`

Creates a Category Rule and recover the result

- ClientCategoryRule — Category rule by client id
  - `description` string, required — Description of the transaction rule.
  - `categoryId` string — Identifier of the category
  - `category` string, required — Description of the category
  - `clientId` string — Identifier of the client
  - `transactionType` string — Transaction type (DEBIT/CREDIT)
  - `accountType` string — Account type (CHECKING_ACCOUNT/CREDIT_CARD)

## Other responses

- `400` — Invalid description
- `404` — Category not found

---

[API](https://skmtc.dev/pluggy/apis/pluggy-api.md) · [All operations](https://skmtc.dev/pluggy/apis/pluggy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pluggy/pluggy-api/revisions/75e87ec7f9cd/schema)
