{"command":{"effect":"read","timeoutSeconds":30,"inputSchema":{"type":"object","description":"**This endpoint allows you to retrieve the total sum of each email statistic for every category over the given date range.**\n\nIf you do not define any query parameters, this endpoint will return a sum for each category in groups of 10.","properties":{"query":{"type":"object","properties":{"sort_by_metric":{"type":"string","default":"delivered","description":"The metric that you want to sort by.  Must be a single metric."},"sort_by_direction":{"allOf":[{"$ref":"#/definitions/SortByDirection"},{"type":"string","default":"desc"}],"description":"The direction you want to sort."},"start_date":{"type":"string","description":"The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD."},"end_date":{"type":"string","description":"The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD."},"limit":{"type":"integer","default":5,"description":"Limits the number of results returned."},"offset":{"type":"integer","default":0,"description":"The point in the list to begin retrieving results."},"aggregated_by":{"allOf":[{"$ref":"#/definitions/AggregatedBy1"},{"type":"string"}],"description":"How to group the statistics. Must be either \"day\", \"week\", or \"month\"."}},"required":["start_date"],"additionalProperties":false},"headers":{"type":"object","properties":{"on-behalf-of":{"type":"string","description":"The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information."}},"required":[],"additionalProperties":false}},"required":["query"],"additionalProperties":false,"definitions":{"SortByDirection":{"type":"string","enum":["desc","asc"]},"AggregatedBy1":{"type":"string","enum":["day","week","month"]}}},"name":"Retrieve sums of email stats for each category.","id":"sendgrid.stats.listcategorystatsum","example":{"query":{"start_date":"example"}},"maxRequests":1,"summary":false}}