# Get Usage by Workflow

Find out which workflows use the most tasks, highest first, and how embedded usage splits across [installations](/docs/embedded/getting-started/mindcloud-embedded-overview#installation).

`GET https://connect.mindcloud.co/v2/usage/workflows`

Permissions: `subscription:view`.

## Parameters

### Headers

- `X-Company-Id` (string): Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. A key can also act in its child organizations, and, with "Use this key across all of your organizations" on, in every organization its creator can open in the app. List them with GET /v2/companies. Every response's X-Company-Id header names the organization it acted in. See [Organizations](https://mindcloud.co/docs/api/rest/introduction/organizations).

### Query

- `from` (string): First day of the window (YYYY-MM-DD). Defaults to 29 days before "to".
- `to` (string): Last day of the window (YYYY-MM-DD). Defaults to today. Windows are capped at 45 days.

## Example request

```bash
curl --request GET \
  --url 'https://connect.mindcloud.co/v2/usage/workflows?from=2026-07-01&to=2026-07-23' \
  --header 'Authorization: Bearer $MINDCLOUD_API_TOKEN'
```

## Response fields

- `workflowId` (string): The workflow.
- `name` (string): Its name.
- `tasks` (number): Tasks it used in the window.
- `installations` (array of objects): Embedded usage per installation, highest first: installationId, name (the installation label), integrationId, integrationName, and tasks. Empty for workflows that did not run under an installation. Installation tasks add up to at most the workflow tasks; the remainder ran outside an installation or before meta.installationsFrom, the first day with installation detail.
  - `installationId` (string): The installation.
  - `name` (string): The installation label: the integration label template when one is set, otherwise "email - name" of the end user, otherwise the raw id.
  - `integrationId` (string): The embedded integration the installation belongs to.
  - `integrationName` (string): That integration's name.
  - `tasks` (number): Tasks the installation used in the window.

## Example response

```json
{
  "success": true,
  "data": [
    {
      "workflowId": "Wq3kZ8pLx2Nb",
      "name": "TikTok Orders",
      "tasks": 12400,
      "installations": [
        {
          "installationId": "install_Q8dL2vN6tRwe",
          "name": "WH1 - ACME - acme-store",
          "integrationId": "int_T4kP9wQ2mLz8",
          "integrationName": "TikTok Integration",
          "tasks": 9100
        },
        {
          "installationId": "install_M3pZ7kH1yUxa",
          "name": "WH2 - BETA - beta-store",
          "integrationId": "int_T4kP9wQ2mLz8",
          "integrationName": "TikTok Integration",
          "tasks": 3300
        }
      ]
    },
    {
      "workflowId": "Hn7tR2vKc9Ds",
      "name": "Nightly Invoice Export",
      "tasks": 800,
      "installations": []
    }
  ],
  "meta": {
    "from": "2026-08-10",
    "to": "2026-09-08",
    "installationsFrom": "2026-08-04"
  }
}
```
