Unable to create a deal


I’m trying to create a deal through the API, but I’m getting this error message back, and I’m really not sure what it means:

{“status”:“error”,“message”:“Property values were not valid”,“correlationId”:“658910a6-270c-4395-b17a-869ed230c69f”,“validationResults”:[{“isValid”:false,“message”:“duplicate property value”,“error”:“DUPLICATE_PROPERTY_TO_SAVE”,“name”:""}],“requestId”:“3acd020d-9214-4022-ba12-5b207360cfbe”}

I’ve tried this with a variety of values, and the response is always the same (the ids change but not the message/result).

Is there a way to figure out which specific field or fields are duplicated?


@peter do you have an example of the data you’re using when you get that response?


Sure thing:

{“portalId”:“1943696”,“properties”:[{“property”:“dealname”,“value”:“Order #172378”},{“property”:“dealstage”,“value”:“closedwon”},{“property”:“pipeline”,“value”:“default”},{“property”:“closedate”,“value”:1473792642},{“property”:“amount”,“value”:11.8},{“property”:“dealtype”,“value”:“newbusiness”},{“property”:“description”,“value”:“Membership Event”}]}


Thanks Peter.

The Deals API uses "name" to indicate the name of the property you want to set, not "property":

    "name": "dealname",
    "value": "Order #172378"


Yikes - sometimes it’s the little ones that slip by! Thanks!


I was caught by this… didn’t read the example closely enough. To that end, I have a few questions for @hubspot:

  1. Is there a benefit to structuring the deal api properties under the “name” key instead of “property” like the contact endpoint?
    1.a. Why is the contact endpoint structured around “properties” unlike the others?
  2. Can you put a big note on the deal endpoint pages that makes this more obvious (silly, I know, but it’s a huge gotcha)?