PUT
/
crm-associations
/
v1
/
associations
/
create-batch
Create multiple associations between CRM objects
curl --request PUT \
  --url https://api.hubapi.com/crm-associations/v1/associations/create-batch \
  --header 'Content-Type: application/json' \
  --data '[
  {
    "fromObjectId": "<string>",
    "toObjectId": "<string>",
    "category": "<string>",
    "definitionId": "<string>"
  }
]'
"\n\nExample PUT URL:\n\nhttps://api.hubapi.com/crm-associations/v1/associations/create-batch\n\nExample PUT JSON (associating two contacts with the same ticket):\n\n[\n  {\n    \"fromObjectId\": 496346,\n    \"toObjectId\": 176602,\n    \"category\": \"HUBSPOT_DEFINED\",\n    \"definitionId\": 15\n  },\n  {\n    \"fromObjectId\": 491646,\n    \"toObjectId\": 176602,\n    \"category\": \"HUBSPOT_DEFINED\",\n    \"definitionId\": 15\n  }\n]\n\nReturns a 204 No Content response on success.\n\nReturns a 400 response if there are any errors with the associations.\nThe response will include a list of error messsages for each issue.\n{\n  \"status\": \"error\",\n  \"message\": \"One or more associations are invalid\",\n  \"errors\": [\n    \"CONTACT=1 is not valid\"\n  ]\n}\n"

Body

application/json · object[]

The body is of type object[].

Response

200 - application/json

Successful response - Create multiple associations between CRM objects

The response is of type object.