Hey, @MNaufal
Thanks for the great question. You got yourself so close. Let’s get the rest of the way there 
The best first step when working with the v4 Associations API is to double-check your labels and their IDs. If we make a request here —GET /crm/v4/associations/{fromObjectType}/{toObjectType}/labels , we’ll get the IDs and any labels, if applicable. In this case, we see that for the HubSpot defined associations, 1 = Primary. In my request, 279 (no label) was returned as the other HubSpot defined Contact to Company association.
{
"results": [
{
"category": "USER_DEFINED",
"typeId": 27,
"label": "Test 1"
},
{
"category": "HUBSPOT_DEFINED",
"typeId": 279,
"label": null
},
{
"category": "USER_DEFINED",
"typeId": 31,
"label": "Vendor"
},
{
"category": "HUBSPOT_DEFINED",
"typeId": 1,
"label": "Primary"
},
{
"category": "USER_DEFINED",
"typeId": 29,
"label": "Nacho guy"
}
]
}
Knowing this, I recreated your request using my test account —
Contact (Mort) with no associated companies
Request:
curl --request POST \
--url https://api.hubapi.com/crm/v4/associations/contact/company/batch/create \
--header 'authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'content-type: application/json' \
--data '{
"inputs": [
{
"from": {
"id": "1601"
},
"to": {
"id": "16053398365"
},
"types": [
{
"associationCategory": "HUBSPOT_DEFINED",
"associationTypeId": 1
}
]
},
{
"from": {
"id": "1601"
},
"to": {
"id": "10202231613"
},
"types": [
{
"associationCategory": "HUBSPOT_DEFINED",
"associationTypeId": 279
}
]
}
]
}'
Response:
HTTP 201
{
"status": "COMPLETE",
"results": [
{
"fromObjectTypeId": "0-1",
"fromObjectId": 1601,
"toObjectTypeId": "0-2",
"toObjectId": 10202231613,
"labels": []
},
{
"fromObjectTypeId": "0-1",
"fromObjectId": 1601,
"toObjectTypeId": "0-2",
"toObjectId": 16053398365,
"labels": [
"Primary"
]
}
],
"startedAt": "2023-06-13T16:40:57.595Z",
"completedAt": "2023-06-13T16:40:57.663Z"
}
Mort with Primary and an associated company
I hope this helps get you moving forward! — Jaycee