Retrieve the open cases your reporting agent can access using the REST API or an authorized MCP connection.
Use POST https://api.supportbench.net/cases to build a recurring report of the open cases visible to your reporting agent. The token identifies the Supportbench account. If you need one customer company within that account, add its Supportbench company ID to the companies filter.
Authenticate the reporting job
Ask a Supportbench administrator to create an API token for an agent with access to the cases the report needs. Have the administrator put the token directly into your approved secret store. Configure the job to read it at runtime and send it in the Authorization: Bearer <token> header. Keep the token out of email and logs. Create and manage API tokens.
Request the first page
This Bash example assumes your secret store supplies the SUPPORTBENCH_API_TOKEN environment variable.
curl --fail --silent --show-error 'https://api.supportbench.net/cases' \
--header "Authorization: Bearer ${SUPPORTBENCH_API_TOKEN}" \
--header 'Content-Type: application/json' \
--data '{"include_trashed":false,"page_number":0,"page_size":250}'Omit status_id to read across all case states. On each page, keep records whose numeric status_id is greater than zero. A specific positive status_id in the request selects only that one state and would miss cases in other open states. The example excludes the Trash queue. For the complete list of filters and response fields, see Return Cases.
Read every page
The response is a JSON array. This redacted example shows selected fields from one open case. The ID and state label are illustrative.
[
{
"id": "C-1042",
"subject": "[redacted]",
"status_id": 1,
"status": "Active",
"owner": "[redacted]"
}
]- Start with
page_number: 0. After each successful request, count the records in the original array, before filtering for open cases. - If the array contains 250 records, request the next page by increasing
page_numberby one. Keep the filters and page size the same. A full page of closed cases can still be followed by open cases. - Stop after a page with fewer than 250 records, including an empty array. Deduplicate the retained cases by
id. - For a recurring full report, repeat from page zero on each run and replace the previous report only after all pages succeed. Cases can change while you are paging. To verify the setup, check that a known open case visible to the reporting agent appears and a known closed case is absent.
Retrieve open cases through MCP
An authorized Supportbench MCP connection can also retrieve open-case data. For example, ask your connected client: “List all open cases I can access. Include the case ID, subject, state and owner. Continue through every page.” The read-only list_cases tool accepts status: "open" and starts at page: 1. To report on a single customer company, include its name or ID in the request. Connect an AI client to Supportbench.

