# POST and PATCH - X-HTTP-Method-Override

**URL:** <https://community.hubspot.com/t/post-and-patch-x-http-method-override/125457>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [February 5, 2025, 1:12pm UTC](https://community.hubspot.com/t/post-and-patch-x-http-method-override/125457 "2025-02-05T13:12:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MGlockner](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@MGlockner](https://community.hubspot.com/u/MGlockner)\
**Post date:** [February 5, 2025, 1:12pm UTC](https://community.hubspot.com/t/post-and-patch-x-http-method-override/125457/1 "2025-02-05T13:12:33Z")

</div>

Hello,

I have problems sending a PATCH request to the hubapi. I can send POST requests and X-HTTP-Method-Override=POST in header.

I always get

Error 405 Method Not Allowed

Any suggestion to this?

Thanks a lot

Michael

---

<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:** [February 5, 2025, 11:12pm UTC](https://community.hubspot.com/t/post-and-patch-x-http-method-override/125457/2 "2025-02-05T23:12:45Z")

</div>

Hey, [@MGlöckner](https://community.hubspot.com/t5/user/viewprofilepage/user-id/894725). Welcome to the community. It’s tough to say without more information. Can you share a simple request, response, and error body, please?

Thanks! — Jaycee

---

<div class="post-metadata">

**Author:** ![MGlockner](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@MGlockner](https://community.hubspot.com/u/MGlockner)\
**Post date:** [February 6, 2025, 9:26am UTC](https://community.hubspot.com/t/post-and-patch-x-http-method-override/125457/3 "2025-02-06T09:26:03Z")

</div>

Hello, here is the code send by our integration software, when I use PATCH:

```auto
POST /crm/v3/objects/companies/xxxxxxxxx HTTP/1.1

Host: api.hubapi.com

Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2

Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxx

Connection: keep-alive

Content-Length: 48

Content-Type: application/json; charset=UTF-8

User-Agent: Java/17.0.10

X-Http-Method: PATCH

X-Http-Method-Override: PATCH

{"properties":{"sap_geschaeftspartner":"12345"}}

```

As you can see, it is no standard PATCH. It is a POST request with some override instructions i the header.

I think it is a bug in the software I use for integration, but I cannot change it. The question is, is there any possibility to PATCH objects in Hubspot using POST request.

(the problem ist not the body - this is accepted fine, when I send a PATCH request from Postman)

---

<div class="post-metadata">

**Author:** ![GRajput](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/grajput/32/102020_2.png) [@GRajput](https://community.hubspot.com/u/GRajput)\
**Post date:** [February 6, 2025, 1:12pm UTC](https://community.hubspot.com/t/post-and-patch-x-http-method-override/125457/4 "2025-02-06T13:12:04Z")

</div>

Hi [@MGlöckner](https://community.hubspot.com/t5/user/viewprofilepage/user-id/894725)

It looks like you are trying to update a company property and you are not able to do that. doc link -

> **[Accounts Dashboard | HubSpot](https://app.hubspot.com/myaccounts?next=developerdocs&redirect=%2Fapi-reference%2Fcrm-companies-v3%2Fguide)**

here is a curl of API to update the company property -

```lia-code-sample
curl --request PATCH \
 --url https://api.hubapi.com/crm/v3/objects/companies/companyId \
 --header 'authorization: Bearer YOUR_ACCESS_TOKEN' \
 --header 'content-type: application/json' \
 --data '{
 "objectWriteTraceId": "string",
 "properties": {
 "property_date": "1572480000000",
 "property_radio": "option_1",
 "property_number": "17",
 "property_string": "value",
 "property_checkbox": "false",
 "property_dropdown": "choice_b",
 "property_multiple_checkboxes": "chocolate;strawberry"
 }
}'

```

I hope this will help you out. Please mark it as **Solution Accepted and upvote** to help another Community member.  
Thanks!

---

<div class="post-metadata">

**Author:** ![MGlockner](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@MGlockner](https://community.hubspot.com/u/MGlockner)\
**Post date:** [February 6, 2025, 2:19pm UTC](https://community.hubspot.com/t/post-and-patch-x-http-method-override/125457/5 "2025-02-06T14:19:24Z")

</div>

Hello, please read carefully what i wrote. I cannot send PATCH requests, only POST.

---

<div class="post-metadata">

**Author:** ![MGlockner](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@MGlockner](https://community.hubspot.com/u/MGlockner)\
**Post date:** [March 4, 2025, 7:54am UTC](https://community.hubspot.com/t/post-and-patch-x-http-method-override/125457/6 "2025-03-04T07:54:02Z")

</div>

Finally i solved it with a batch request. A batch request is POST (not PATCH):

curl --location ‘[https://api.hubapi.com/crm/v3/objects/companies/batch/update](https://api.hubapi.com/crm/v3/objects/companies/batch/update)’ \

--header ‘Content-Type: application/json’ \

--header ‘Authorization: ••••••’ \

--data '{

```
"inputs":\[

    {

        "id":"1700029xxxxx",

        "properties":

        {

            "sap\_geschaeftspartner": "654321123456"

        }

    }

]

```

}’

Thanks to the Huspot Support Team!
