# updateTask

Fix an existing task by taskId + its linked contactId (from listMyTasks or listContactTasks): title, description, taskType, dueDate (ISO, with timezone), timezone, or participants (teammate userIds from listTeammates). PATCH: only the fields you pass change; participants REPLACES the whole assignee list. UNDO: Task keeps no history, but every edit on a contact-linked task writes an UPDATED_TASK entry with oldValues to the contact's timeline (listContactActivities; one per edit, the oldest holds the original): read it and write the old value back; never call a value unrecoverable without looking. WHOSE TASK: empty participants = UNASSIGNED, nobody's; a NON-EMPTY list that does not include the key owner is a TEAMMATE's task: an admin key may write it, but say whose first; a queue read is never proof a task is the reader's. The tool for 'push that follow-up to Friday': reschedule in place; many tasks to one date is rescheduleTasks. contactId IDENTIFIES the task's existing contact, it does NOT move it: any other is rejected, and nothing here re-links a task. Delete-then-recreate is NOT a move (it loses completedAt, the outcome, the created date and every notification and automation link) so say the task can't be moved, and rebuild it only if they ask after hearing that. To tick a task off use completeTask. A task with no contact: updateTaskOnDeal.

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

## Variables

- `taskId`: `String!` (required)
- `contactId`: `String!` (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": {
    "updateTaskOnContact": {
      "id": "<ID>",
      "name": "…",
      "tasks": [
        {
          "id": "<ID>",
          "title": "…",
          "description": "…",
          "taskType": "…",
          "dueDate": "2026-01-01T00:00:00.000Z",
          "timezone": "IDLW",
          "completedAt": "2026-01-01T00:00:00.000Z",
          "participants": [
            {
              "id": "<ID>",
              "firstName": "…",
              "lastName": "…"
            }
          ]
        }
      ]
    }
  }
}
```

## 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": "updateTask",
    "variables": {
      "taskId": "<String>",
      "contactId": "<String>"
    }
  }'
```
