Skip to main content
The Box query insights API lets you calculate summary numbers from your Box content. You can filter items, group results, and compute metrics such as counts, sums, averages, minimums, and maximums. To get insights, send a POST request to https://api.box.com/2.0/query/insights.

Parameters

To make a call, you must pass the following parameters. Mandatory parameters are in bold.

Metric names

Each key in the metrics object is a name you choose for that metric. Naming rules
  • Must be a non-empty string
  • Must be unique in the request
  • Maximum length: 256 characters
  • Allowed characters: letters, digits, _, -, and .
  • Must not start with a digit or special character
  • Whitespace and other special characters are not allowed
Behavior If you do not use group_by, metrics are calculated across all matching items. Limits You can define up to 10 metrics per request.

Examples

Total contract value

Get total contract value and counts for top 3 contract types created in June 2025. Request:
Response:

Overall average, minimum, maximum contract value

Get overall average, minimum, maximum contract value for contracts created in June 2025. Request:
Response:

Total document count

Get total document count only. Request:
Response:

Response fields

Error codes

Additional error codes and details can be introduced as the API evolves.
Last modified on July 27, 2026