# Create batch tasks association error

**URL:** <https://community.hubspot.com/t/create-batch-tasks-association-error/78575>\
**Category:** APIs & Integrations\
**Tags:** object\
**Created:** [April 3, 2023, 9:50am UTC](https://community.hubspot.com/t/create-batch-tasks-association-error/78575 "2023-04-03T09:50:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PButkevich](https://avatars.discourse-cdn.com/v4/letter/p/6f9a4e/32.png) [@PButkevich](https://community.hubspot.com/u/PButkevich)\
**Post date:** [April 3, 2023, 9:50am UTC](https://community.hubspot.com/t/create-batch-tasks-association-error/78575/1 "2023-04-03T09:50:07Z")

</div>

Hello! I’m trying to create a batch of tasks with deal association. Here is a request from your crm tasks specification:

curl --request POST \  
--url [https://api.hubapi.com/crm/v3/objects/tasks/batch/create](https://api.hubapi.com/crm/v3/objects/tasks/batch/create) \  
--header ‘authorization: Bearer CIGHuLT0MBIRAAECUAAAASIAAAD8BwEAYAUYx-eKAiCS3OgWKIfWDTIUmLl9JluriXBb22mAENDY3A88KXY6NgAAAEEAAAAAAPgDAAAAAAAAhgAAAAAAAAAAACAAAAAOAOAxAAAAAADA\_\_8fABDwAwAAgD8cA0IURUDfw8ZlndtT6OIjAgI4niaSAuxKA25hMVIAWgA’ \  
--header ‘content-type: application/json’ \  
--data ‘{  
“inputs”: [  
{  
“properties”: {  
“hs\_timestamp”: “2019-10-30T03:30:17.883Z”,  
“hs\_task\_body”: “Send Proposal”,  
“hubspot\_owner\_id”: “51065148”,  
“hs\_task\_subject”: “Follow-up for Brian Buyer”,  
“hs\_task\_status”: “WAITING”,  
“hs\_task\_priority”: “HIGH”  
},  
“associations”: [  
{  
“to”: {  
“id”: “12814782598”  
},  
“types”: [  
{  
“associationCategory”: “HUBSPOT\_DEFINED”,  
“associationTypeId”: 215  
}  
]  
}  
]  
}  
]  
}’

And here is validation error:

{  
“status”: “error”,  
“message”: “invalid from object type 0-27 for associations to be created. expected: 0-3”,  
“correlationId”: “53460c51-52fb-4216-bf7f-a3a0228515fa”,  
“category”: “VALIDATION\_ERROR”  
}

What wrong with validation can you please take a look?

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [April 5, 2023, 7:09pm UTC](https://community.hubspot.com/t/create-batch-tasks-association-error/78575/2 "2023-04-05T19:09:00Z")

</div>

Hey, @PButkevich 👋 What happens if you use “associationTypeId”: 216 in your request body?  
I ask because if we look up the typeId for **Tasks to Deals** it returns as 216 not 215.  
Example:

Request

`GET {{API URL}}/crm/v4/associations/tasks/deals/labels`

Response

```lia-code-sample
{
 "results": [
 {
 "category": "HUBSPOT_DEFINED",
 "typeId": 216,
 "label": null
 }
 ]
}

```

This is because association labels are unidirectional.

Best,

Jaycee
