# 405 Not Allowed

**URL:** <https://community.hubspot.com/t/405-not-allowed/32704>\
**Category:** APIs & Integrations\
**Tags:** php\
**Created:** [March 4, 2021, 7:28pm UTC](https://community.hubspot.com/t/405-not-allowed/32704 "2021-03-04T19:28:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FDikme](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/fdikme/32/93181_2.png) [@FDikme](https://community.hubspot.com/u/FDikme)\
**Post date:** [March 4, 2021, 7:28pm UTC](https://community.hubspot.com/t/405-not-allowed/32704/1 "2021-03-04T19:28:14Z")

</div>

Hello everybody,

I’m trying to use the PUT method to associate a user to a company, but couldn’t do it. I getting an error like this:

Method:

`https://api.hubapi.com/companies/v2/companies/39238082/contacts/270146?hapikey=demo`

Error

`405 Not Allowed`

PS: I’m aware that the first id is the company’s Id and the second Id is belongs to the user’s id.

**What I can do to figure out it?**

Thanks.

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [March 8, 2021, 4:13pm UTC](https://community.hubspot.com/t/405-not-allowed/32704/2 "2021-03-08T16:13:24Z")

</div>

Hello @FDikme

I believe that endpoint is deprecated. You should look at [this replacement](https://legacydocs.hubspot.com/docs/methods/crm-associations/crm-associations-overview)

---

<div class="post-metadata">

**Author:** ![FDikme](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/fdikme/32/93181_2.png) [@FDikme](https://community.hubspot.com/u/FDikme)\
**Post date:** [March 12, 2021, 11:57pm UTC](https://community.hubspot.com/t/405-not-allowed/32704/3 "2021-03-12T23:57:38Z")

</div>

Thanks for your reply! It worked for me.
