Analytics

Team Stats

POST/v1/analytics/team/stats
POST
/v1/analytics/team/stats

Get Stats team(s) report

Authorization

x-api-key<token>

API key for Open API authentication

In: header

Request Body

application/jsonRequired

userIdsarray<string>

Array of encrypted user IDs to filter the report

Example: ["abc123xyz","def456uvw"]

startDatestring

Start date for the report period in ISO 8601 format with timezone

Example: "2024-01-01T00:00:00.000+00:00"

endDatestring

End date for the report period in ISO 8601 format with timezone

Example: "2024-01-31T23:59:59.999+00:00"

countBystring

How to group the statistics (relative or absolute)

Example: "absolute"Value in: "relative" | "absolute"

limitnumber

Maximum number of records to return per page

Example: 10Minimum: 1

pagenumber

Page number for pagination

Example: 1Minimum: 1

sortOrderstring

Sort direction for ordering results

Example: "desc"Default: "desc"Value in: "asc" | "desc"

orderBystring

Field name to order the results by. Valid values depend on report type

Example: "prospectAdded"Value in: "prospectAdded" | "prospectContacted" | "opened" | "clicked" | "replied" | "unSubscribed" | "bounced" | "Uncategorized" | "Interested" | "Not Interested" | "Meeting Booked" | "Out of Office" | "Closed" | "Not Now" | "Do Not Contact" | "prospectContacted" | "emailSent" | "opened" | "clicked" | "replied" | "bounced"

typestring

Type of report to generate (prospect or email)

Example: "prospect"Value in: "prospect" | "email"

Responses

200
200 response

Request

curl -X POST \
  "https://open-api.saleshandy.com/v1/analytics/team/stats" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "userIds": [
    "abc123xyz",
    "def456uvw"
  ],
  "startDate": "2024-01-01T00:00:00.000+00:00",
  "endDate": "2024-01-31T23:59:59.999+00:00",
  "countBy": "absolute",
  "limit": 10,
  "page": 1,
  "sortOrder": "desc",
  "orderBy": "prospectAdded",
  "type": "prospect"
}'

Response

No response body