Skip to main content
POST
/
api
/
rules
Create a single rule
curl --request POST \
  --url https://app.herondata.io/api/rules/ \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "rule": {
    "condition": "equal",
    "date_range": "last_180_days",
    "group": "data_quality_datasource",
    "metric_label": "unique_transactions",
    "name": "notify_if_debt_investment_count_gt_0_last_180d",
    "selector": {
      "is_portfolio": true
    },
    "value": 42.42,
    "value_str": "mrc_12345678ijwdd321d921"
  }
}
'
{
  "rule": {
    "condition": "equal",
    "created": "2025-11-09T16:03:59.607672",
    "date_range": "last_180_days",
    "group": "data_quality_datasource",
    "heron_id": "rul_Dv75UuJ2zg2RExYJsSZLFs",
    "last_updated": "2025-12-21T16:03:59.607704",
    "metric_label": "unique_transactions",
    "name": "notify_if_debt_investment_count_gt_0_last_180d",
    "selector": {
      "is_portfolio": true
    },
    "value": 42.42,
    "value_str": "mrc_12345678ijwdd321d921"
  }
}

Authorizations

x-api-key
string
header
required

Body

application/json
rule
object

Response

201 - application/json

OK

rule
object