---
title: "Retrieve user activity aggregated by time period"
slug: "retrieve-aggregated-activity-for-defined-users-by-a-date-range-with-grouping-in-time-periods-v2statsactivityaggregate-by-period"
updated: 2025-11-17T08:10:53Z
published: 2025-11-17T08:12:09Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://help.gong.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve aggregated activity for defined users by a date range with grouping in time periods (/v2/stats/activity/aggregate-by-period)

Post/v2/stats/activity/aggregate-by-period

Lists the aggregated activity of multiple users within the Gong system for each time period within the defined date range. This endpoint returns multiple records, one for each user. For each user there are items for every time period in the date range, including statistics about the user's activity. Records are returned only for users with activity in the range.

Required authorizaton scope: 'api:stats:user-actions'.

Body parameters<select class='api-response-data' aria-label='Media type'><option value='95527846-0527-41ca-93f4-30e054bee093'>application/json</option>
</select>Expand Allobject  cursorstring    

When paging is needed, provide the value supplied by the previous API call to bring the following page of records.

ExampleeyJhbGciOiJIUzI1NiJ9.eyJjYWxsSWQiM1M30.6qKwpOcvnuweTZmFRzYdtjs_YwJphJU4QIwWFM
filterobject (MultipleUsersWithDates)  Required

Filter parameters.

fromDatestring    Required

