Rule is not triggered on update of a record via API

Rule is not triggered on update of a record via API

Hello,

We are using API to update Contact's last login date and number of days after last login fields. 
We have Rule, which is triggered everytime Contact is updated, there is a condition to create a task for the contact owner if number of days from last login is equal to a number.

It used to work, but now it does not work. And rule is not triggered by API update.

When I update contact manualy, rule is triggered. So conditions in the rule are correct.

Thank you in advance,

Ivan