List Contacts - Request-URI Too Large

We are using the List contacts endpoint in order to get the account contacts (GET/crm/v3/objects/contacts).

For enterprise customers, that have a lot of custom properties (~600 plus) we are not able to report the contacts list correctly.

We are getting the “Request-URI Too Large” error.

This is because of the endpoint is a GET request with the “properties” query parameter in the URL, which inflated with the increasing of the custom properties…

Please create a POST option for this endpoint where we pass the properties in the request body.

You have this option in the Search endpoint, please also implement it for the List endpoint.

In my opinion this is a bug, not a new feature request, but you can also take a look on a related idea submitted 2 years ago - https://community.hubspot.com/t5/APIs-Integrations/Downloading-contacts-with-many-properties-results-in-414-Request/m-p/479846.

Hello @PowerMyAnalytic

you need to retrieve the list of contacts that you want to fetch properties for. You can use the “List Contacts” endpoint for this.

Next, you need to extract the contact IDs from the response.

Then, you can use the Property Batch API to fetch the properties for these contacts. The Property Batch API accepts a JSON request body that contains the list of properties you want to fetch, and the list of contact IDs you want to fetch the properties for.

Here’s an example request body for the Property Batch API

{
 "definitions": [
 {
 "name": "email",
 "propertyName": "email"
 },
 {
 "name": "firstname",
 "propertyName": "firstname"
 },
 {
 "name": "lastname",
 "propertyName": "lastname"
 }
 ],
 "requests": [
 {
 "id": "123",
 "objectId": "123",
 "definitionName": "email"
 },
 {
 "id": "456",
 "objectId": "456",
 "definitionName": "firstname"
 },
 {
 "id": "789",
 "objectId": "789",
 "definitionName": "lastname"
 }
 ]
}

fetching the “email”, “firstname”, and “lastname” properties for three contacts with IDs “123”, “456”, and “789”.

Hi @himanshurauthan!

Thanks,

I’m aware for this option,

however, each request is a point of failure, and when we are asking for thousands of contacts we want to make less requests as possible.

also, with this method we basically double our requests,

which make me worry about the API limit of 100 reequests per 10 seconds (API usage guidelines and limits - HubSpot docs)

HubSpot already have the GET endpoint that do this in one request.

Adding POST option should not be an issue.

Are there any updates, please?