# Error Api internal error

**URL:** <https://community.hubspot.com/t/error-api-internal-error/65975>\
**Category:** APIs & Integrations\
**Created:** [September 27, 2022, 2:35pm UTC](https://community.hubspot.com/t/error-api-internal-error/65975 "2022-09-27T14:35:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JMarino](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@JMarino](https://community.hubspot.com/u/JMarino)\
**Post date:** [September 27, 2022, 2:35pm UTC](https://community.hubspot.com/t/error-api-internal-error/65975/1 "2022-09-27T14:35:06Z")

</div>

Good morning, we are testing an integration via API and we are getting an error on the following endpoint:  
/crm/v3/objects/contacts/3587101/associations/company/9673630276/contact\_to\_company

“status”: “error”,  
“message”: “internal error”,  
“correlationId”: “74c0a84e-99f9-4034-b3b1-87a50140a83e”

We did the tests in this environment and it did not give us an error.  
Sandbox 1  
sandbox-1.colppy.com21957969

When we hit this endpoint there is no error.  
/crm/v3/objects/companies/9673630276/associations/contact/3587101/contact\_to\_company

When we try in our productive if you do not give an error.  
Production environment data.  
Colppy  
colppy.com19877595

---

<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:** [September 28, 2022, 9:43pm UTC](https://community.hubspot.com/t/error-api-internal-error/65975/2 "2022-09-28T21:43:57Z")

</div>

Hi, @JMarino 👋 Thanks for reaching out. Can you link me to the documentation page and list the specific endpoint you are using, please? Is it [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/crm/contacts) for example?

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![JClackett](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jclackett/32/196564_2.png) [@JClackett](https://community.hubspot.com/u/JClackett)\
**Post date:** [October 6, 2022, 6:59pm UTC](https://community.hubspot.com/t/error-api-internal-error/65975/3 "2022-10-06T18:59:15Z")

</div>

Also getting the same error when doing:

`await hubspot.marketing.transactional.singleSendApi.sendEmail({ emailId: args.templateId, message: { to: args.to, bcc: args.bcc || [], cc: args.cc || [], replyTo: [] }, contactProperties: {}, customProperties: args.variables || {},})`

```auto
Error: HTTP-Code: 500
Message: An error occurred.
Body: {"status":"error","message":"internal error","correlationId":"dba58996-cca8-4a9f-ba9d-c15556e03c9e"}
Headers: {"access-control-allow-credentials":"false","alt-svc":"h3=\":443\"; ma=86400, h3-29=\":443\...
 File "/app/node_modules/@hubspot/api-client/lib/codegen/marketing/transactional/apis/SingleSendApi.js", line 60, col 23, in SingleSendApiResponseProcessor.<anonymous>
 throw new exception_1.ApiException(response.httpStatusCode, "An error occurred.", body, response.headers);
 File "/app/node_modules/@hubspot/api-client/lib/codegen/marketing/transactional/apis/SingleSendApi.js", in Generator.next
 File "/app/node_modules/@hubspot/api-client/lib/codegen/marketing/transactional/apis/SingleSendApi.js", line 5, col 58, in fulfilled
 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
 File "node:internal/process/task_queues", line 96, col 5, in processTicksAndRejections 

```

---

<div class="post-metadata">

**Author:** ![DRaychev](https://avatars.discourse-cdn.com/v4/letter/d/f07891/32.png) [@DRaychev](https://community.hubspot.com/u/DRaychev)\
**Post date:** [October 21, 2022, 10:05pm UTC](https://community.hubspot.com/t/error-api-internal-error/65975/4 "2022-10-21T22:05:53Z")

</div>

I have the same issue when try to associate deal with compamy  
[https://api.hubapi.com/crm/v4/objects/deals/10642105128/associations/Companies/9634666050?hapikey=xxxxxxx](https://api.hubapi.com/crm/v4/objects/deals/10642105128/associations/Companies/9634666050?hapikey=xxxxxxx)xxxxxxxxx xxxxxxx  
Ther response

HTTP 500

{  
“status”: “error”,  
“message”: “internal error”,  
“correlationId”: “905d9a42-e792-4cb7-8bb5-403dff156706”  
}

What can be reason of this?

---

<div class="post-metadata">

**Author:** ![JMarino](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@JMarino](https://community.hubspot.com/u/JMarino)\
**Post date:** [September 29, 2022, 12:45am UTC](https://community.hubspot.com/t/error-api-internal-error/65975/5 "2022-09-29T00:45:18Z")

</div>

Good evening, this endpoint is the one that returns an error.

```lia-code-sample
curl --request PUT \
--url https://api.hubapi.com/crm/v3/objects/contacts/14501/associations/company/9018905466/contact_to_company \
--header 'authorization: Bearer xxxxxxxxxxxxxxxxxxx'

```

In the test environment the endpoint works.  
Entorno de pruebas  
entorno-de-pruebas-1.colppy.com21957969

While in the production environment it does give an error.  
{“status”:“error”,“message”:“internal error”,“correlationId”:“4caf46a3-27ff-4f10-ace1-9c948259272e”}

Production environment  
colppy.com19877595

The strangest thing that this endpoint does work in production

```lia-code-sample
curl --request PUT \
--url https://api.hubapi.com/crm/v3/objects/companies/9018905466/associations/contact/14501/contact_to_company \
--header 'authorization: Bearer xxxxxxxxxxxxxxxxxxx'

```

Are we missing any configuration?  
Why does it give us an error in one environment and not in the other?

Thank you
