# Custom Object API Import

**URL:** <https://community.hubspot.com/t/custom-object-api-import/87568>\
**Category:** APIs & Integrations\
**Tags:** python\
**Created:** [August 15, 2023, 9:59pm UTC](https://community.hubspot.com/t/custom-object-api-import/87568 "2023-08-15T21:59:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DLee31](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@DLee31](https://community.hubspot.com/u/DLee31)\
**Post date:** [August 15, 2023, 9:59pm UTC](https://community.hubspot.com/t/custom-object-api-import/87568/1 "2023-08-15T21:59:46Z")

</div>

Im trying to import custom objects directly into hubspot form my internal database. I know I can do this to contacts/companies. Im not sure how to do it with custom objects. This is what I have so far with no luck

```lia-code-sample
inputs = [{'properties': {'branch_name': branches[id][0],
 'b_number': branches[id][4]
 }}]
 try:
 branch_upload = client.crm.objects.basic_api.create(object_type="branches",
 simple_public_object_input_for_create=inputs
 )

 pprint(branch_upload)
 except ApiException as e:
 print("Exception when requesting custom objects: %s\n" % e)

```

---

<div class="post-metadata">

**Author:** ![Mike\_Eastwood](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mike_eastwood/32/70075_2.png) [@Mike\_Eastwood](https://community.hubspot.com/u/Mike_Eastwood)\
**Post date:** [August 15, 2023, 10:07pm UTC](https://community.hubspot.com/t/custom-object-api-import/87568/2 "2023-08-15T22:07:03Z")

</div>

Hi @DLee31

I recommend Version 3 of the HubSpot API – [Create a New Schema.](https://developers.hubspot.com/docs/api/crm/crm-custom-objects)

Have fun

Mike

Here to learn more about HubSpot and share my HubSpot Knowledge. I’m the founder of [Webalite](https://www.webalite.com?utm_campaign=community-forum&utm_source=community&utm_content=signature) a HubSpot Partner Agency based in Wellington, New Zealand and the founder of **Portal-iQ** the world’s first automated [HubSpot Portal Audit](https://portal-iq.com?utm_campaign=community-forum&utm_source=community-forum&utm_content=signature) that helps you work smarter with HubSpot.

---

<div class="post-metadata">

**Author:** ![DLee31](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@DLee31](https://community.hubspot.com/u/DLee31)\
**Post date:** [August 17, 2023, 8:02pm UTC](https://community.hubspot.com/t/custom-object-api-import/87568/3 "2023-08-17T20:02:54Z")

</div>

[@Mike\_Eastwood](https://community.hubspot.com/t5/user/viewprofilepage/user-id/9259) This Schema shows for how to make a custom object. Not importing data into the already created custom object. Im needing to import data into an existing custom object

---

<div class="post-metadata">

**Author:** ![Mike\_Eastwood](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mike_eastwood/32/70075_2.png) [@Mike\_Eastwood](https://community.hubspot.com/u/Mike_Eastwood)\
**Post date:** [August 18, 2023, 4:16am UTC](https://community.hubspot.com/t/custom-object-api-import/87568/4 "2023-08-18T04:16:59Z")

</div>

Sorry @DLee31 I misunderstood.

You can use the [Custom Objects API](https://developers.hubspot.com/docs/api/crm/crm-custom-objects) to push data into HubSpot.

POST to

/crm/v3/objects/{objectType}

Where the Object type is the ID not the name e.g. 2-6499236

The easiest way (I think) to fiind the Object ID is to visit the page in your CRM where you see the Custom Objects and check the URL:

[Loading...](https://app.hubspot.com/contacts/){{ portal\_id }}/objects/{{ object\_id }}/views/all/list

Hope that helps!

Mike
