How do I use findByEmail()

Ya’ll need better documentation.

I see after more hunting and reading tea leaves that findByEmail is not a function of the REST API, only the XML-RPC API.

It is not clear from this page (outside of the URL) that this documentation only applies to the XML-RPC side of the API.

To be frank, your REST API should have been updated with the same functionality.

If I use $infusionsoft->contacts('xml')->findByEmail( $email, $returnValues ); then it will work. It should be A LOT CLEARER in your GitHub that you have two different API accessors within this SDK.

I have run into nothing, but fits and starts in using this API. It looks capable, but it is extremely disorganized, poorly documented, and the support channels are split between GitHub and whatever this is.

It would be great if the Infusionsoft API team would put a little more care into documenting and providing a clear, unified communication channel for supporting the API.

1 Like


The REST documentation documents list contacts (GET /contacts) as having email as a query parameter to index on. This will return an array of all contacts that satisfy that email address. In the future, you may not want to assume that the same names and structure would be the same for REST as by definition, REST is a completely different standard than an XML-RPC design so it would reason that you would find it under the /contacts object of the endpoint.

Because of the patchwork of documentation and the lack of clarity as to which documentation goes with which method, I was looking through the PHP SDK for methods available to me there. It was not clear that methods in /src/Infusionsoft/Api/ are XML-RPC only and REST methods are defined only in classes in /src/Infusionsoft/Api/Rest/ and there was no interopt or inheriting of methods.

I place this confusion in documentation squarely on the Infusionsoft API team’s shoulders.

Do better.

Looking in github is never the first place to find documentation (going by what you posted an image of anyway) for any systems api. Asking where to find the docs or asking what you need would have been more productive than just blowing off steam. This is a great community and you’ll find that you will get a lot more accurate and faster answers from the community if you wish to utilize it (just fyi in case you were’t aware of all the resources available). There is an IS api FB page that is amazingly helpful and an open user’s group that many of us programmers help people on as well as this forum.

For most, these have been the best and fastest source of help.

I do not use Facebook, and I recommend that others not to turn to Facebook for anything either.

That being said, I have used a lot of different API’s in the past (Stripe for example) that do a lot better job of documenting their API and making it’s capabilities clear to developers.

If you’d like to continue to approach me in a defensive way rather than thinking about ways you could make this process better for developers, that is surely your prerogative.

It would seem from many similar queries on this “forum” that it would probably be better for you to focus on ways to make things easier for devs, than to defend what you’re currently doing.

Also, looking at GitHub should be A GREAT PLACE to find documentation. There are not even links on the GitHub to documentation for the REST or XML-RPC methods of accessing the API. That would probably help immensely.

The way I found the PHP SDK was by searching “infusionsoft SDK” in Google and the GitHub was the first thing that showed up.

Putting clear links to the documentation for each method would be a good first-start here.

Not defensive at all @Roy_McKenzie,

You might assume that as it seems you believe I work for Infusionsoft. This community is supported by some of us in the industry on “your side of the fence, in the trenches with you”. Since the best help you will get is from the community, my recommendations were for your benefit not mine. I don’t work for IS and am not paid by anyone to help others but I do help to moderate the forum. So either way, if you would like to complain, this wouldn’t be the place for it as IS has avenues for that. This is a forum meant to help answer specific questions and while some IS employees do help to answer here as well, suggestions about improvements and such are best submitted to

Everything I’ve said to you was to help you get help from those others that do so free of charge. They will be your best resource. If you don’t use FB then you’ll be missing out on a great resource as the community is definitely the best and strongest form of support you will have access to. But they don’t answer to complaints, just to questions about how to do something with the api or in the interface. My comments were meant to help clarify that…I don’t have anything to defend so I believe that is an assumption (probably based on the thinking that I was an IS employee and would ‘want’ to defend). Honestly, @Roy_McKenzie, just trying to help you out :wink:

Glad to hear that you are not defensive, John. If you are not able to help with my main concerns with regard to documentation pitfalls, communication confusion, etc. then I thank you for taking your free time to add your input on this thread and I am looking forward to hearing from a member of the Infusionsoft team that can actually help. :wink:

Find by Email

The REST API has that functionality via the Contacts resource. Example: I used our REST API documentation’s Try the API feature to generate the above example:


The PHP SDK includes the following at the top of the readme:

If you use the Contacts, Orders or Products services, there are now two different classes handling each service - one for REST, one for XML-RPC. This version of the SDK will load the REST class by default. If you still need the XML-RPC class, pass 'xml' as an argument when requesting the object: $infusionsoft->orders('xml')'

I’ll see if anyone has suggestions for making it appear more prominent.

Documentation and Support

This Community forum supports the API as a whole. The GitHub repo you reference is specific to the PHP SDK and its related issues. (There’s also the Facebook group, as John mentioned, but we do not regularly/officially provide support, there.) But I’m in agreement with you: I’d much rather folks all come here. With that in mind, I’ll give some thought to having folks bring their PHP SDK issues here, too.

(Note: I consolidated my individual replies into this one as recommended. Apologies if you receive multiple notifications for my replies.)

Is there a completely read me for migration from old version of XML to the REST in the PHP SDK.

How is possible the half of the functions to be in the REST and half into and only in the XML??

And just to know your API playground is totality not useful ???!?!

Hi Roy, couldn’t resist to log in to say thank you, I’ve been struggling with the “find ByMail” for a while, I had modify the SDK in the past to make it work but with the php 8.1 upgrade the find by mail went missing and your fix allowed me to make it work very quick. I will note that John is saying it’s possible to do it with REST and (GET /contacts) he is right saying that we can’t take for granted what once worked tho.

  • I would appreciate some PHP example in the interactive documentation as the only clean information we have is the 2 or 3 tutorials. I think documentation for less experienced people ( or people that work in this once in a while) can have positive impact on commercializing their quite complex product. As long as there is a way to make it work in the end I consider myself lucky, cheers.