Skip to content

conflict

HTTP 409Conflict

The write could not be applied because the target was ambiguous.

Raised by upsert operations when the matching_property value matches more than one existing record, so there is no single record to update.

{
"type": "https://api-docs.ahoy.ai/rest/v1/errors/conflict",
"title": "Conflict",
"status": 409,
"detail": "3 records match ahoy_email='ada@example.com'; upsert needs exactly one.",
"code": "conflict",
"request_id": "req_01J8Z2K9QW3X4Y5Z6A7B8C9D"
}

A reason narrows conflict to a specific cause. New values are additive and never require a version bump, so treat an unrecognised reason as the bare conflict.

reasonMeaning
ambiguous_matchTwo or more records matched the supplied matching_property value.
  • Choose a matching_property that is unique for the object type, such as an external id.
  • Query first with POST /rest/v1/objects/{object_type}/records/query/ to find and merge the duplicates.
  • Use PATCH against an explicit record id when you already know which record you mean.