# Search for Object by Object Id without knowing Object Type?

**URL:** <https://community.hubspot.com/t/search-for-object-by-object-id-without-knowing-object-type/82896>\
**Category:** APIs & Integrations\
**Tags:** free\
**Created:** [June 7, 2023, 6:46pm UTC](https://community.hubspot.com/t/search-for-object-by-object-id-without-knowing-object-type/82896 "2023-06-07T18:46:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeff00seattle](https://avatars.discourse-cdn.com/v4/letter/j/91b2a8/32.png) [@jeff00seattle](https://community.hubspot.com/u/jeff00seattle)\
**Post date:** [June 7, 2023, 6:46pm UTC](https://community.hubspot.com/t/search-for-object-by-object-id-without-knowing-object-type/82896/1 "2023-06-07T18:46:34Z")

</div>

Hello

Through HubSpot API, how to discover the

**objectType**

if one has its

**objectId**

?

Based on a strict immutable interface contract, and it does not include property

**objectType: string;**

`objectId: string;file: {... };`

Steps:

1. Upload Document, which returns a

**documentId**

.

1. Create an Engagement to attach

**documentId**

, which returns an

**engagementId**

.

1. Associate new Engagement with Object with

**objectId**

.

To perform Engagement association to Object requires:

- assume **Note** is **engType**
- **engagementId** as **engId**
- **objectType** as **objType**
- **objectId** as **objId**

`/crm/v3/objects/${engType}s/${engId}/associations/${objType}/${objId}/${enbType}_to_${objType}`

So to perform an association between Engagment to Object requires knowing

**objectType**

and

**objectId**

.

Thank you.

---

<div class="post-metadata">

**Author:** ![jeff00seattle](https://avatars.discourse-cdn.com/v4/letter/j/91b2a8/32.png) [@jeff00seattle](https://community.hubspot.com/u/jeff00seattle)\
**Post date:** [June 7, 2023, 7:13pm UTC](https://community.hubspot.com/t/search-for-object-by-object-id-without-knowing-object-type/82896/2 "2023-06-07T19:13:00Z")

</div>

Unfortunately, a solution is still not available.

[Object type from record ID](https://community.hubspot.com/t5/APIs-Integrations/Object-type-from-record-ID/m-p/760328#M61665)

Submitted by @[CRod5](https://community.hubspot.com/t5/user/viewprofilepage/user-id/526574)

[API call that returns object type from record id](https://community.hubspot.com/t5/HubSpot-Ideas/API-call-that-returns-object-type-from-record-id/idi-p/760678#M136625)
