APIs & Integrations

stewart1
Member

Contact API change? (How changeable are API responses?)

SOLVE

I'm fairly sure that about a week ago I was using the Contacts API "Get all contacts" and was processing a returned Json array.

Today I see that the Json array is nested inside a Json object. You have to get the array "contacts" to process as I was doing.

This is spooky because it means either:

  1. I'm going slightly mad because I committed broken code which I was sure was working
  2. Hubspot changed the API response

Can anyone help me know which it is? I'm willing to admit it might be my own failing .....

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Contact API change? (How changeable are API responses?)

SOLVE

Hey @stewart,

To my knowledge, the Contacts API has always returned a JSON object containing the "contacts" array. I looked into the revision history of the Get all contacts article and the example code has shown a JSON object since it was added in 2014.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
1 Reply 1
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Contact API change? (How changeable are API responses?)

SOLVE

Hey @stewart,

To my knowledge, the Contacts API has always returned a JSON object containing the "contacts" array. I looked into the revision history of the Get all contacts article and the example code has shown a JSON object since it was added in 2014.

Isaac Takushi

Associate Certification Manager
0 Upvotes