Error batch reading contacts with custom property

I am attempting to make a request to this endpoint to fetch contacts with a custom property - Accounts Dashboard | HubSpot . However, I am receiving the following error

{
 "status": "COMPLETE",
 "results": [],
 "numErrors": 1,
 "errors": [
 {
 "status": "error",
 "category": "OBJECT_NOT_FOUND",
 "message": "Could not get some CONTACT objects, they may be deleted or not exist. Check that ids are valid.",
 "context": {
 "ids": [
 "AC9d12c90a228fd85bb334e7cabfcba435a5716772"
 ]
 }
 }
 ],
 "startedAt": "2024-11-22T16:55:24.150Z",
 "completedAt": "2024-11-22T16:55:24.211Z"
}

This is an example of the curl request I am using:

curl --request POST \
 --url 'https://api.hubapi.com/crm/v3/objects/contacts/batch/read' \
 --header 'authorization: Bearer my-token' \
 --header 'content-type: application/json' \
 --data '{
 "properties": ["my_custom_property"],
 "idProperty": "my_custom_property",
 "inputs": [
 {
 "id": "AC9d12c90a228fd85bb334e7cabfcba435a5716772"
 }
 ]
}'

The contact definitely exists and contains this property + value. Is the request body incorrect in some way that I am not understanding?

Hi @LUnderwood :waving_hand:

Is your custom property configured as a “unique identifier” (i.e. the property’s hasUniqueValue attribute is set to true)? If not, you won’t be able to use it as an idProperty for any HubSpot APIs that support this feature. More info about how you can configure “unique identifier properties” can be found here (see the

“Create unique identifier properties” section).

I hope this proves helpful. Please let me know if you have any follow-up questions.