You can use a legacy action set or setup a ton of rules in decision diamond. It’s highlighted here:
Since you’re using the API, you can just send an HTTP POST with the contactId and then use a PHP script to check the field + run an action set if empty.
FYI- when searching, there’s a ‘Data Exists’ search option under Misc Criteria BUT it only works with standard fields, so wouldn’t really help in this case…