# duplicateWorkflow

Duplicate a workflow into a fresh group with the given name, as a paused/draft copy that never starts by itself. The copy inherits `systemCategory`, so a duplicated "PROPERTY_SIGNAL_SKIP_TRACE" workflow is another one of those. Two are REFUSED: "APPOINTMENT_REMINDER" (a copy would fire for the source reminder's appointments; create a new one with createAppointmentReminder) and "INTEGRATION_LEAD_HANDLING" (one per integration, and a copy binds to nothing; set it up from Integrations).

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

## Variables

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

## Response (data, an example)

```json
{
  "workflowAutomationsMutation": {
    "duplicateWorkflowGroup": {
      "id": "<ID>",
      "name": "…",
      "status": "DRAFT",
      "channels": [
        "TEXT"
      ],
      "workflowDomain": "PROPERTY"
    }
  }
}
```

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