# getWorkflowVersionStats

Performance summary for one VERSION (by workflowAutomationId, from getWorkflow.versions), the shape of getWorkflowStats: compare a new version against the one it replaced. Also `sendingCapacity`: how many of its runs are queued behind sending capacity now (`queuedRuns`), the soonest `nextAttemptAt` and the main `reason` (DAILY_CAP | SEND_WINDOW | WINDOW_LIMIT | OUT_OF_SMS_CREDITS); null when nothing is queued. It tells a workflow that is PACING from one that has stopped.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "getWorkflowVersionStats", "variables": {...} }`
- Scope: `READ`
- Type: query
- Idempotency: a read; rejects `Idempotency-Key`
- Rate-limited: no

## Variables

- `workflowAutomationId`: `ID!` (required)

## Response (data, an example)

```json
{
  "workflowAutomationsQuery": {
    "workflowAutomation": {
      "id": "<ID>",
      "name": "…",
      "status": "DRAFT",
      "stats": {
        "totalRuns": 0,
        "activeRuns": 0,
        "completedRuns": 0,
        "pausedRuns": 0,
        "stoppedRuns": 0,
        "failedRuns": 0,
        "messagesSent": 0,
        "sentEmailCount": 0,
        "sentTextCount": 0,
        "bouncedEmailCount": 0,
        "failedTextCount": 0,
        "replyRate": 0,
        "bounceRate": 0,
        "positiveReplyRate": 0,
        "negativeReplyRate": 0,
        "positiveReplyCount": 0,
        "negativeReplyCount": 0,
        "genuineReplyCount": 0,
        "optOutReplyCount": 0,
        "unreachableReplyCount": 0
      },
      "sendingCapacity": {
        "queuedRuns": 0,
        "nextAttemptAt": "2026-01-01T00:00:00.000Z",
        "reason": "DAILY_CAP"
      }
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "getWorkflowVersionStats",
    "variables": {
      "workflowAutomationId": "<workflowAutomationId>"
    }
  }'
```
