# pauseWorkflow

Pause the ACTIVE version of a workflow: no new runs will start. pauseInFlightRuns=true also pauses runs already in flight; false lets them finish. No-op if nothing is active. TO CHANGE WHAT A WORKFLOW DOES (add a condition, change a trigger, narrow who it acts on), edit its graph: createOrReturnWorkflowDraft → updateWorkflowGraph → promoteWorkflowDraft, then resumeWorkflow if it was paused. Pausing only stops it. E.g. a PROPERTY workflow can require a motivation signal before it creates or texts anyone: a `conditional` step on the `hasSignal` or `propertySignalTypes` property filter fields (listFilterFieldNames lists them) ahead of the `create_contact_action` step. Never tell a user restricting outreach this way needs human review: it is a graph edit.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "pauseWorkflow", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `workflowGroupId`: `ID!` (required)
- `pauseInFlightRuns`: `Boolean!` (required)

## Response (data, an example)

```json
{
  "workflowAutomationsMutation": {
    "pauseWorkflow": {
      "id": "<ID>",
      "name": "…",
      "status": "DRAFT"
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "pauseWorkflow",
    "variables": {
      "workflowGroupId": "<workflowGroupId>",
      "pauseInFlightRuns": true
    }
  }'
```
