# createTaskOnDeal

Create a to-do task on a deal with no contact: pipeline work that belongs to the deal (order the title search, chase the inspection report). dealId from findDeals/getDeal. createTaskOnContact's rules apply: timezone is the zone the due day is read in, participants (getMyProfile/listTeammates) put it in a real queue (none = unassigned, invisible to listMyTasks), and a multi-step checklist is one call per step with staggered due dates. The response echoes the deal's full task list; getDeal `tasks` reads it too (never listContactTasks). Edit or delete it with updateTaskOnDeal / deleteTaskOnDeal. From a chat, a deal holding an open task refuses the create and names it: ask whether to move that one or add another, then resend with alongsideOpenTasks: true. Confirm with the user before creating tasks for them.

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

## Variables

- `dealId`: `ID!` (required)
- `title`: `String!` (required)
- `dueDate`: `DateTime!` (required)
- `timezone`: `Timezone!` (required, 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.
- `description`: `String`
- `taskType`: `String`
- `participants`: `[String!]`
- `alongsideOpenTasks`: `Boolean`

## Response (data, an example)

```json
{
  "tasksMutation": {
    "createTaskOnDeal": {
      "id": "<ID>",
      "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": "createTaskOnDeal",
    "variables": {
      "dealId": "<dealId>",
      "title": "<String>",
      "dueDate": "2026-01-01T00:00:00.000Z",
      "timezone": "IDLW"
    }
  }'
```
