# Get Client Analytics Charts

## Get client statistics

> Retrieve time-series client statistics data with date and count information.\
> \
> Default time range: Last 7 days if startTime and endTime are not provided\
> \
> \*\*Time range limitations:\*\*\
> \- Maximum time range is limited to 1 year (365 days)\
> \- If the time range exceeds 1 year, the system will automatically adjust the startTime to be 365 days before the endTime\
> \- The endTime will remain unchanged to preserve the user's specified end date\
> \
> Platform filtering:\
> \- If platform is not specified, returns data for all platforms\
> \- If platform is specified, returns data only for that platform\
> \
> Supported platforms: line, facebook, instagram, liveChat, whatsapp\
> \
> Response format: Arrays of objects with date and count properties

```json
{"openapi":"3.0.3","info":{"title":"Manta OpenAPI","version":"0.318.0"},"tags":[{"name":"Core","description":"Core OpenAPI functionality for customer management and broadcasting"}],"servers":[{"url":"https://mantago.cc/api","description":"MantaGo Openapi host url"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token for API authentication"}},"schemas":{"ClientStatisticsRequest":{"type":"object","properties":{"secret":{"type":"string","description":"Secret key for API authentication"},"platform":{"type":"string","enum":["line","facebook","instagram","liveChat","whatsapp"],"description":"Platform type for filtering (optional, if not provided returns all platforms)"},"startTime":{"type":"string","format":"date","description":"Start date for statistics range (optional, defaults to 7 days ago if not provided). Note - If the time range exceeds 365 days, startTime will be automatically adjusted to be 365 days before endTime."},"endTime":{"type":"string","format":"date","description":"End date for statistics range (optional, defaults to today if not provided). This date will be preserved even if the time range exceeds 365 days."},"type":{"type":"string","default":"follower","description":"Statistics type","enum":["follower","block","newFollower","interactionFollower"]}},"required":["secret","type"]},"ClientStatisticsResponse":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"clientStatistics":{"type":"object","description":"Time-series client statistics data. Fields returned depend on platform and type parameters:\n- Platform: Determines which platform statistics are included (all platforms if not specified)\n- Type: Filters to specific statistic types (follower, block, newFollower, interactionFollower)\n\nEach array contains objects with date and count properties for the specified time range.","properties":{"lineFollowers":{"type":"array","description":"Daily LINE follower counts (returned when platform='line' or not specified, and type='follower' or not specified)","items":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"Date in YYYY-MM-DD format"},"count":{"type":"integer","description":"Follower count for this date"}}}},"lineNewFollowers":{"type":"array","description":"Daily LINE new follower counts (returned when platform='line' or not specified, and type='newFollower' or not specified)","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}},"lineBlocks":{"type":"array","description":"Daily LINE block counts (returned when platform='line' or not specified, and type='block')","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}},"lineInteractionFollowers":{"type":"array","description":"Daily LINE interaction follower counts (returned when platform='line' or not specified, and type='interactionFollower')","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}},"fbFollowers":{"type":"array","description":"Daily Facebook follower counts (returned when platform='facebook' or not specified, and type='follower' or not specified)","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}},"fbNewFollowers":{"type":"array","description":"Daily Facebook new follower counts (returned when platform='facebook' or not specified, and type='newFollower' or not specified)","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}},"fbBlocks":{"type":"array","description":"Daily Facebook block counts (returned when platform='facebook' or not specified, and type='block')","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}},"fbInteractionFollowers":{"type":"array","description":"Daily Facebook interaction follower counts (returned when platform='facebook' or not specified, and type='interactionFollower')","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}},"igFollowers":{"type":"array","description":"Daily Instagram follower counts (returned when platform='instagram' or not specified, and type='follower' or not specified)","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}},"igNewFollowers":{"type":"array","description":"Daily Instagram new follower counts (returned when platform='instagram' or not specified, and type='newFollower' or not specified)","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}},"igInteractionFollowers":{"type":"array","description":"Daily Instagram interaction follower counts (returned when platform='instagram' or not specified, and type='interactionFollower')","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}},"liveChatFollowers":{"type":"array","description":"Daily LiveChat follower counts (returned when platform='liveChat' or not specified, and type='follower' or not specified)","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}},"liveChatNewFollowers":{"type":"array","description":"Daily LiveChat new follower counts (returned when platform='liveChat' or not specified, and type='newFollower' or not specified)","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}},"liveChatInteractionFollowers":{"type":"array","description":"Daily LiveChat interaction follower counts (returned when platform='liveChat' or not specified, and type='interactionFollower')","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}},"whatsappFollowers":{"type":"array","description":"Daily WhatsApp follower counts (returned when platform='whatsapp' or not specified, and type='follower' or not specified)","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}},"whatsappNewFollowers":{"type":"array","description":"Daily WhatsApp new follower counts (returned when platform='whatsapp' or not specified, and type='newFollower' or not specified)","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}},"whatsappInteractionFollowers":{"type":"array","description":"Daily WhatsApp interaction follower counts (returned when platform='whatsapp' or not specified, and type='interactionFollower')","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}},"totalFollowers":{"type":"array","description":"Daily total follower counts across all platforms (only returned when platform is not specified and type='follower' or not specified)","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}},"totalNewFollowers":{"type":"array","description":"Daily total new follower counts across all platforms (only returned when platform is not specified and type='newFollower' or not specified)","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}},"totalBlocks":{"type":"array","description":"Daily total block counts across all platforms (only returned when platform is not specified and type='block')","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}},"totalInteractionFollowers":{"type":"array","description":"Daily total interaction follower counts across all platforms (only returned when platform is not specified and type='interactionFollower')","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"integer"}}}}}}}},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean"},"errResponse":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"},"botId":{"type":"string"}},"required":["message","code"]}},"required":["success","errResponse"]}},"responses":{"TokenError":{"description":"JWT token is invalid or expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"PermissionError":{"description":"Permission denied - insufficient access rights","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"GetOpenApiError":{"description":"OpenAPI configuration not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"RateLimitError":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/openapi/clients/statistics":{"post":{"tags":["Core"],"summary":"Get client statistics","description":"Retrieve time-series client statistics data with date and count information.\n\nDefault time range: Last 7 days if startTime and endTime are not provided\n\n**Time range limitations:**\n- Maximum time range is limited to 1 year (365 days)\n- If the time range exceeds 1 year, the system will automatically adjust the startTime to be 365 days before the endTime\n- The endTime will remain unchanged to preserve the user's specified end date\n\nPlatform filtering:\n- If platform is not specified, returns data for all platforms\n- If platform is specified, returns data only for that platform\n\nSupported platforms: line, facebook, instagram, liveChat, whatsapp\n\nResponse format: Arrays of objects with date and count properties","parameters":[{"name":"botId","in":"query","required":true,"schema":{"type":"string"},"description":"The bot ID for the API request"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientStatisticsRequest"}}}},"responses":{"200":{"description":"Client statistics data retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientStatisticsResponse"}}}},"401":{"$ref":"#/components/responses/TokenError"},"403":{"$ref":"#/components/responses/PermissionError"},"404":{"$ref":"#/components/responses/GetOpenApiError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.mantago.cc/mantago-en/documentation-1/client-api/get-client-analytics-charts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
