# "Bad Request" error when importing company data

**URL:** <https://community.hubspot.com/t/bad-request-error-when-importing-company-data/135635>\
**Category:** APIs & Integrations\
**Tags:** companies\
**Created:** [July 3, 2025, 11:59am UTC](https://community.hubspot.com/t/bad-request-error-when-importing-company-data/135635 "2025-07-03T11:59:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhill\_tys](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jhill_tys/32/207538_2.png) [@jhill\_tys](https://community.hubspot.com/u/jhill_tys)\
**Post date:** [July 3, 2025, 11:59am UTC](https://community.hubspot.com/t/bad-request-error-when-importing-company-data/135635/1 "2025-07-03T11:59:09Z")

</div>

I’m attempting to use the import API to import company data (one file, one object, one record) and getting a very unhelpful error message back.

Can someone help me understand what is wrong?

**Request:**

`POST /crm/v3/imports HTTP/1.1Authorization: Bearer pat-na1- *******-******* User-Agent: GuzzleHttp/7Host: api.hubspot.comContent-Type: multipart/form-data--046e5e5d7d6200012917a3b7a8e25678e01fe22bContent-Type: application/jsonContent-Disposition: form-data; name="importRequest"Content-Length: 1244{"name":"To Your Success data export - 2025-07-02 11:25:04 (test)","dateFormat":"YEAR_MONTH_DAY","importOperations":{"0-1":"UPDATE"},"files":[{"fileName":"companies.csv","fileFormat":"CSV","fileImportPage":{"hasHeader":false,"columnMappings":[{"columnObjectTypeId":"0-1","columnName":"client_id","propertyName":"client_id","columnType":"HUBSPOT_ALTERNATE_ID"},{"columnObjectTypeId":"0-1","columnName":"client_program","propertyName":"client_program"},{"columnObjectTypeId":"0-1","columnName":"client_membership","propertyName":"client_membership"},{"columnObjectTypeId":"0-1","columnName":"client_membership_status","propertyName":"client_membership_status"},{"columnObjectTypeId":"0-1","columnName":"client_last_order","propertyName":"client_last_order"},{"columnObjectTypeId":"0-1","columnName":"client_servicetitan_connection","propertyName":"client_servicetitan_connection"},{"columnObjectTypeId":"0-1","columnName":"client_housecallpro_connection","propertyName":"client_housecallpro_connection"},{"columnObjectTypeId":"0-1","columnName":"client_fieldedge_connection","propertyName":"client_fieldedge_connection"},{"columnObjectTypeId":"0-1","columnName":"client_certainpath_connection","propertyName":"client_certainpath_connection"}]}}]}--046e5e5d7d6200012917a3b7a8e25678e01fe22bContent-Type: text/csvContent-Disposition: form-data; name="files"; filename="companies.csv"4883,Enterprise,"Starter Annual (old)",active,2024-04-22,,,,--046e5e5d7d6200012917a3b7a8e25678e01fe22b--`

**Response:**

`HTTP/1.1 400 Bad RequestDate: Wed, 02 Jul 2025 15:25:04 GMTContent-Type: text/html;charset=iso-8859-1Content-Length: 215Connection: keep-aliveCF-Ray: 958f27554d799ae2-JAXCF-Cache-Status: DYNAMICCache-Control: must-revalidate,no-cache,no-storeStrict-Transport-Security: max-age=31536000; includeSubDomains; preloadVary: originaccess-control-allow-credentials: falsex-content-type-options: nosniffx-hubspot-correlation-id: a6ce42ce-c9f9-4c34-955b-3003954d621bx-hubspot-ratelimit-daily: 625000x-hubspot-ratelimit-daily-remaining: 624991x-hubspot-ratelimit-interval-milliseconds: 10000x-hubspot-ratelimit-max: 190x-hubspot-ratelimit-remaining: 189x-hubspot-ratelimit-secondly: 19x-hubspot-ratelimit-secondly-remaining: 18Set-Cookie: __cf_bm=DfuyVie1NJj3aMekxoGT0Arza7dvWszpgmh3pEf0qmg-1751469904-1.0.1.1-ULfADQX8ZRgPQS_ksLjZUlUArqC2PpVmIzju8uyk2Ekm.jZtncdw9Wd7t6wDA6WO8rhC.h_tluFGT1j8QbU0z3Voj7rLwZmIQnWAcKTe7QI; path=/; expires=Wed, 02-Jul-25 15:55:04 GMT; domain=.hubspot.com; HttpOnly; Secure; SameSite=None, _cfuvid=4GN7gp423nvSH_jv6O5UVo7ax2bfF2k_HgYTn.maW_s-1751469904330-0.0.1.1-604800000; path=/; domain=.hubspot.com; HttpOnly; Secure; SameSite=NoneReport-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=0jaXi%2BHBSuXadg4ijh7Ip2YBWmetgaCYNFS%2FCtOYd77nNdnID0zjSf7b0zG3QbW%2FOj%2BeYDI%2FuipzYzKi%2BEE%2BUGYmGHV64bcJY%2FLz9yxP4csiNM8IPND5ygIpEye2foqoMg%3D%3D"}],"group":"cf-nel","max_age":604800}NEL: {"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}Server: cloudflare<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8"/><title>Error 400 Bad Request</title></head><body><h2>HTTP ERROR 400</h2><p>Reason:<pre> Bad Request</pre></p></body></html>`

---

<div class="post-metadata">

**Author:** ![GiantFocal](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/giantfocal/32/41969_2.png) [@GiantFocal](https://community.hubspot.com/u/GiantFocal)\
**Post date:** [July 3, 2025, 12:24pm UTC](https://community.hubspot.com/t/bad-request-error-when-importing-company-data/135635/2 "2025-07-03T12:24:52Z")

</div>

Hi [@jhill\_tys](https://community.hubspot.com/t5/user/viewprofilepage/user-id/961677),

A 400 “Bad Request” error usually indicates an issue with the request sent to the API. To troubleshoot and fix the problem, follow these steps:

1. Please ensure the file you’re importing is properly formatted. Check for extra spaces, invalid characters, or incorrect data types. Make sure the column headers in your CSV match the properties in HubSpot exactly, including case sensitivity. Since you’re using the HUBSPOT\_ALTERNATE\_ID for mapping, verify that these IDs exist and are correctly configured.
2. Additionally, confirm that the JSON payload follows the API’s expected structure. Validate that fields such as name, dateFormat, and importOperations are accurate, and double-check that the dateFormat matches the format used in the CSV.
3. Instead of attempting to import everything at once, try breaking the process into smaller steps. Start with a CSV file containing only one record. Use simpler column mappings and gradually increase complexity to identify where the issue may occur.

---

<div class="post-metadata">

**Author:** ![jhill\_tys](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jhill_tys/32/207538_2.png) [@jhill\_tys](https://community.hubspot.com/u/jhill_tys)\
**Post date:** [July 3, 2025, 12:32pm UTC](https://community.hubspot.com/t/bad-request-error-when-importing-company-data/135635/3 "2025-07-03T12:32:04Z")

</div>

I’ve done everything you said already and can’t see any problems with the request. Can you tell me what I’m doing wrong?

---

<div class="post-metadata">

**Author:** ![Victor\_Becerra](https://avatars.discourse-cdn.com/v4/letter/v/87869e/32.png) [@Victor\_Becerra](https://community.hubspot.com/u/Victor_Becerra)\
**Post date:** [July 3, 2025, 4:54pm UTC](https://community.hubspot.com/t/bad-request-error-when-importing-company-data/135635/4 "2025-07-03T16:54:03Z")

</div>

Hi [@jhill\_tys](https://community.hubspot.com/t5/user/viewprofilepage/user-id/961677) ,

Thank you for reaching out to the Community!

I wanted to invite our subject matter experts to this conversation. Hi @GiantFocal @HubDoPete @MichaelMa - Do you have any advice for [@jhill\_tys](https://community.hubspot.com/t5/user/viewprofilepage/user-id/961677) ? Thank you!

Best,