The date (in the company's time zone) from which to list a user's activity. This value is inclusive. The date should be specified in the following format: YYYY-MM-DD.

Example2019-01-20
toDatestring    Required

The date (in the company's time zone) until which to list a user's activity. This value is exclusive. This value should not exceed the current day. The date should be specified in the following format: YYYY-MM-DD.

Example2019-01-21
createdFromDateTimestring  (date-time)    
createdToDateTimestring  (date-time)    
userIds Array of string   

Set of Gong's unique numeric identifiers for the users (up to 20 digits).

Example[
  "234599484848423"
]string    

aggregationPeriodstring    Required

Calendar time period for aggregating data. Note: First day of the week is Monday.

Valid values[
  "DAY",
  "WEEK",
  "MONTH",
  "QUARTER",
  "YEAR"
]ExampleDAY

Responses200

Successful response

<select class='api-response-data' aria-label='Media type'><option value='bcb4ad41-8139-42d4-93bf-d1224bab47aa'>application/json</option>
</select>Expand Allobject  requestIdstring    

A Gong request reference Id, generated for this request. Can be used for troubleshooting purposes.

Example4al018gzaztcr8nbukw
recordsobject (Records)  

Information about the number of records that match the requested filter.

totalRecordsinteger  (int32)    

Total number of records.

Example263
currentPageSizeinteger  (int32)    

Number of records in the current page.

Example100
currentPageNumberinteger  (int32)    

Current page number.

Example0
cursorstring    

Returned only when there are more records to be retrieved. Repeat the API call and pass this cursor value in the request to retrieve the next page of records.

ExampleeyJhbGciOiJIUzI1NiJ9.eyJjYWxsSWQiM1M30.6qKwpOcvnuweTZmFRzYdtjs_YwJphJU4QIwWFM

usersAggregateActivity Array of object (UserAggregateByPeriodActivities)   

A list, in which each item contains details of one user's activities.

object  

A list, in which each item contains details of one user's activities.

userIdstring    

Gong's unique numeric identifier for the user (up to 20 digits).

Example234599484848423
userEmailAddressstring    

The email address of the Gong user.

Exampletest@test.com
userAggregateActivity Array of object (AggregateActivityWithDates)   

A list, in which each item contains aggregate user activity for consecutive time periods in the date range.

object  

Aggregated activity for a user within a time period

callsAsHostinteger  (int32)    

The number of recorded calls this user hosted.

Example20
callsGaveFeedbackinteger  (int32)    

The number of recorded calls the user gave feedback on.

Example35
callsRequestedFeedbackinteger  (int32)    

The number of recorded calls the user requested feedback on.

Example77
callsReceivedFeedbackinteger  (int32)    

The number of recorded calls the user received feedback on.

Example67
ownCallsListenedTointeger  (int32)    

The number of the user's own calls the user listened to.

Example668
othersCallsListenedTointeger  (int32)    

The number of other users' calls the user listened to.

Example96
callsSharedInternallyinteger  (int32)    

The number of calls the user shared with others inside the company.

Example478
callsSharedExternallyinteger  (int32)    

The number of calls the user shared with others outside the company.

Example75
callsScorecardsFilledinteger  (int32)    

The number of scorecards the user completed.

Example876
callsScorecardsReceivedinteger  (int32)    

The number of calls in which someone filled a scorecard on the user's calls.

Example876
callsAttendedinteger  (int32)    

The number of calls in which this user is participant (not host).

Example46
callsCommentsGiveninteger  (int32)    

The number of calls in which a user gave at least one comment.

Example21
callsCommentsReceivedinteger  (int32)    

The number of calls in which a user received at least one comment on the users calls.

Example13
callsMarkedAsFeedbackGiveninteger  (int32)    

The number of calls in which someone pressed the "Mark as reviewed".

Example24
callsMarkedAsFeedbackReceivedinteger  (int32)    

The number of calls in which someone pressed the “Mark as reviewed” on the users calls.

Example35
fromDatestring    

The start of the period, or the request filter's fromDate for the first period in the range, in the ISO-8601 format, for example: '2024-01-17T16:20:05-03:00' or '2016-02-16T03:57:04.834+05:30' or '2020-11-20T21:30:07.233692Z', where Z stands for UTC.

Example2019-01-20T00:00:00-08:00
toDatestring    

The end of the period, or the request filter's toDate for the last period in the range, in the ISO-8601 format, for example: '2024-01-17T16:20:05-03:00' or '2016-02-16T03:57:04.834+05:30' or '2020-11-20T21:30:07.233692Z', where Z stands for UTC.

Example2019-01-21T000:00:00-08:00

400

Malformed request

<select class='api-response-data' aria-label='Media type'><option value='b7365a19-292f-46f1-a020-c55cb491e25a'>application/json</option>
</select>object  requestIdstring    

A Gong request reference Id, generated for this request. Can be used for troubleshooting purposes.

Example4al018gzaztcr8nbukw
errors Array of string   

Error messages.

Example[
  "An error has occurred"
]string    

401

Access denied

<select class='api-response-data' aria-label='Media type'><option value='3c693020-2187-40d5-8e30-8dc430877f4a'>application/json</option>
</select>object  requestIdstring    

A Gong request reference Id, generated for this request. Can be used for troubleshooting purposes.

Example4al018gzaztcr8nbukw
errors Array of string   

Error messages.

Example[
  "An error has occurred"
]string    

404

User not found

<select class='api-response-data' aria-label='Media type'><option value='8268b682-6b49-42d1-ac26-5035ad614d52'>application/json</option>
</select>object  requestIdstring    

A Gong request reference Id, generated for this request. Can be used for troubleshooting purposes.

Example4al018gzaztcr8nbukw
errors Array of string   

Error messages.

Example[
  "An error has occurred"
]string    

429

API request limit exceeded

HeadersRetry-AfterintegerNumber of seconds to wait before making a new request.
<select class='api-response-data' aria-label='Media type'><option value='db09367c-14ac-44a5-a3c1-d6ef86424304'>application/json</option>
</select>object  requestIdstring    

A Gong request reference Id, generated for this request. Can be used for troubleshooting purposes.

Example4al018gzaztcr8nbukw
errors Array of string   

Error messages.

Example[
  "An error has occurred"
]string    

500

Failed to complete the operation due to an unexpected error

<select class='api-response-data' aria-label='Media type'><option value='6e361b0f-3cb1-4bbf-b827-115be362b1e3'>application/json</option>
</select>object  requestIdstring    

A Gong request reference Id, generated for this request. Can be used for troubleshooting purposes.

Example4al018gzaztcr8nbukw
errors Array of string   

Error messages.

Example[
  "An error has occurred"
]string
