# triggerWorkflowRun

Manually start one run of a workflow's ACTIVE version against a record. recordId must match the workflow's domain: a contactId for CONTACT workflows, propertyId for PROPERTY, dealId for DEAL, taskId for APPOINTMENT.

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

## Variables

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

## Response (data, an example)

```json
{
  "workflowAutomationsMutation": {
    "triggerWorkflowRun": {
      "id": "<ID>",
      "status": "PENDING",
      "dryRun": true,
      "createdAt": "2026-01-01T00:00:00.000Z",
      "scheduledExecution": "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": "triggerWorkflowRun",
    "variables": {
      "workflowGroupId": "<workflowGroupId>",
      "recordId": "<recordId>"
    }
  }'
```
