# Problem access to api crm-associations

**URL:** <https://community.hubspot.com/t/problem-access-to-api-crm-associations/11757>\
**Category:** APIs & Integrations\
**Created:** [August 30, 2018, 8:42am UTC](https://community.hubspot.com/t/problem-access-to-api-crm-associations/11757 "2018-08-30T08:42:52Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![CTO-BB](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cto-bb/32/33328_2.png) [@CTO-BB](https://community.hubspot.com/u/CTO-BB)\
**Post date:** [August 30, 2018, 8:42am UTC](https://community.hubspot.com/t/problem-access-to-api-crm-associations/11757/1 "2018-08-30T08:42:52Z")

</div>

Hi,

When try to access [https://api.hubapi.com/crm-associations/v1/associations?hapikey=demo](https://api.hubapi.com/crm-associations/v1/associations?hapikey=demo). It shows me the mistake  
HTTP ERROR 405

Problem accessing /crm-associations/v1/associations. Reason:

Method Not Allowed

Kind Regards

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [August 31, 2018, 2:23pm UTC](https://community.hubspot.com/t/problem-access-to-api-crm-associations/11757/2 "2018-08-31T14:23:43Z")

</div>

Hi @CTO-BB,

If you are attempting to [associate CRM objects](https://developers.hubspot.com/docs/methods/crm-associations/associate-objects), please ensure you are using the `PUT` method.

---

<div class="post-metadata">

**Author:** ![CTO-BB](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cto-bb/32/33328_2.png) [@CTO-BB](https://community.hubspot.com/u/CTO-BB)\
**Post date:** [September 3, 2018, 6:05am UTC](https://community.hubspot.com/t/problem-access-to-api-crm-associations/11757/3 "2018-09-03T06:05:21Z")

</div>

Hi Itakushi.

I Have been still the steps that the post indicates and is still me appearing the mistake

Kind Regards.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [September 5, 2018, 3:32pm UTC](https://community.hubspot.com/t/problem-access-to-api-crm-associations/11757/4 "2018-09-05T15:32:48Z")

</div>

Hi @CTO-BB,

Please copy the text or a screenshot of your request below so that I can investigate. If you are using the correct method (`GET`, `PUT`, or `POST`), you should not receive a _405 Method Not Allowed_ error.

---

<div class="post-metadata">

**Author:** ![CTO-BB](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cto-bb/32/33328_2.png) [@CTO-BB](https://community.hubspot.com/u/CTO-BB)\
**Post date:** [September 6, 2018, 10:41am UTC](https://community.hubspot.com/t/problem-access-to-api-crm-associations/11757/5 "2018-09-06T10:41:31Z")

</div>

Hi!

Weŕe mainly interested in creating a conversation or ticket through the API. From what weve seen the ticket section doesnt allow to associate tickets with contacts.

CAn you please give us support on this matter and let us know how to proceed to create a conversation?

Many thanks

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [September 7, 2018, 7:47pm UTC](https://community.hubspot.com/t/problem-access-to-api-crm-associations/11757/6 "2018-09-07T19:47:49Z")

</div>

Thank you for the clarification, @CTO-BB.

At this time, the [Tickets API](https://developers.hubspot.com/docs/methods/tickets/create-ticket) can’t create associations with contacts, but the [CRM Associations API](https://developers.hubspot.com/docs/methods/crm-associations/crm-associations-overview) can.

For example, [this endpoint](https://developers.hubspot.com/docs/methods/crm-associations/associate-objects) can associate a ticket to a contact with `"definitionId": 15` if both object IDs are included.

---

<div class="post-metadata">

**Author:** ![CTO-BB](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cto-bb/32/33328_2.png) [@CTO-BB](https://community.hubspot.com/u/CTO-BB)\
**Post date:** [September 10, 2018, 10:52am UTC](https://community.hubspot.com/t/problem-access-to-api-crm-associations/11757/7 "2018-09-10T10:52:02Z")

</div>

Hello, good morning:

I followed the manual and the error continues to appear. Apart from this I have tried to update a company following the manual [https://developers.hubspot.com/docs/methods/companies/update\_company](https://developers.hubspot.com/docs/methods/companies/update_company)  
And I get error 405 just like in the previous case. I copy the example

arr = array(  
properties’ =\> array(  
array  
name’ =\> ‘description modified’,  
value’ =\> ‘hubspot’.  
)  
)  
);  
$post\_json = json\_encode($arr);  
//$hapikey = readline("Enter hapikey: (demo for the demo portal): ");  
endpoint = ‘[https://api.hubapi.com/companies/v2/companies/922536531?hapikey=XXXXXXXXXXXXXXXX](https://api.hubapi.com/companies/v2/companies/922536531?hapikey=XXXXXXXXXXXXXXXX)’;  
$ch = @curl\_init();  
@curl\_setopt($ch, CURLOPT\_POST, true);  
@curl\_setopt($ch, CURLOPT\_POSTFIELDS, $post\_json);  
@curl\_setopt($ch, CURLOPT\_URL, $endpoint);  
@curl\_setopt($ch, CURLOPT\_HTTPHEADER, array(‘Content-Type: application/json’));  
@curl\_setopt($ch, CURLOPT\_RETURNTRANSFER, true);  
response = @curl\_exec($ch);  
Status\_code = @curl\_getinfo($ch, CURLINFO\_HTTP\_CODE);  
$curl\_errors = curl\_error($ch);  
@curl\_close($ch);  
echo "curl Errors: " . $curl\_errors;  
echo "\nStatus code: " . $status\_code;  
echo "Reply: " . $response;

Kind Regards

---

<div class="post-metadata">

**Author:** ![CTO-BB](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cto-bb/32/33328_2.png) [@CTO-BB](https://community.hubspot.com/u/CTO-BB)\
**Post date:** [September 13, 2018, 10:22am UTC](https://community.hubspot.com/t/problem-access-to-api-crm-associations/11757/8 "2018-09-13T10:22:00Z")

</div>

Any updates on the required request?

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [September 14, 2018, 5:30pm UTC](https://community.hubspot.com/t/problem-access-to-api-crm-associations/11757/9 "2018-09-14T17:30:56Z")

</div>

Hi @CTO-BB,

To [update a company](https://developers.hubspot.com/docs/methods/companies/update_company), you must use `PUT`. In that cURL code, you are using `POST`, which is why _405 Method Not Allowed_ is returned.

---

<div class="post-metadata">

**Author:** ![CTO-BB](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cto-bb/32/33328_2.png) [@CTO-BB](https://community.hubspot.com/u/CTO-BB)\
**Post date:** [September 17, 2018, 6:28am UTC](https://community.hubspot.com/t/problem-access-to-api-crm-associations/11757/10 "2018-09-17T06:28:54Z")

</div>

Hi Itakushi,

The problem has been solved. The call had to be made with the put method and not with post.

Thanks for you colaboration

Kind Regards
