Association Batch 400 Error

Hello, Im currently getting a 400 - :“VALIDATION_ERROR” “One or more associations are invalid hubspot”.
Endpoint=https://api.hubapi.com/crm/v4/associations/contacts/events/batch/associate/default, Method=POST

JSON:

{

“inputs”: [

**{**

  **"to": {**

    **"id": "20772404047"**

  **},**

  **"from": {**

    **"id": "76785902389"**

  **}**

**},**

**{**

  **"to": {**

    **"id": "20772404047"**

  **},**

  **"from": {**

    **"id": "77609619773"**

  **}**

**},**

**{**

  **"to": {**

    **"id": "20492054288"**

  **},**

  **"from": {**

    **"id": "75467320378"**

  **}**

**},**

**{**

  **"to": {**

    **"id": "20764306582"**

  **},**

  **"from": {**

    **"id": "75811530797"**

  **}**

**},**

**{**

  **"to": {**

    **"id": "20764306582"**

  **},**

  **"from": {**

    **"id": "75805291125"**

  **}**

**},**

**{**

  **"to": {**

    **"id": "20772248440"**

  **},**

  **"from": {**

    **"id": "77092380563"**

  **}**

**},**

**{**

  **"to": {**

    **"id": "20772248440"**

  **},**

  **"from": {**

    **"id": "77382947963"**

  **}**

**},**

**{**

  **"to": {**

    **"id": "20854862119"**

  **},**

  **"from": {**

    **"id": "77482305313"**

  **}**

**},**

**{**

  **"to": {**

    **"id": "20854862119"**

  **},**

  **"from": {**

    **"id": "77456048994"**

  **}**

**},**

**{**

  **"to": {**

    **"id": "20854862119"**

  **},**

  **"from": {**

    **"id": "79285056801"**

  **}**

**},**

**{**

  **"to": {**

    **"id": "20771475857"**

  **},**

  **"from": {**

    **"id": "77796346036"**

  **}**

**},**

**{**

  **"to": {**

    **"id": "20770526282"**

  **},**

  **"from": {**

    **"id": "77796346036"**

  **}**

**},**

**{**

  **"to": {**

    **"id": "20763532967"**

  **},**

  **"from": {**

    **"id": "77796346036"**

  **}**

**},**

**{**

  **"to": {**

    **"id": "22178497883"**

  **},**

  **"from": {**

    **"id": "75522523740"**

  **}**

**},**

**{**

  **"to": {**

    **"id": "22188039347"**

  **},**

  **"from": {**

    **"id": "89459250703"**

  **}**

**},**

**{**

  **"to": {**

    **"id": "22188039347"**

  **},**

  **"from": {**

    **"id": "77066958239"**

  **}**

**},**

**{**

  **"to": {**

    **"id": "22188039347"**

  **},**

  **"from": {**

    **"id": "89499984733"**

  **}**

**},**

**{**

  **"to": {**

    **"id": "22188039347"**

  **},**

  **"from": {**

    **"id": "85239787824"**

  **}**

**},**

**{**

  **"to": {**

    **"id": "22204806433"**

  **},**

  **"from": {**

    **"id": "89551317427"**

  **}**

**},**

**{**

  **"to": {**

    **"id": "22204806433"**

  **},**

  **"from": {**

    **"id": "79284720289"**

  **}**

**}**

]

}

Hi @DGrant5,

The error is likely ocurring because at least one of the IDs is not valid.

Double check to make sure that all the IDs in the “from” input correspond to existing contacts and that the “to” IDs correspond to existing events.

You can run a very basic test with one pair first to ensure that the endpoint is working properly.

{

“inputs”: [

{

“to”: {

“id”: “20772404047”

},

“from”: {

“id”: “76785902389”

}

}

]

}