API search request not working when email address contains plus sign

Lets say I have a contact who has an original email address of bob@gmail.com

If I run the following PUT request to update his email address, this works for me in updating his email address…

https://<account>.api-us1.com/api/3/contacts/<contactid>

{
  "contact": {
    "email": "bob+marry@gmail.com",
    "firstName": "<firstname>",
    "lastName":  "<lastname>"
  }
}

I can then see the change in my Active campaign dashboard for that contact. His email address is changed.

But, if I then run the following API request to get Bob’s info…

https://<account>.api-us1.com/api/3/contacts?search=bob+marry@gmail.com

…That API call returns NULL with no data.

Why is that?

Many thanks on the help

Hi Kensley,

This is a great question! I did some digging and may have found a solution. The + may need to be URL encoded. You could try replacing it with the characters %2b and see if that returns the desired result. I hope that helps.

1 Like

That worked. Thanks!