# Events v3 api sorting

**URL:** <https://community.hubspot.com/t/events-v3-api-sorting/143436>\
**Category:** APIs & Integrations\
**Tags:** events\
**Created:** [November 27, 2025, 11:50am UTC](https://community.hubspot.com/t/events-v3-api-sorting/143436 "2025-11-27T11:50:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KElliott81](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@KElliott81](https://community.hubspot.com/u/KElliott81)\
**Post date:** [November 27, 2025, 11:50am UTC](https://community.hubspot.com/t/events-v3-api-sorting/143436/1 "2025-11-27T11:50:57Z")

</div>

Hi there

I am following the documentation here in order to retrieve custom events:

> **[Accounts Dashboard | HubSpot](https://app.hubspot.com/myaccounts?next=developerdocs&redirect=%2Fapi-reference%2Fevents-events-v3%2Fevents%2Fget-events-v3-events-)**

I am successfully retrieving the data set that I need via my request but the sort parameter is not working as expected. The documentation says:

```lia-code-sample
sort
string[]
Sort direction based on the timestamp of the event instance, ASCENDING or DESCENDING.

```

my request looks like this:

`https://api.hubapi.com/events/v3/events?eventType=pe145140026_landing_page_cta_click&sort=DESCENDING`

but the response is:

```lia-code-sample
{
 "status": "error",
 "message": "Only a single sort field 'occurredAt' is supported",
 "correlationId": "bdae94a4-10a5-4782-93e1-1e33ff9b312b",
 "category": "VALIDATION_ERROR"
}

```

Please could someone advise on the correct sort parameter for this request? I’m just trying to do a simple descending sort based on the event date.

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [November 27, 2025, 2:53pm UTC](https://community.hubspot.com/t/events-v3-api-sorting/143436/2 "2025-11-27T14:53:15Z")

</div>

Hey @KElliott81 and welcome, we are so glad you are here! 🤗  
Thanks for reaching out to the HubSpot Community!  
Here is a documentation “[Events API | Event Analytics](https://developers.hubspot.com/docs/api-reference/event-analytics/guide)” that might help you!  
Now, let’s consult our Top Experts: Hi @RubenBurdin, @SteveHTM and [@sylvain\_tirreau](https://community.hubspot.com/t5/user/viewprofilepage/user-id/601366) do you have suggestions to help @KElliott81, please?  
Thanks so much and have a lovely day!  
Bérangère

---

<div class="post-metadata">

**Author:** ![KElliott81](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@KElliott81](https://community.hubspot.com/u/KElliott81)\
**Post date:** [November 27, 2025, 9:06pm UTC](https://community.hubspot.com/t/events-v3-api-sorting/143436/3 "2025-11-27T21:06:43Z")

</div>

Hi there

Thanks for the warm welcome. I did read the docs originally but there’s not much detail and no example of the sort param and the error message is not super clear. But after trying a number of different patterns and combinations for it, I found that this was effective for a descending sort:

`https://api.hubapi.com/events/v3/events?eventType={{event type name}}&objectId={{object id}}&objectType=contact&sort=-occurredAt`

I wonder if the documentation might benefit from an example for that one?

cheers

Kat

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [December 1, 2025, 3:51pm UTC](https://community.hubspot.com/t/events-v3-api-sorting/143436/4 "2025-12-01T15:51:52Z")

</div>

Hi @KElliott81 and thanks for the valuable feedback, I have passed it along internally.  
Based on the documentation, the error message is correct. The Events v3 API only supports sorting by the occurredAt field, and you need to use a dash prefix for descending sort.

The correct format is: sort=-occurredAt (for descending) or sort=occurredAt (for ascending).

Your request should look like:  
[https://api.hubapi.com/events/v3/events?eventType=pe145140026\_landing\_page\_cta\_click&sort=-occurredAt](https://api.hubapi.com/events/v3/events?eventType=pe145140026_landing_page_cta_click&sort=-occurredAt)

I hope this helps!  
Bérangère  
_This post was created with the assistance of AI tools._
