Skip to main content
Solved

Improve your GET PROFILE API


Devphoenix
Active Contributor II
Forum|alt.badge.img+3

Hi Team,

I hope you're doing well.

Could you please consider improving the GET Profile API? Currently, it does not provide the total number of profiles, which is a critical piece of information for many business use cases. Most CRM platforms include this feature, making it easier to retrieve the total count of items without additional computation.

At the moment, the endpoint https://a.klaviyo.com/api/profiles only provides pagination links, which isn't the most efficient solution for retrieving the total profile count.

Could you prioritize adding this enhancement? It is required for implementing business logic across various areas effectively.

Thank you for your attention to this matter!

Best answer by saulblum

The easiest way to do this right now would be to make a segment that contains all profiles — e.g. defined as, “email or phone number exists” — and then call Get Segment (https://developers.klaviyo.com/en/reference/get_segment).

The response includes a profile_count property.

View original
Did this topic or the replies in the thread help you find an answer to your question?

8 replies

KeviSunshine
Expert Problem Solver III
Forum|alt.badge.img+8
  • Expert Problem Solver III
  • 158 replies
  • January 14, 2025

Just want to say that I agree with this. Adding a total number of pages to the standard `links` response object for all paginated endpoints would be a good improvement!


MANSIR2094
Problem Solver IV
Forum|alt.badge.img+13
  • Problem Solver IV
  • 174 replies
  • January 14, 2025

Hi community,

Could you enhance the GET Profile API to include the total number of profiles? This data is crucial for business use cases and is standard in most CRM platforms. Currently, the endpoint (https://a.klaviyo.com/api/profiles) only provides pagination links, which makes retrieving the total count less efficient.

 

Please consider prioritizing this improvement to better support business logic implementation.


Forum|alt.badge.img+7
  • Klaviyo Employee
  • 168 replies
  • Answer
  • January 14, 2025

The easiest way to do this right now would be to make a segment that contains all profiles — e.g. defined as, “email or phone number exists” — and then call Get Segment (https://developers.klaviyo.com/en/reference/get_segment).

The response includes a profile_count property.


Mich expert
Problem Solver IV
Forum|alt.badge.img+11
  • Problem Solver IV
  • 64 replies
  • January 14, 2025

thanks for the question

Currently, the "GET Profile API" doesn't show the total number of profiles, which is important for businesses to use it effectively. Other CRM tools usually include this feature, making things easier. Instead, this API only gives pagination links, meaning you need extra effort to figure out the total count.  

A quick workaround is to create a segment (a group) of all profiles, like "anyone with an email or phone," and then use the **Get Segment API** to get the total count in the `profile_count` property. Here's a link to the documentation for this: [Get Segment API](https://developers.klaviyo.com/en/reference/get_segment).  

Free free to masage me. Hope this helps!


Devphoenix
Active Contributor II
Forum|alt.badge.img+3
  • Author
  • Active Contributor II
  • 17 replies
  • January 15, 2025

Thanks for your response. However, don’t you think it would be more logical and aligned with business use cases to include the total profile count directly within the GET Profile API? Many other platforms like Google, HubSpot, Mailchimp, etc., provide this information as a primary feature without any second thoughts. Requesting a simple count shouldn’t be overly complex.

Creating a segment to achieve this functionality doesn’t seem practical, as not all users would prefer to create segments just to retrieve a count. If I only need the total profile count, creating a segment feels like an unnecessary step.

As Klaviyo is a platform designed to cater to diverse needs, I would expect this feature to be inherently available.

Thanks for considering this suggestion!


Forum|alt.badge.img+31
  • Partner
  • 252 replies
  • January 15, 2025

I recommend implementing meaningful pagination links in the API navigation rather than using tokens. This enhancement will enable developers to easily navigate to a specific page number, streamlining the process of pagination.


Devphoenix
Active Contributor II
Forum|alt.badge.img+3
  • Author
  • Active Contributor II
  • 17 replies
  • January 17, 2025

Pagination is an area that needs improvement, but having a count is a must-have feature. Team, please plan this enhancement. The product team should consider this as it’s essential for other business requirements.


Devphoenix
Active Contributor II
Forum|alt.badge.img+3
  • Author
  • Active Contributor II
  • 17 replies
  • February 5, 2025

Hi Team,

Is there any update on this? As per the business logic, this is a crucial requirement. You may also refer to other platforms for validation.

Looking forward to your response.

Thanks!