# updateTaskOnDeal

updateTask ONLY for a row whose contact is null, by taskId + its dealId (listMyTasks `deals`); one with a contact is refused (use updateTask), an appointment too, and for a non-admin key one it is not on. Same fields and rules; no timeline keeps old values: note them first to undo.

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

## Variables

- `taskId`: `ID!` (required)
- `dealId`: `ID!` (required)
- `title`: `String`
- `description`: `String`
- `taskType`: `String`
- `dueDate`: `DateTime`
- `timezone`: `Timezone` (one of `IDLW`, `SST`, `HST`, `AKST`, `PST`, `MST`, `AZ`, `CST`, `EST`, `AST`, `BRT`, `FNT`, `AZOT`, `UTC`, `CET`, `EET`, `MSK`, `GST`, `PKT`, `BST`, `ICT`, `JST`, `AEST`, `NCT`, `NZST`). AZ: Arizona: MST all year, no DST.
- `participants`: `[String!]`

## Response (data, an example)

```json
{
  "tasksMutation": {
    "updateTaskOnDeal": {
      "id": "<ID>",
      "tasks": [
        {
          "id": "<ID>",
          "title": "…",
          "dueDate": "2026-01-01T00:00:00.000Z",
          "completedAt": "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": "updateTaskOnDeal",
    "variables": {
      "taskId": "<taskId>",
      "dealId": "<dealId>"
    }
  }'
```
