# Stats

Email sending aggregated stats. The same you see in your Stats dashboard.

## Get Sending Stats

> Get account sending stats. Use filters to get specific stats.

```json
{"openapi":"3.1.0","info":{"title":"Email Sending","version":"2.0.0"},"tags":[{"name":"stats","description":"Email sending aggregated stats. The same you see in your Stats dashboard."}],"servers":[{"description":"Mailtrap account API (`mailtrap.io`) for sending domains, suppressions, stats, and email logs.\nError JSON matches other account endpoints (`error` or string `errors`), not the `send.api` / `bulk.api` sending shape (`success` + `errors` array).\n","url":"https://mailtrap.io"}],"security":[{"HeaderAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"HeaderAuth":{"type":"apiKey","description":"API token in Api-Token header","in":"header","name":"Api-Token"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication"}},"parameters":{"account_id":{"name":"account_id","in":"path","required":true,"description":"Account ID","schema":{"type":"integer"}},"StartDateQueryFilter":{"name":"start_date","description":"Start date for which to include the results.","in":"query","required":true,"schema":{"type":"string","format":"date"}},"EndDateQueryFilter":{"name":"end_date","description":"End date for which to include the results.","in":"query","required":true,"schema":{"type":"string","format":"date"}},"SendingDomainIDsQueryFilter":{"name":"sending_domain_ids[]","description":"IDs of the sending domains for which to include the results. If not provided, results for all sending domains will be included.","in":"query","schema":{"type":"array","items":{"type":"integer","format":"int64"}}},"SendingStreamsQueryFilter":{"name":"sending_streams[]","description":"Sending streams for which to include the results. If not provided, results for all sending streams will be included.","in":"query","schema":{"type":"array","items":{"type":"string","enum":["transactional","bulk"]}}},"CategoriesQueryFilter":{"name":"categories[]","description":"Categories for which to include the results. If not provided, results for all categories will be included.","in":"query","schema":{"type":"array","items":{"type":"string"}}},"ESPsQueryFilter":{"name":"email_service_providers[]","description":"Email service providers for which to include the results. If not provided, results for all ESPs will be included.","in":"query","schema":{"type":"array","items":{"type":"string","enum":["Google","Yahoo","Outlook","Hey","Google Workspace","Zoho Email","ProtonMail","Yandex","iCloud","Office 365","Amazon SES (Simple Email Service)","Proofpoint Email Protection","Mimecast Email Protection","GMX.net","Rackspace","OVH hosted","Linode hosted","GoDaddy","Symantec Email Protection","Barracuda Email Protection","Cisco Email Protection","FastMail","Naver","Seznam","Comcast","Spectrum"]}}}},"schemas":{"SendingStats":{"title":"SendingStats","type":"object","properties":{"delivery_count":{"type":"integer"},"delivery_rate":{"type":"number","format":"double"},"bounce_count":{"type":"integer"},"bounce_rate":{"type":"number","format":"double"},"open_count":{"type":"integer"},"open_rate":{"type":"number","format":"double"},"click_count":{"type":"integer"},"click_rate":{"type":"number","format":"double"},"spam_count":{"type":"integer"},"spam_rate":{"type":"number","format":"double"}}},"BadRequest":{"title":"BadRequestResponse","description":"Invalid parameters. Some endpoints return an empty body with HTTP 400; when present, a message may use an `error` field.\n","type":"object","properties":{"error":{"type":"string"}}},"UnauthenticatedResponse":{"title":"UnauthenticatedResponse","type":"object","properties":{"error":{"type":"string","description":"Error message"}}},"PermissionsDeniedResponse":{"title":"PermissionsDeniedResponse","type":"object","properties":{"errors":{"type":"string","description":"Error message"}}},"RateLimitExceededResponse":{"title":"RateLimitExceededResponse","type":"object","properties":{"errors":{"type":"string","description":"Error message"}}}},"responses":{"BAD_REQUEST":{"description":"Bad request - invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"Unauthorized":{"description":"Returns unauthorized error message. Check your credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"Forbidden":{"description":"Returns forbidden error message. Check your permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsDeniedResponse"}}}},"LIMIT_EXCEEDED":{"description":"Rate limit exceeded for the current account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceededResponse"}}}}}},"paths":{"/api/accounts/{account_id}/stats":{"get":{"operationId":"getAccountSendingStats","summary":"Get Sending Stats","description":"Get account sending stats. Use filters to get specific stats.","tags":["stats"],"parameters":[{"$ref":"#/components/parameters/account_id"},{"$ref":"#/components/parameters/StartDateQueryFilter"},{"$ref":"#/components/parameters/EndDateQueryFilter"},{"$ref":"#/components/parameters/SendingDomainIDsQueryFilter"},{"$ref":"#/components/parameters/SendingStreamsQueryFilter"},{"$ref":"#/components/parameters/CategoriesQueryFilter"},{"$ref":"#/components/parameters/ESPsQueryFilter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendingStats"}}}},"400":{"$ref":"#/components/responses/BAD_REQUEST"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/LIMIT_EXCEEDED"}}}}}}
```

