# API: Simple custom Object POST not working

**URL:** <https://community.hubspot.com/t/api-simple-custom-object-post-not-working/128045>\
**Category:** APIs & Integrations\
**Tags:** free\
**Created:** [March 17, 2025, 12:59am UTC](https://community.hubspot.com/t/api-simple-custom-object-post-not-working/128045 "2025-03-17T00:59:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nizar2](https://avatars.discourse-cdn.com/v4/letter/n/7ab992/32.png) [@Nizar2](https://community.hubspot.com/u/Nizar2)\
**Post date:** [March 17, 2025, 12:59am UTC](https://community.hubspot.com/t/api-simple-custom-object-post-not-working/128045/1 "2025-03-17T00:59:42Z")

</div>

Hi everyone!

So, I have a custom record with 4 properties. I want to create a new record of this object.

i do POST to [api.hubapi.com/crm/v4/objects/2-41795069](http://api.hubapi.com/crm/v4/objects/2-41795069)

the body is as follow:

{  
“properties”:  
[  
{  
“name”: “external\_id”,  
“color”: “EQ”,  
“size”: “X1010”  
}  
]  
}

The API returns a list of records rather than creating a new one.

 ![Nizar2_0-1742173033639.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/7/a/7a9aa1969eee26acc896395e4c10f542e499b5f8.png)

I dont know what I am doing wrong here.

---

<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:** [March 17, 2025, 1:47am UTC](https://community.hubspot.com/t/api-simple-custom-object-post-not-working/128045/2 "2025-03-17T01:47:13Z")

</div>

Hi @Nizar2,

Your JSON request body structure is incorrect. When creating custom objects, HubSpot’s API requires a key-value pair object, not an array, for the properties field.

Here’s how your request should be formatted:

```lia-code-sample
{
 "properties": {
 "external_id": "your_value_here",
 "color": "EQ",
 "size": "X1010"
 }
}

```

---

<div class="post-metadata">

**Author:** ![Nizar2](https://avatars.discourse-cdn.com/v4/letter/n/7ab992/32.png) [@Nizar2](https://community.hubspot.com/u/Nizar2)\
**Post date:** [March 17, 2025, 6:05am UTC](https://community.hubspot.com/t/api-simple-custom-object-post-not-working/128045/3 "2025-03-17T06:05:54Z")

</div>

Hey @GiantFocal ,

Thanks for your reply!

Unfortunately, that what I was trying for the past couple of days with no success. No errors. The response is always the list of the records.

{  
“properties”: {  
“color”: “EQ”,  
“size”: “X1010”,  
“name”: “Nizar”  
}  
}

 ![Nizar2_0-1742191409362.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/c/9c0f20b1b51dc8fd592ed1a9f45701b88f6b16f4.png)

Could be I am using the wrong URL? Or Method?

[api.hubapi.com/crm/v4/objects/2-41795069](http://api.hubapi.com/crm/v4/objects/2-41795069) ?

Your help is highly appreciated.

---

<div class="post-metadata">

**Author:** ![SteveHTM](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stevehtm/32/22074_2.png) [@SteveHTM](https://community.hubspot.com/u/SteveHTM)\
**Post date:** [March 17, 2025, 2:22pm UTC](https://community.hubspot.com/t/api-simple-custom-object-post-not-working/128045/4 "2025-03-17T14:22:35Z")

</div>

@Nizar2 - I see you are attempting to call a v4 API. The only version I see documented for this POST call is V3: [https://api.hubapi.com/crm/v3/objects/{objectType}](https://api.hubapi.com/crm/v3/objects/%7BobjectType%7D)

Could that be an issue?

Steve

---

<div class="post-metadata">

**Author:** ![Nizar2](https://avatars.discourse-cdn.com/v4/letter/n/7ab992/32.png) [@Nizar2](https://community.hubspot.com/u/Nizar2)\
**Post date:** [March 17, 2025, 6:25pm UTC](https://community.hubspot.com/t/api-simple-custom-object-post-not-working/128045/5 "2025-03-17T18:25:42Z")

</div>

Hey Steve!

Thanks for your reply!

I get the same result with v3.

 ![Nizar2_0-1742235927936.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/f/f7d8dcb51593b60c178ab59fc7af6caa19f94797.png)

---

<div class="post-metadata">

**Author:** ![MichaelMa](https://avatars.discourse-cdn.com/v4/letter/m/b5ac83/32.png) [@MichaelMa](https://community.hubspot.com/u/MichaelMa)\
**Post date:** [March 17, 2025, 7:57pm UTC](https://community.hubspot.com/t/api-simple-custom-object-post-not-working/128045/6 "2025-03-17T19:57:34Z")

</div>

Please try writing out the entire url with the https in front (whichever API version works for you):

[https://api.hubapi.com/crm/v4/objects/2-41795069](https://api.hubapi.com/crm/v4/objects/2-41795069)

[https://api.hubapi.com/crm/v3/objects/2-41795069](https://api.hubapi.com/crm/v3/objects/2-41795069)

I’m guessing that Postman is posting to the http URL and in your Postman settings, you do NOT have the option enabled to “Follow original HTTP method” to continue using POST when it gets redirected to the https url.

So when it does get redirected from http → https, it switches to GET which is why you’re always getting the results.

---

<div class="post-metadata">

**Author:** ![Nizar2](https://avatars.discourse-cdn.com/v4/letter/n/7ab992/32.png) [@Nizar2](https://community.hubspot.com/u/Nizar2)\
**Post date:** [March 19, 2025, 1:36am UTC](https://community.hubspot.com/t/api-simple-custom-object-post-not-working/128045/7 "2025-03-19T01:36:01Z")

</div>

Somehow I overlooked your respone. Adding the HTTPS at the begginning fixed it. You’re the best!
