# updateWorkflowSendWindow

Set the workflow's SENDING SCHEDULE, the hours its messages may go out. It belongs to the workflow (group id), not a version, so it applies to the LIVE workflow at once: every run reads it on its next send, whichever version it started on, with no draft or promote. A run already waiting for the old schedule's next opening keeps that wait and re-checks when it wakes. `sendWindow` is {timezone, days:[{day:"MON".."SUN", intervals:[{start:{hour,minute}, end:{hour,minute}}]}], timezoneMode?}, with the rules updateWorkflowGraph gives under SEND WINDOW; an absent day is CLOSED, and a window naming no days or hours is refused. null clears it to the platform default (Mon-Fri 09:00-19:00 org time). Read it from getWorkflow.sendWindow. The ONLY way to change it: updateWorkflowGraph refuses a graph carrying a different one.

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

## Variables

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

## Response (data, an example)

```json
{
  "workflowAutomationsMutation": {
    "updateWorkflowGroupSendWindow": {
      "id": "<ID>",
      "name": "…"
    }
  }
}
```

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