issues running example contact search query

hi. i’m using the docs here: Accounts Dashboard | HubSpot specifically i’m attempting to do a contact search. i used the doc tool to create a curl the command. the command looks like:

curl --request POST \
--url ‘https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=<redacted>’ \
--header ‘content-type: application/json’ \
--data ‘{
“filterGroups”: [
{
“filters”: [
{
“value”: “pete@example.com”,
“propertyName”: “Email”,
“operator”: “EQ”
}
]
}
],
“sorts”: [
“vid”
],
“properties”: [
“vid”
],
“limit”: 1,
“after”: 0
}’

and this fails with:

{“status”:“error”,“message”:“There was a problem with the request.”,“correlationId”:“cde96cb7-ff08-4143-bd02-2916675e8fb2”}

what am i doing wrong?

Hey @mizerlou,

I believe this is likely because the internal property name for Email is `email` and not `Email`.

As such, could you try the following POST body in which I changed `Email` to `email` and it should return a 200 response.

{
"filterGroups": [
{
"filters": [
{
"value": "pete@example.com",
"propertyName": "email",
"operator": "EQ"
}
]
}
],
"sorts": [
"vid"
],
"properties": [
"vid"
],
"limit": 1,
"after": 0
}

thanks, that fixed my problem.