## Get Sending Stats by Domains

> Get account sending stats by domains. Use filters to get specific stats.

```json
{"openapi":"3.1.0","info":{"title":"Email Sending","version":"2.0.0"},"tags":[{"name":"stats","description":"Email sending aggregated stats. The same you see in your Stats dashboard."}],"servers":[{"description":"Mailtrap account API (`mailtrap.io`) for sending domains, suppressions, stats, and email logs.\nError JSON matches other account endpoints (`error` or string `errors`), not the `send.api` / `bulk.api` sending shape (`success` + `errors` array).\n","url":"https://mailtrap.io"}],"security":[{"HeaderAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"HeaderAuth":{"type":"apiKey","description":"API token in Api-Token header","in":"header","name":"Api-Token"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication"}},"parameters":{"account_id":{"name":"account_id","in":"path","required":true,"description":"Account ID","schema":{"type":"integer"}},"StartDateQueryFilter":{"name":"start_date","description":"Start date for which to include the results.","in":"query","required":true,"schema":{"type":"string","format":"date"}},"EndDateQueryFilter":{"name":"end_date","description":"End date for which to include the results.","in":"query","required":true,"schema":{"type":"string","format":"date"}},"SendingDomainIDsQueryFilter":{"name":"sending_domain_ids[]","description":"IDs of the sending domains for which to include the results. If not provided, results for all sending domains will be included.","in":"query","schema":{"type":"array","items":{"type":"integer","format":"int64"}}},"SendingStreamsQueryFilter":{"name":"sending_streams[]","description":"Sending streams for which to include the results. If not provided, results for all sending streams will be included.","in":"query","schema":{"type":"array","items":{"type":"string","enum":["transactional","bulk"]}}},"CategoriesQueryFilter":{"name":"categories[]","description":"Categories for which to include the results. If not provided, results for all categories will be included.","in":"query","schema":{"type":"array","items":{"type":"string"}}},"ESPsQueryFilter":{"name":"email_service_providers[]","description":"Email service providers for which to include the results. If not provided, results for all ESPs will be included.","in":"query","schema":{"type":"array","items":{"type":"string","enum":["Google","Yahoo","Outlook","Hey","Google Workspace","Zoho Email","ProtonMail","Yandex","iCloud","Office 365","Amazon SES (Simple Email Service)","Proofpoint Email Protection","Mimecast Email Protection","GMX.net","Rackspace","OVH hosted","Linode hosted","GoDaddy","Symantec Email Protection","Barracuda Email Protection","Cisco Email Protection","FastMail","Naver","Seznam","Comcast","Spectrum"]}}}},"schemas":{"SendingStats":{"title":"SendingStats","type":"object","properties":{"delivery_count":{"type":"integer"},"delivery_rate":{"type":"number","format":"double"},"bounce_count":{"type":"integer"},"bounce_rate":{"type":"number","format":"double"},"open_count":{"type":"integer"},"open_rate":{"type":"number","format":"double"},"click_count":{"type":"integer"},"click_rate":{"type":"number","format":"double"},"spam_count":{"type":"integer"},"spam_rate":{"type":"number","format":"double"}}},"BadRequest":{"title":"BadRequestResponse","description":"Invalid parameters. Some endpoints return an empty body with HTTP 400; when present, a message may use an `error` field.\n","type":"object","properties":{"error":{"type":"string"}}},"UnauthenticatedResponse":{"title":"UnauthenticatedResponse","type":"object","properties":{"error":{"type":"string","description":"Error message"}}},"PermissionsDeniedResponse":{"title":"PermissionsDeniedResponse","type":"object","properties":{"errors":{"type":"string","description":"Error message"}}},"RateLimitExceededResponse":{"title":"RateLimitExceededResponse","type":"object","properties":{"errors":{"type":"string","description":"Error message"}}}},"responses":{"Unauthorized":{"description":"Returns unauthorized error message. Check your credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"Forbidden":{"description":"Returns forbidden error message. Check your permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsDeniedResponse"}}}},"LIMIT_EXCEEDED":{"description":"Rate limit exceeded for the current account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceededResponse"}}}}}},"paths":{"/api/accounts/{account_id}/stats/domains":{"get":{"operationId":"getAccountSendingStatsByDomains","summary":"Get Sending Stats by Domains","description":"Get account sending stats by domains. Use filters to get specific stats.","tags":["stats"],"parameters":[{"$ref":"#/components/parameters/account_id"},{"$ref":"#/components/parameters/StartDateQueryFilter"},{"$ref":"#/components/parameters/EndDateQueryFilter"},{"$ref":"#/components/parameters/SendingDomainIDsQueryFilter"},{"$ref":"#/components/parameters/SendingStreamsQueryFilter"},{"$ref":"#/components/parameters/CategoriesQueryFilter"},{"$ref":"#/components/parameters/ESPsQueryFilter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"sending_domain_id":{"type":"integer","format":"int64"},"stats":{"$ref":"#/components/schemas/SendingStats"}}}}}}},"400":{"description":"Bad request - invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/LIMIT_EXCEEDED"}}}}}}
```

