> For the complete documentation index, see [llms.txt](https://docs.mdintegrations.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mdintegrations.com/partner-api-reference/cases/case-status/get-count-cases-by-status.md).

# Get count cases by status

Returns a count of cases per status (assigned, waiting, processing, approved, support, and created) for the partner, using the same clinician, tag, state, case type, and sync filters as the case listing endpoint.

```json
{"openapi":"3.1.0","info":{"title":"MD Integrations","version":"1.0.0"},"tags":[{"name":"Cases/Case Status"}],"servers":[{"url":"https://api.mdintegrations.dev/v1","description":"Development"}],"security":[{"oauth2":[]}],"components":{"securitySchemes":{"oauth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.mdintegrations.dev/v1/partner/auth/token","scopes":{"*":"Full partner account access"}}}}},"schemas":{"GetCaseCountByStatusRequest":{"type":"object","properties":{"is_assigned_to_me":{"type":["boolean","null"]},"case_type":{"type":["string","null"]},"is_sync":{"type":["boolean","null"]},"is_live":{"type":["boolean","null"]},"is_sandbox":{"type":["boolean","null"]},"partners":{"type":["array","null"],"items":{"type":["string","null"],"format":"uuid"}},"clinicians":{"type":["array","null"],"items":{"type":["string","null"],"format":"uuid"}},"tags":{"type":["array","null"],"items":{"type":["string","null"],"format":"uuid"}},"states":{"type":["array","null"],"items":{"type":["string","null"],"format":"uuid"}}},"title":"GetCaseCountByStatusRequest"}},"responses":{"AuthorizationException":{"description":"Authorization error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ValidationException":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Errors overview."},"errors":{"type":"object","description":"A detailed description of each field that failed validation.","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["message","errors"]}}}}}},"paths":{"/partner/statistics/count/cases-by-status":{"post":{"operationId":"v1.partners-app.statistics.count.cases-by-status.post","description":"Returns a count of cases per status (assigned, waiting, processing, approved, support, and\ncreated) for the partner, using the same clinician, tag, state, case type, and sync filters as the\ncase listing endpoint.","summary":"Get count cases by status","tags":["Cases/Case Status"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCaseCountByStatusRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"assigned":{"type":"integer"},"waiting":{"type":"integer"},"processing":{"type":"integer"},"approved":{"type":"integer"},"support":{"type":"integer"},"created":{"type":"integer"},"pinned_to_me":{"type":"integer"}},"required":["assigned","waiting","processing","approved","support","created"]}}}},"403":{"$ref":"#/components/responses/AuthorizationException"},"422":{"$ref":"#/components/responses/ValidationException"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.mdintegrations.com/partner-api-reference/cases/case-status/get-count-cases-by-status.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
