# deleteWorkflow

Delete a workflow (the UI's "Delete"): archives the group, pauses any active version and PERMANENTLY stops its in-flight runs; everyone mid-sequence drops out and restoring the workflow does not bring them back. Confirm with the user first. The re-queried group shows archivedAt. restoreWorkflow undoes the archive (the workflow comes back paused).

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

## Variables

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

## Response (data, an example)

```json
{
  "workflowAutomationsMutation": {
    "softDeleteWorkflowGroup": {
      "workflowGroup": {
        "id": "<ID>",
        "status": "DRAFT",
        "archivedAt": "2026-01-01T00:00:00.000Z"
      }
    }
  }
}
```

## 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": "deleteWorkflow",
    "variables": {
      "workflowGroupId": "<workflowGroupId>"
    }
  }'
```
