This can be done using the publisher/user/search API endpoint
In order to filter based on custom fields, it is necessary to first add the parameter source=CF followed by the (encoded) criteria used to filter based on the relevant custom field/s.
For example, the custom field string can have the following format:
[{"field_name":"custom_field","data_type":"BOOLEAN","condition":{"type":"EQUAL","equal":"true"},"response_time":{"type":"CURRENT"}}]
Once the API call is executed, it will return a single registry.
Here is a sample curl POST request:
curl --location --request POST 'https://sandbox.piano.io/api/v3/publisher/user/search?api_token=TOKEN_VALUE' \\
--header 'Content-Type: application/x-www-form-urlencoded' \\
--data-urlencode 'aid=vwpqa2omsu' \\
--data-urlencode 'exclude_cf_metadata=true' \\
--data-urlencode 'source=CF' \\
--data-urlencode 'custom_fields=[{"field_name": "mobile","data_type": "NUMBER","condition": {"type": "EQUAL","equal": "0503027844"},"response_time": {"type": "CURRENT"}}]'