Skip to main content
POST
Create a rule

Query Parameters

orgId
string
required

Organization ID. Use GET /v1/companies to discover available org/company pairs.

Example:

"1"

companyId
string
required

Company ID. Use GET /v1/companies to discover available companies and their access levels.

Example:

"1"

Body

application/json
name
string
required
Required string length: 1 - 127
actions
null[]
required

Opaque JSON actions array. Required. Each action is {"field", "value"} with a string, number or boolean value, and field one of: account, assetAccount, feeAssetAccount, accountingDescription, isInternal, customPriceRef, note, extraLabel, status, vat, skipNgl, skipNglReason, tokenPrice, tokenAddress, qboClass, xeroTrackingCategory (any other field is refused with a 400). A Token Price action ({"field":"tokenPrice","value":"2.5"}) must carry a positive decimal string; applying the rule then sets each matching row to amountFiat = amount * value, and feeFiat = fee * value when the fee is paid in the same token. A Token Address action ({"field":"tokenAddress","value":"0x..."}) writes the token contract or mint address onto each matching row; the value must be a non-empty string without whitespace, up to 256 characters, stored verbatim (case preserved).

conditionsLength
integer
required

Number of distinct conditions in conditions. Used by the UI; pass the count.

Required range: x >= 0
actionsLength
integer
required

Number of actions in actions. Used by the UI; pass the count.

Required range: x >= 0
description
string | null
Maximum string length: 255
conditions
any | null

Opaque JSON conditions object. Required. Mirror the shape produced by the Breezing rule-builder UI. Refused with a 400 when it holds no condition (it would match every transaction), when a number value (amount, amountFiat, fee, feeFiat, net, costBasis) has no operator or an operator has no value, when between or notBetween lacks the second value, when a list (tokens, wallets, ...) has no in/notIn operator, or when isFolder is true with no folder.

isActive
boolean
default:true
order
integer
default:0

Apply priority. 0 is the highest priority; rules apply in ascending order.

Required range: x >= 0

Response

Rule created successfully

success
enum<boolean>
required
Available options:
true
data
object
required
Last modified on May 3, 2026