Post

2 followers Follow
0
Avatar

API Search Contact by Email Address

Nezir Gonenc

Hello,

I am trying to find out which of our members have also registered with Ontraport. I checked the API documentations but it only uses ids of the contacts which is not a good way to search contacts. Is there a way to do this search by e-mail?

I was trying to use following URL;

https://api.ontraport.com/1/Contact?email=someone%40domain.com

but I receive status code 400 "invalid e-mail" message every time although the member is in Ontraport.

And the API key that I am using allows me to "Search Contacts" and "Manage Fields".

 

Thanks in advance,

Nezir

 

Answered

Official comment

Avatar

Try this:

https://api.ontraport.com/1/Contacts?ids=0&range=50&search=someone%40domain.com

That should return a response body like this:

{

"code": 0,
"data": [
  { "id": "127",
     "owner": "1",
     "firstname": "Frank",
     "lastname": "Hagan",
     "email": "someone@domain.com"
     etc .....


You can test this out at our Live doc at https://api.ontraport.com/live/#!/Contacts/getContacts.

Put a valid API Key and App ID at the top of the page then use "0" for the ID and set the "Search" to "someone@domain.com" as shown here with my email address:


Click the "Try it out!" button and you'll see the Request URL that is built for you and the response body. 

Frank Hagan

Please sign in to leave a comment.

1 comment