## Get Sending Stats by Categories

> Get account sending stats by categories. Use filters to get specific stats.

```json
{"openapi":"3.1.0","info":{"title":"Email Sending","version":"2.0.0"},"tags":[{"name":"stats","description":"Email sending aggregated stats. The same you see in your Stats dashboard."}],"servers":[{"description":"Mailtrap account API (`mailtrap.io`) for sending domains, suppressions, stats, and email logs.\nError JSON matches other account endpoints (`error` or string `errors`), not the `send.api` / `bulk.api` sending shape (`success` + `errors` array).\n","url":"https://mailtrap.io"}],"security":[{"HeaderAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"HeaderAuth":{"type":"apiKey","description":"API token in Api-Token header","in":"header","name":"Api-Token"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication"}},"parameters":{"account_id":{"name":"account_id","in":"path","required":true,"description":"Account ID","schema":{"type":"integer"}},"StartDateQueryFilter":{"name":"start_date","description":"Start date for which to include the results.","in":"query","required":true,"schema":{"type":"string","format":"date"}},"EndDateQueryFilter":{"name":"end_date","description":"End date for which to include the results.","in":"query","required":true,"schema":{"type":"string","format":"date"}},"SendingDomainIDsQueryFilter":{"name":"sending_domain_ids[]","description":"IDs of the sending domains for which to include the results. If not provided, results for all sending domains will be included.","in":"query","schema":{"type":"array","items":{"type":"integer","format":"int64"}}},"SendingStreamsQueryFilter":{"name":"sending_streams[]","description":"Sending streams for which to include the results. If not provided, results for all sending streams will be included.","in":"query","schema":{"type":"array","items":{"type":"string","enum":["transactional","bulk"]}}},"CategoriesQueryFilter":{"name":"categories[]","description":"Categories for which to include the results. If not provided, results for all categories will be included.","in":"query","schema":{"type":"array","items":{"type":"string"}}},"ESPsQueryFilter":{"name":"email_service_providers[]","description":"Email service providers for which to include the results. If not provided, results for all ESPs will be included.","in":"query","schema":{"type":"array","items":{"type":"string","enum":["Google","Yahoo","Outlook","Hey","Google Workspace","Zoho Email","ProtonMail","Yandex","iCloud","Office 365","Amazon SES (Simple Email Service)","Proofpoint Email Protection","Mimecast Email Protection","GMX.net","Rackspace","OVH hosted","Linode hosted","GoDaddy","Symantec Email Protection","Barracuda Email Protection","Cisco Email Protection","FastMail","Naver","Seznam","Comcast","Spectrum"]}}}},"schemas":{"SendingStats":{"title":"SendingStats","type":"object","properties":{"delivery_count":{"type":"integer"},"delivery_rate":{"type":"number","format":"double"},"bounce_count":{"type":"integer"},"bounce_rate":{"type":"number","format":"double"},"open_count":{"type":"integer"},"open_rate":{"type":"number","format":"double"},"click_count":{"type":"integer"},"click_rate":{"type":"number","format":"double"},"spam_count":{"type":"integer"},"spam_rate":{"type":"number","format":"double"}}},"BadRequest":{"title":"BadRequestResponse","description":"Invalid parameters. Some endpoints return an empty body with HTTP 400; when present, a message may use an `error` field.\n","type":"object","properties":{"error":{"type":"string"}}},"UnauthenticatedResponse":{"title":"UnauthenticatedResponse","type":"object","properties":{"error":{"type":"string","description":"Error message"}}},"PermissionsDeniedResponse":{"title":"PermissionsDeniedResponse","type":"object","properties":{"errors":{"type":"string","description":"Error message"}}},"RateLimitExceededResponse":{"title":"RateLimitExceededResponse","type":"object","properties":{"errors":{"type":"string","description":"Error message"}}}},"responses":{"BAD_REQUEST":{"description":"Bad request - invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"Unauthorized":{"description":"Returns unauthorized error message. Check your credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"Forbidden":{"description":"Returns forbidden error message. Check your permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsDeniedResponse"}}}},"LIMIT_EXCEEDED":{"description":"Rate limit exceeded for the current account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceededResponse"}}}}}},"paths":{"/api/accounts/{account_id}/stats/categories":{"get":{"operationId":"getAccountSendingStatsByCategories","summary":"Get Sending Stats by Categories","description":"Get account sending stats by categories. Use filters to get specific stats.","tags":["stats"],"parameters":[{"$ref":"#/components/parameters/account_id"},{"$ref":"#/components/parameters/StartDateQueryFilter"},{"$ref":"#/components/parameters/EndDateQueryFilter"},{"$ref":"#/components/parameters/SendingDomainIDsQueryFilter"},{"$ref":"#/components/parameters/SendingStreamsQueryFilter"},{"$ref":"#/components/parameters/CategoriesQueryFilter"},{"$ref":"#/components/parameters/ESPsQueryFilter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"stats":{"$ref":"#/components/schemas/SendingStats"}}}}}}},"400":{"$ref":"#/components/responses/BAD_REQUEST"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/LIMIT_EXCEEDED"}}}}}}
```

