Update to creating deals with invalid associations



Hi everyone

Next Monday, we’ll be making a change to the create deal endpoint. Currently, when you try to create a deal with invalid object IDs in the "associations" data, we’ll return a 400 error and will not create a new deal.

Starting next Monday, including invalid associations will not prevent the deal from being created, so if there is invalid data in the "associations" data, you will receive a 200 response, and the deal will be created, but you’ll receive an additional "associationCreateFailures" field in the response that will include details about the failed associations.

The "associationCreateFailures" field will have the following format:

"associationCreateFailures": [
      "association": {
        "fromObjectId": 1,
        "associationType": "COMPANY_TO_DEAL",
        "toObjectId": 5464192,
        "timestamp": 1508187481409
      "failReason": "INVALID_OBJECT_IDS",
      "message": "COMPANY=1 is not valid"

Please let us know if you have any questions about this change.


@dadams Is there any way to subscribe to receive only the official hubspot dev announcements in email? This way we can ensure we don’t miss any important announcements? Currently official announcements are mixed with all other topics in newsletters, which is not convenient for prioritized consumption. Thanks!


Hi @coffeeocean

All announcements for changes or updates get made through the announcements category. If you view the category page and click the circle button in the top right, you can watch for new posts in the category to get a notification whenever a new update is posted.



Hi Dadams,

Will the “cause” field be always null or we can expect any structure / information in this field?


@H3xas the cause field was always set to null, and as a result it was actually removed from the API right before this change went live, so you shouldn’t see it as part of the response.