Are you triggering this API from the front end? i.e. does a user have to push a button to trigger create assigned task on a list?
If yes, the variable date would be sent through from there when triggered (presumably using ‘do a search for’)