## Get Sending Stats by Email Service Providers

> Get account sending stats by email service providers. Use filters to get specific stats.

```json
{"openapi":"3.1.0","info":{"title":"Email Sending","version":"2.0.0"},"tags":[{"name":"stats","description":"Email sending aggregated stats. The same you see in your Stats dashboard."}],"servers":[{"description":"Mailtrap account API (`mailtrap.io`) for sending domains, suppressions, stats, and email logs.\nError JSON matches other account endpoints (`error` or string `errors`), not the `send.api` / `bulk.api` sending shape (`success` + `errors` array).\n","url":"https://mailtrap.io"}],"security":[{"HeaderAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"HeaderAuth":{"type":"apiKey","description":"API token in Api-Token header","in":"header","name":"Api-Token"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication"}},"parameters":{"account_id":{"name":"account_id","in":"path","required":true,"description":"Account ID","schema":{"type":"integer"}},"StartDateQueryFilter":{"name":"start_date","description":"Start date for which to include the results.","in":"query","required":true,"schema":{"type":"string","format":"date"}},"EndDateQueryFilter":{"name":"end_date","description":"End date for which to include the results.","in":"query","required":true,"schema":{"type":"string","format":"date"}},"SendingDomainIDsQueryFilter":{"name":"sending_domain_ids[]","description":"IDs of the sending domains for which to include the results. If not provided, results for all sending domains will be included.","in":"query","schema":{"type":"array","items":{"type":"integer","format":"int64"}}},"SendingStreamsQueryFilter":{"name":"sending_streams[]","description":"Sending streams for which to include the results. If not provided, results for all sending streams will be included.","in":"query","schema":{"type":"array","items":{"type":"string","enum":["transactional","bulk"]}}},"CategoriesQueryFilter":{"name":"categories[]","description":"Categories for which to include the results. If not provided, results for all categories will be included.","in":"query","schema":{"type":"array","items":{"type":"string"}}},"ESPsQueryFilter":{"name":"email_service_providers[]","description":"Email service providers for which to include the results. If not provided, results for all ESPs will be included.","in":"query","schema":{"type":"array","items":{"type":"string","enum":["Google","Yahoo","Outlook","Hey","Google Workspace","Zoho Email","ProtonMail","Yandex","iCloud","Office 365","Amazon SES (Simple Email Service)","Proofpoint Email Protection","Mimecast Email Protection","GMX.net","Rackspace","OVH hosted","Linode hosted","GoDaddy","Symantec Email Protection","Barracuda Email Protection","Cisco Email Protection","FastMail","Naver","Seznam","Comcast","Spectrum"]}}}},"schemas":{"SendingStats":{"title":"SendingStats","type":"object","properties":{"delivery_count":{"type":"integer"},"delivery_rate":{"type":"number","format":"double"},"bounce_count":{"type":"integer"},"bounce_rate":{"type":"number","format":"double"},"open_count":{"type":"integer"},"open_rate":{"type":"number","format":"double"},"click_count":{"type":"integer"},"click_rate":{"type":"number","format":"double"},"spam_count":{"type":"integer"},"spam_rate":{"type":"number","format":"double"}}},"BadRequest":{"title":"BadRequestResponse","description":"Invalid parameters. Some endpoints return an empty body with HTTP 400; when present, a message may use an `error` field.\n","type":"object","properties":{"error":{"type":"string"}}},"UnauthenticatedResponse":{"title":"UnauthenticatedResponse","type":"object","properties":{"error":{"type":"string","description":"Error message"}}},"PermissionsDeniedResponse":{"title":"PermissionsDeniedResponse","type":"object","properties":{"errors":{"type":"string","description":"Error message"}}},"RateLimitExceededResponse":{"title":"RateLimitExceededResponse","type":"object","properties":{"errors":{"type":"string","description":"Error message"}}}},"responses":{"BAD_REQUEST":{"description":"Bad request - invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"Unauthorized":{"description":"Returns unauthorized error message. Check your credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"Forbidden":{"description":"Returns forbidden error message. Check your permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsDeniedResponse"}}}},"LIMIT_EXCEEDED":{"description":"Rate limit exceeded for the current account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceededResponse"}}}}}},"paths":{"/api/accounts/{account_id}/stats/email_service_providers":{"get":{"operationId":"getAccountSendingStatsByEmailServiceProviders","summary":"Get Sending Stats by Email Service Providers","description":"Get account sending stats by email service providers. Use filters to get specific stats.","tags":["stats"],"parameters":[{"$ref":"#/components/parameters/account_id"},{"$ref":"#/components/parameters/StartDateQueryFilter"},{"$ref":"#/components/parameters/EndDateQueryFilter"},{"$ref":"#/components/parameters/SendingDomainIDsQueryFilter"},{"$ref":"#/components/parameters/SendingStreamsQueryFilter"},{"$ref":"#/components/parameters/CategoriesQueryFilter"},{"$ref":"#/components/parameters/ESPsQueryFilter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"email_service_provider":{"type":"string"},"stats":{"$ref":"#/components/schemas/SendingStats"}}}}}}},"400":{"$ref":"#/components/responses/BAD_REQUEST"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/LIMIT_EXCEEDED"}}}}}}
```

