# Import API - 400 Bad Request

**URL:** <https://community.hubspot.com/t/import-api-400-bad-request/87592>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [August 16, 2023, 8:15am UTC](https://community.hubspot.com/t/import-api-400-bad-request/87592 "2023-08-16T08:15:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BKalyta](https://avatars.discourse-cdn.com/v4/letter/b/c4cdca/32.png) [@BKalyta](https://community.hubspot.com/u/BKalyta)\
**Post date:** [August 16, 2023, 8:15am UTC](https://community.hubspot.com/t/import-api-400-bad-request/87592/1 "2023-08-16T08:15:31Z")

</div>

Hello everyone, I encountered a problem - when sending a request, I get a 400 error without any response inside. From the side of Hubspot, I do not see this request in the logs. Has anyone experienced this problem?  
Curl

```lia-code-sample
curl --request POST \
 --url https://api.hubspot.com/crm/v3/imports \
 --header 'Accept: application/json' \
 --header 'Authorization: Bearer pat-eu1- ******' \
 --header 'Content-Type: multipart/form-data' \
 --form 'importRequest={"name":"test_import","files":[{"fileName":"test1.csv","fileFormat":"CSV","dateFormat":"YEAR_MONTH_DAY","marketableContactImport":false,"fileImportPage":{"hasHeader":true,"columnMappings":[{"columnName":"id","propertyName":"Record ID","idColumnType":"HUBSPOT_ALTERNATE_ID","columnObjectTypeId":"0-1"},{"columnName":"username","propertyName":"First Name","columnObjectTypeId":"0-1"},{"columnName":"email","propertyName":"Email","columnObjectTypeId":"0-1"},{"columnName":"register_date","propertyName":"Create Date","columnObjectTypeId":"0-1"},{"columnName":"last_activity_date","propertyName":"Last Activity Date","columnObjectTypeId":"0-1"},{"columnName":"teams","propertyName":"Associated Ticket IDs","columnObjectTypeId":"0-1"},{"columnName":"organizations","propertyName":"Associated Company IDs","columnObjectTypeId":"0-1"}]}}]}' \
 --form 'files=@/path_to_file/test1.csv'

```

Pretty Json

```lia-code-sample
{
 "name":"test_import",
 "files":[
 {
 "fileName":"test1.csv",
 "fileFormat":"CSV",
 "dateFormat":"YEAR_MONTH_DAY",
 "marketableContactImport":false,
 "fileImportPage":{
 "hasHeader":true,
 "columnMappings":[
 {
 "columnName":"id",
 "propertyName":"Record ID",
 "idColumnType":"HUBSPOT_ALTERNATE_ID",
 "columnObjectTypeId":"0-1"
 },
 {
 "columnName":"username",
 "propertyName":"First Name",
 "columnObjectTypeId":"0-1"
 },
 {
 "columnName":"email",
 "propertyName":"Email",
 "columnObjectTypeId":"0-1"
 },
 {
 "columnName":"register_date",
 "propertyName":"Create Date",
 "columnObjectTypeId":"0-1"
 },
 {
 "columnName":"last_activity_date",
 "propertyName":"Last Activity Date",
 "columnObjectTypeId":"0-1"
 },
 {
 "columnName":"teams",
 "propertyName":"Associated Ticket IDs",
 "columnObjectTypeId":"0-1"
 },
 {
 "columnName":"organizations",
 "propertyName":"Associated Company IDs",
 "columnObjectTypeId":"0-1"
 }
 ]
 }
 }
 ]
}

```

test1.csv

```lia-code-sample
id;username;email;register_date;last_activity_date;teams;organizations
530471;Test1;test1@mail.com;"2023-07-24 17:55:29";"2023-08-14 17:56:23";"{""Test1`s team"",""Test 2`s team""}";"{""Test1`s organization"",""Test 2`s organization""}"
530481;"Test 2";test2@mail.com;"2023-07-24 20:36:25";"2023-08-14 20:39:20";"{""Test 2`s team"",""Test1`s team""}";"{""Test 2`s organization"",""Test1`s organization""}"

```

---

<div class="post-metadata">

**Author:** ![harunkumars](https://avatars.discourse-cdn.com/v4/letter/h/d78d45/32.png) [@harunkumars](https://community.hubspot.com/u/harunkumars)\
**Post date:** [August 16, 2023, 4:45pm UTC](https://community.hubspot.com/t/import-api-400-bad-request/87592/2 "2023-08-16T16:45:48Z")

</div>

Perhaps because the csv file is not comma seperated and uses semi colons as delimiter?

Some other questions to consider:

Are the teams and organizations data in the csv file in the correct format for the corresponding Hubspot defined properties?

Is the last\_activity\_date a default Hubspot property? Is it allowed to be set via Import?
