When Filtering for owner by email get empty response.

I’ve encountered an issue while attempting to retrieve a specific owner’s information using their email address. When I filter for the email using the following API endpoint: https://api.hubapi.com/crm/v3/owners?email=example+hasplus@xyz.com, the query returns an empty result.

I can successfully obtain details for other owners using their email addresses. The issue seems to be isolated to this particular owner. When I request a list of all owners, the owner in question does appear in the response alongside other owners.

It’s worth noting that I’m working within a sandbox account, and the owner I’m trying to access was only invited to this sandbox account. Could this be contributing to the issue?

Hey, @IMcDowell :waving_hand: I believe your instinct is correct — the user will need to accept the invite to show up with an ownerID.

One question — do you have the same result if you make a request to the Get Users endpoint?

GET /settings/v3/users/

Best,

Jaycee

I have accepted the invite with the user account, and I can use Hubspot with the user.
I am still not able to filter for the user by email. I can see the user in the response when using /settings/v3/users/.
This owner is the only onwner with pluses in ther emial, could this be causing the issue?

Hey @IMcDowell :waving_hand: That could be it. I know in other situations where special characters cause issues in URL params, we have to escape them. In this case, I think the `+` gets interpreted as a “space”. I’m digging a bit to see what the recommended way to escape the `+` is.
Best,

Jaycee

Thanks @Jaycee_Lewis, please let me know what you find :slightly_smiling_face:

@Jaycee_Lewis did you find anything?

Closing the loop here. You do have to escape the plus when using it as a query param.

I made a user using the email example you provided – User Provisioning API, and then made a request to the Owners API. It returned a 200 with the expected User:

Request

curl --request GET \
 --url 'https://api.hubapi.com/crm/v3/owners/?email=example%2Bhasplus%40xyz.com&limit=100&archived=false' \
 --header 'authorization: Bearer YOUR_ACCESS_TOKEN'

Response

HTTP 200

{
 "results": [
 {
 "id": "1407217891",
 "email": "example+hasplus@xyz.com",
 "firstName": "Example",
 "lastName": "Hasplus",
 "userId": 67209915,
 "userIdIncludingInactive": 67209915,
 "createdAt": "2024-05-21T02:53:49.173Z",
 "updatedAt": "2024-05-21T02:53:49.173Z",
 "archived": false
 }
 ]
}

I hope this helps folks who run into similar issues! — Jaycee