## Get Sending Stats by Date

> Get account sending stats by date. Use filters to get specific stats.

```json
{"openapi":"3.1.0","info":{"title":"Email Sending","version":"2.0.0"},"tags":[{"name":"stats","description":"Email sending aggregated stats. The same you see in your Stats dashboard."}],"servers":[{"description":"Mailtrap account API (`mailtrap.io`) for sending domains, suppressions, stats, and email logs.\nError JSON matches other account endpoints (`error` or string `errors`), not the `send.api` / `bulk.api` sending shape (`success` + `errors` array).\n","url":"https://mailtrap.io"}],"security":[{"HeaderAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"HeaderAuth":{"type":"apiKey","description":"API token in Api-Token header","in":"header","name":"Api-Token"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication"}},"parameters":{"account_id":{"name":"account_id","in":"path","required":true,"description":"Account ID","schema":{"type":"integer"}},"StartDateQueryFilter":{"name":"start_date","description":"Start date for which to include the results.","in":"query","required":true,"schema":{"type":"string","format":"date"}},"EndDateQueryFilter":{"name":"end_date","description":"End date for which to include the results.","in":"query","required":true,"schema":{"type":"string","format":"date"}},"SendingDomainIDsQueryFilter":{"name":"sending_domain_ids[]","description":"IDs of the sending domains for which to include the results. If not provided, results for all sending domains will be included.","in":"query","schema":{"type":"array","items":{"type":"integer","format":"int64"}}},"SendingStreamsQueryFilter":{"name":"sending_streams[]","description":"Sending streams for which to include the results. If not provided, results for all sending streams will be included.","in":"query","schema":{"type":"array","items":{"type":"string","enum":["transactional","bulk"]}}},"CategoriesQueryFilter":{"name":"categories[]","description":"Categories for which to include the results. If not provided, results for all categories will be included.","in":"query","schema":{"type":"array","items":{"type":"string"}}},"ESPsQueryFilter":{"name":"email_service_providers[]","description":"Email service providers for which to include the results. If not provided, results for all ESPs will be included.","in":"query","schema":{"type":"array","items":{"type":"string","enum":["Google","Yahoo","Outlook","Hey","Google Workspace","Zoho Email","ProtonMail","Yandex","iCloud","Office 365","Amazon SES (Simple Email Service)","Proofpoint Email Protection","Mimecast Email Protection","GMX.net","Rackspace","OVH hosted","Linode hosted","GoDaddy","Symantec Email Protection","Barracuda Email Protection","Cisco Email Protection","FastMail","Naver","Seznam","Comcast","Spectrum"]}}}},"schemas":{"SendingStats":{"title":"SendingStats","type":"object","properties":{"delivery_count":{"type":"integer"},"delivery_rate":{"type":"number","format":"double"},"bounce_count":{"type":"integer"},"bounce_rate":{"type":"number","format":"double"},"open_count":{"type":"integer"},"open_rate":{"type":"number","format":"double"},"click_count":{"type":"integer"},"click_rate":{"type":"number","format":"double"},"spam_count":{"type":"integer"},"spam_rate":{"type":"number","format":"double"}}},"BadRequest":{"title":"BadRequestResponse","description":"Invalid parameters. Some endpoints return an empty body with HTTP 400; when present, a message may use an `error` field.\n","type":"object","properties":{"error":{"type":"string"}}},"UnauthenticatedResponse":{"title":"UnauthenticatedResponse","type":"object","properties":{"error":{"type":"string","description":"Error message"}}},"PermissionsDeniedResponse":{"title":"PermissionsDeniedResponse","type":"object","properties":{"errors":{"type":"string","description":"Error message"}}},"RateLimitExceededResponse":{"title":"RateLimitExceededResponse","type":"object","properties":{"errors":{"type":"string","description":"Error message"}}}},"responses":{"BAD_REQUEST":{"description":"Bad request - invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"Unauthorized":{"description":"Returns unauthorized error message. Check your credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"Forbidden":{"description":"Returns forbidden error message. Check your permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsDeniedResponse"}}}},"LIMIT_EXCEEDED":{"description":"Rate limit exceeded for the current account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceededResponse"}}}}}},"paths":{"/api/accounts/{account_id}/stats/date":{"get":{"operationId":"getAccountSendingStatsByDate","summary":"Get Sending Stats by Date","description":"Get account sending stats by date. Use filters to get specific stats.","tags":["stats"],"parameters":[{"$ref":"#/components/parameters/account_id"},{"$ref":"#/components/parameters/StartDateQueryFilter"},{"$ref":"#/components/parameters/EndDateQueryFilter"},{"$ref":"#/components/parameters/SendingDomainIDsQueryFilter"},{"$ref":"#/components/parameters/SendingStreamsQueryFilter"},{"$ref":"#/components/parameters/CategoriesQueryFilter"},{"$ref":"#/components/parameters/ESPsQueryFilter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"stats":{"$ref":"#/components/schemas/SendingStats"}}}}}}},"400":{"$ref":"#/components/responses/BAD_REQUEST"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/LIMIT_EXCEEDED"}}}}}}
```


---

# 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://docs.mailtrap.io/developers/email-sending/stats.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.
