onDuty Request approval from API

onDuty Request approval from API

use case

We have custom CRM modules and meeting devices where a user can add meeting details 

We are pushing these details to People using onDuty Request API

Now what we want is

If the onDuty request is pushed using API, it should be auto approved i-e it shouldn't go through the approval process 

and if it is entered manually on People, it should go through the approval process 

How can we achieve our requirement?