POST-Request: Create Contact: Relate Contact to Company, but not by Name

Hi, does anyone know if it is possible to relate Contacts with Companies with the following Request Mautic Developer Documentation ?
Normally it is possible by adding company-parameter to the postdata like this:
$contactData = [
‘firstname’ => ‘John’,
‘lastname’ => ‘Doe’,
‘email’ => 'john@doe.com,
‘company’ => ‘Company Name A’]
But we have Companies that can share the same Company-Name, which is why we added an additional custom Field as unique identifier in Mautic GUI.
Is it possible to define the Contact-Company-Relation during Mautic Developer Documentation while using custom fields for the unique identifier instead of the companyname?