---
title: "Create transaction category rule"
method: POST
path: "/beta/transactions/rules/v1/create"
tags: ["plaid"]
---

# Create transaction category rule

`POST /beta/transactions/rules/v1/create`

The `/beta/transactions/rules/v1/create` endpoint creates transaction categorization rules.

Rules will be applied on the Item's transactions returned in `/transactions/get` response.

The product is currently in beta. To request access, contact transactions-feedback@plaid.com.

## Request body

- TransactionsRulesCreateRequest — TransactionsRulesCreateRequest defines the request schema for `/beta/transactions/rules/v1/create`
  - `client_id` string — Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.
  - `secret` string — Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.
  - `client_user_id` string, required — A unique ID representing the end user. This ID is used to associate rules with a specific user.
  - `pfc_primary_category` string, required — A personal finance primary category. See the [taxonomy csv file](https://plaid.com/documents/pfc-taxonomy-all.csv) for a full list of personal finance categories.
  - `pfc_detailed_category` string, required — A personal finance detailed category. See the [taxonomy csv file](https://plaid.com/documents/pfc-taxonomy-all.csv) for a full list of personal finance categories.
  - `rule_details` TransactionsRuleDetails, required — A representation of transactions rule details.
    - `field` 'TRANSACTION_ID' | 'MERCHANT_NAME', required — Transaction field for which the rule is defined.
    - `type` 'EXACT_MATCH' | 'SUBSTRING_MATCH', required — Transaction rule's match type. For `TRANSACTION_ID` field, `EXACT_MATCH` is available. Matches are case sensitive.
    - `query` string, required — For `TRANSACTION_ID` field, provide `transaction_id`. For `MERCHANT_NAME` field, provide a string pattern.

## Response `200`

OK

- TransactionsRulesCreateResponse — TransactionsRulesCreateResponse defines the response schema for `/beta/transactions/rules/v1/create`
  - `rule` TransactionsCategoryRule, required — A representation of a transactions category rule.
    - `id` string — A unique identifier of the rule created
    - `user_id` string — The Plaid-generated unique identifier for the end user this rule belongs to.
    - `created_at` string, date-time — Date and time when a rule was created in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format ( `YYYY-MM-DDTHH:mm:ssZ` ).
    - `updated_at` string, date-time — Date and time when a rule was last updated in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format ( `YYYY-MM-DDTHH:mm:ssZ` ).
    - `pfc_primary_category` string — A personal finance primary category. See the [taxonomy csv file](https://plaid.com/documents/pfc-taxonomy-all.csv) for a full list of personal finance categories.
    - `pfc_detailed_category` string — A personal finance detailed category. See the [taxonomy csv file](https://plaid.com/documents/pfc-taxonomy-all.csv) for a full list of personal finance categories.
    - `rule_details` TransactionsRuleDetails — A representation of transactions rule details.
      - `field` 'TRANSACTION_ID' | 'MERCHANT_NAME', required — Transaction field for which the rule is defined.
      - `type` 'EXACT_MATCH' | 'SUBSTRING_MATCH', required — Transaction rule's match type. For `TRANSACTION_ID` field, `EXACT_MATCH` is available. Matches are case sensitive.
      - `query` string, required — For `TRANSACTION_ID` field, provide `transaction_id`. For `MERCHANT_NAME` field, provide a string pattern.
  - `request_id` string, required — A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.

## Other responses

- `default` — Error response

---

[API](https://skmtc.net/plaid/apis/the-plaid-api.md) · [All operations](https://skmtc.net/plaid/apis/the-plaid-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/plaid/the-plaid-api/versions/64c4514ea59b/schema)
