Company name in contact list api

I am using this end point https://api.hubapi.com/crm/v3/objects/contacts to get the list of contacts with property company name but it is not giving me the company name. Can anyone help how to add company property in contact api.

Thank you in advance

Hey, @VJain3 :waving_hand: Great question!

I have a few follow-up questions:

  • Are you after the Contact property — Company name? (a property on the Contact object)
  • Are you after the ID of the Associated Company? (an association between two objects)
  • Or both?

Here’s how to make the request and get both the value for Company Name and the ID of the Associated Company (you’ll need to make a request to this endpoint to get the label for the Company using the ID). I’ll use the example here — Contacts API | Read:

  • Request

    curl --request GET \
     --url 'https://api.hubapi.com/crm/v3/objects/contacts/901?properties=company&associations=company&archived=false' \
     --header 'authorization: Bearer YOUR_ACCESS_TOKEN'​
    
  • Response

    HTTP 200
    
    {
     "id": "901",
     "properties": {
     "company": "Bob Burgers",
     "createdate": "2022-11-03T21:42:31.255Z",
     "hs_object_id": "901",
     "lastmodifieddate": "2023-02-01T17:33:36Z"
     },
     "createdAt": "2022-11-03T21:42:31.255Z",
     "updatedAt": "2023-02-01T17:33:36Z",
     "archived": false,
     "associations": {
     "companies": {
     "results": [
     {
     "id": "10202231613",
     "type": "contact_to_company"
     },
     {
     "id": "10202231613",
     "type": "contact_to_company_unlabeled"
     }
     ]
     }
     }
    }​
    
  • If you’re only after the property called Company Name, this is what your request URL will look like
    https://api.hubapi.com/crm/v3/objects/contacts/901?properties=company&archived=false​

Have fun building! — Jaycee