Hi,
I’m trying to perform a batch update on Contacts using email as the idProperty , but I’m encountering the following error:
{
"status": "error",
"message": "Unable to perform update/upsert by non-unique 0-1 property email in portal ID 43945711",
"correlationId": "124f585a-3afb-476b-80d7-da7d993fe41f",
"category": "VALIDATION_ERROR"
}
Request body:
POST https://api.hubapi.com/crm/v3/objects/contacts/batch/update
{
"inputs": [
{
"objectWriteTraceId": "0",
"properties": { "firstname": "Ben" },
"idProperty": "email",
"id": "contact@email.com"
},
{
"objectWriteTraceId": "1",
"properties": { "firstname": "Jane" },
"idProperty": "email",
"id": "communications@email.com"
}
]
}
Also, when I attempt a batch upsert with email as idProperty, same issue:
{
"status": "error",
"message": "Cannot perform a partial upsert with email. To get around this limitation, omit `objectWriteTraceId` and try again.",
"correlationId": "a2297f02-7198-4aca-b0c2-56adac413a48",
"category": "VALIDATION_ERROR"
}
Request body:
POST https://api.hubapi.com/crm/v3/objects/contacts/batch/upsert
{
"inputs": [
{
"objectWriteTraceId": "0",
"properties": { "firstname": "Ben" },
"idProperty": "email",
"id": "contact@email.com"
},
{
"objectWriteTraceId": "1",
"properties": { "firstname": "Jane" },
"idProperty": "email",
"id": "communications@email.com"
}
]
}
Additional notes:
- The issue does not occur when using another unique field as idProperty.
- Simple (single) updates/upserts work fine with email as idProperty.
- The documentation states that email is treated as a unique identifier, but in batch operations, the API treats it as non-unique.
Question:
Why is email documented as a unique identifier but restricted in batch update/upsert operations? Is this a known limitation or a bug?
