Rules do not seem to be applied to transactions inserted via a POST /transactions request even when the
apply_rules
query parameter is set to true.
You can replicate this by manually creating a transaction that triggers an existing rule (for example to change the payee name) and see it immediately take effect.
After inserting a transaction that should trigger the rule, and viewing transaction the change does not take place, but will if you choose the "Apply Rule" option from the rules page.