# Update A Task Or Subtask

PATCH https://services.leadconnectorhq.com/projects/tasks/{taskId}

Updates a task or subtask by id (title, TipTap `body`, status, dates, assignees, priority, `parentTaskId`, custom fields, etc.). Response is `{ "task": { … } }` without embedded `subtasks`.

## Authentication

Send `Authorization: Bearer <token>` using:

- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `projects/tasks.write`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

### Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `taskId` | string | Yes | Task id |

### Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `locationId` | string | No | Location id. **Required for `channel: APP`.** Ignored for OAuth/PIT — those use the location on the auth token. Do not send in path, body, or headers. |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "HighLevel API",
    "version": "2023-02-21"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/projects/tasks/{taskId}": {
      "patch": {
        "summary": "Update A Task Or Subtask",
        "operationId": "updateATaskOrSubtask",
        "description": "Updates a task or subtask by id (title, TipTap `body`, status, dates, assignees, priority, `parentTaskId`, custom fields, etc.). Response is `{ \"task\": { … } }` without embedded `subtasks`.",
        "parameters": [
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2023-02-21"
              ]
            }
          },
          {
            "name": "taskId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string",
              "example": "6a102435124ecfb348bd5509",
              "description": "Task id"
            },
            "description": "Task id"
          },
          {
            "name": "locationId",
            "required": false,
            "in": "query",
            "description": "Location id. **Required for `channel: APP`.** Ignored for OAuth/PIT — those use the location on the auth token. Do not send in path, body, or headers.",
            "schema": {
              "example": "ve9EPM428h8b87FE9C12Kg",
              "type": "string",
              "description": "Location id. Required for APP channel (`?locationId=`). Ignored for OAuth/PIT (token location is used). Do not send in path, body, or headers."
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectsUpdateTaskBodyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectsTaskResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectsErrorResponseDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectsErrorResponseDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — missing scope or no access to this space, folder, list, or task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectsErrorResponseDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found — space, folder, list, task, comment, or recurring task missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectsErrorResponseDto"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectsErrorResponseDto"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectsErrorResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": [
              "projects/tasks.write"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "ProjectsUpdateTaskBodyDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Task title",
            "example": "Updated title"
          },
          "dueDate": {
            "type": "string",
            "description": "Due date in ISO 8601 format or Unix timestamp",
            "example": "2026-09-20T12:00:00.000Z"
          },
          "body": {
            "type": "string",
            "description": "Task body as TipTap HTML or TipTap JSON string (same field as comment `body`). See [TipTap documentation](https://tiptap.dev/docs/editor/introduction). Sanitised server-side to a published HTML allowlist (basic formatting + links). Max 32,000 characters.",
            "maxLength": 32000,
            "example": "<p>Updated notes</p>"
          },
          "startDate": {
            "type": "string",
            "description": "Start date",
            "example": "2026-09-20T10:00:00.000Z"
          },
          "status": {
            "type": "string",
            "description": "Status key from the list effective workflow. Do not send statusGroup.",
            "example": "to_do"
          },
          "priority": {
            "type": "number",
            "description": "Priority level. Allowed: `1` (highest), `2`, `3`, `4` (lowest).",
            "enum": [
              1,
              2,
              3,
              4
            ],
            "example": 2,
            "minimum": 1,
            "maximum": 4
          },
          "parentTaskId": {
            "type": "string",
            "description": "Parent task id when this task should become a subtask. Do not send this task’s own id.",
            "example": "6a102435124ecfb348bd5520"
          },
          "assignees": {
            "description": "Assignee user IDs. Only one assignee is supported today — send a single-element array (extra ids are rejected with 422).",
            "maxItems": 1,
            "example": [
              "user_1"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "contactId": {
            "type": "string",
            "description": "Linked contact id",
            "example": "sx6wyHhbFdRXh302Lunr"
          },
          "businessId": {
            "type": "string",
            "description": "Linked business id",
            "example": "8fK3mN2pQ7rT1vW9xY4z"
          },
          "customFields": {
            "type": "object",
            "description": "Location-defined custom field values keyed by the task field key (without the `task.` prefix). Discover keys via the Custom Fields API (`objectKey: \"task\"`). Example: definition `task.project_phase` → `{ \"project_phase\": \"discovery\" }`.",
            "additionalProperties": {
              "description": "Value for one custom field. Type depends on the field definition (string, number, boolean, array, or null).",
              "oneOf": [
                {
                  "type": "string",
                  "nullable": true,
                  "example": "discovery"
                },
                {
                  "type": "number",
                  "example": 42
                },
                {
                  "type": "boolean",
                  "example": true
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "example": [
                    "option_a"
                  ]
                }
              ]
            },
            "example": {
              "connections": 42,
              "project_phase": "discovery"
            }
          }
        },
        "title": "ProjectsUpdateTaskBodyDto"
      },
      "ProjectsTaskResponseDto": {
        "type": "object",
        "description": "Single task fetch/create/update response",
        "required": [
          "task"
        ],
        "properties": {
          "task": {
            "description": "Task",
            "allOf": [
              {
                "type": "object",
                "description": "Public task record. Assignees are `assignees` (never CO `owners`). Priority is `properties.priority` 1–4 (never `priorityN`). Location custom-field values appear as extra keys under `properties`. `graph` and `listPositions` are not returned — use Get Lists For A Task and `properties.primaryListId` for membership.",
                "required": [
                  "id",
                  "properties"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Task id",
                    "example": "6a102435124ecfb348bd5509"
                  },
                  "locationId": {
                    "type": "string",
                    "description": "Location id",
                    "example": "ve9EPM428h8b87FE9C12Kg"
                  },
                  "objectKey": {
                    "type": "string",
                    "description": "Always `task` for Project Management tasks when present. Optional for forward compatibility. Allowed: `task`.",
                    "enum": [
                      "task"
                    ],
                    "example": "task"
                  },
                  "assignees": {
                    "type": "array",
                    "description": "Assignee user ids (same values accepted on create/update as `assignees`)",
                    "items": {
                      "type": "string"
                    },
                    "example": [
                      "user_1"
                    ]
                  },
                  "parentName": {
                    "type": "string",
                    "description": "Parent task title. Populated only by Search Tasks with `subtaskViewMode=separate`. Not returned by Get Task By ID, Get Tasks, or Fetch Tasks By IDs.",
                    "example": "Parent task"
                  },
                  "createdAt": {
                    "type": "string",
                    "description": "When the task was created (ISO-8601)",
                    "example": "2026-09-20T10:00:00.000Z"
                  },
                  "updatedAt": {
                    "type": "string",
                    "description": "When the task was last updated (ISO-8601). Use as a Search filter (`gte`) and sort field for incremental sync.",
                    "example": "2026-09-21T12:00:00.000Z"
                  },
                  "createdBy": {
                    "type": "object",
                    "description": "Who created the task",
                    "properties": {
                      "sourceId": {
                        "type": "string",
                        "description": "User or resource id",
                        "example": "user_1"
                      },
                      "source": {
                        "type": "string",
                        "description": "Creation source. Common values: `PUBLIC_API`, `USER`.",
                        "example": "PUBLIC_API"
                      },
                      "channel": {
                        "type": "string",
                        "description": "Creation channel. Common values: `OAUTH`, `APP`, `IST`.",
                        "example": "OAUTH"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "Stamp time (ISO-8601)",
                        "example": "2026-09-20T10:00:00.000Z"
                      }
                    },
                    "example": {
                      "sourceId": "user_1",
                      "source": "PUBLIC_API",
                      "channel": "OAUTH",
                      "createdAt": "2026-09-20T10:00:00.000Z"
                    }
                  },
                  "subtasks": {
                    "type": "array",
                    "description": "Embedded child tasks — **Search Tasks only**, when `subtaskViewMode=expanded`. Never returned by Get Task, Create Task, Update Task, Get Tasks (list), or Fetch Tasks By IDs.",
                    "items": "circular(ProjectsTaskRecordDto)",
                    "example": [
                      {
                        "id": "6a102435124ecfb348bd5510",
                        "locationId": "ve9EPM428h8b87FE9C12Kg",
                        "objectKey": "task",
                        "assignees": [
                          "user_1"
                        ],
                        "properties": {
                          "title": "Call notes",
                          "status": "to_do",
                          "dueDate": "2026-09-20T17:00:00.000Z",
                          "priority": 3,
                          "primaryListId": "6a102435124ecfb348bd5507",
                          "parentTaskId": "6a102435124ecfb348bd5509"
                        }
                      }
                    ]
                  },
                  "properties": {
                    "type": "object",
                    "description": "Task fields plus location custom-field values as extra keys (no `task.` prefix). Reserved keys, do not use these names for custom fields: `title`, `body`, `status`, `statusGroup`, `dueDate`, `startDate`, `priority`, `primaryListId`, `parentTaskId`, `contactId`, `businessId`. `statusGroup` is read-only.",
                    "required": [
                      "title"
                    ],
                    "properties": {
                      "title": {
                        "type": "string",
                        "description": "Task title",
                        "example": "Follow up with client"
                      },
                      "body": {
                        "type": "string",
                        "description": "Task body as TipTap HTML or TipTap JSON (same field as comment `body`). See [TipTap documentation](https://tiptap.dev/docs/editor/introduction).",
                        "example": "<p>Call the client about renewal</p>"
                      },
                      "status": {
                        "type": "string",
                        "description": "Status **key** from the space workflow (not the label). Location-defined — discover via Get Statuses or Get List Statuses.",
                        "example": "to_do"
                      },
                      "statusGroup": {
                        "type": "string",
                        "description": "Server-derived group key for `status`. Read-only — do not send on create or update. A task is complete when this is `done`.",
                        "example": "to_do"
                      },
                      "dueDate": {
                        "type": "string",
                        "description": "Due date (ISO-8601)",
                        "example": "2026-09-20T17:00:00.000Z"
                      },
                      "startDate": {
                        "type": "string",
                        "description": "Start date (ISO-8601)",
                        "example": "2026-09-20T10:00:00.000Z"
                      },
                      "priority": {
                        "type": "number",
                        "description": "Priority level. Allowed: `1` (highest), `2`, `3`, `4` (lowest).",
                        "enum": [
                          1,
                          2,
                          3,
                          4
                        ],
                        "example": 2
                      },
                      "primaryListId": {
                        "type": "string",
                        "description": "Home list id",
                        "example": "6a102435124ecfb348bd5507"
                      },
                      "parentTaskId": {
                        "type": "string",
                        "description": "Parent task id when this task is a subtask. This is the field to read.",
                        "example": "6a102435124ecfb348bd5508"
                      },
                      "contactId": {
                        "type": "string",
                        "description": "Linked contact id",
                        "example": "sx6wyHhbFdRXh302Lunr"
                      },
                      "businessId": {
                        "type": "string",
                        "description": "Linked business id",
                        "example": "biz_1"
                      }
                    },
                    "additionalProperties": {
                      "description": "Value for one custom field. Type depends on the field definition (string, number, boolean, array, or null). Discover keys via the Custom Fields API with `objectKey: \"task\"`.",
                      "oneOf": [
                        {
                          "type": "string",
                          "nullable": true,
                          "example": "discovery"
                        },
                        {
                          "type": "number",
                          "example": 42
                        },
                        {
                          "type": "boolean",
                          "example": true
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "example": [
                            "option_a"
                          ]
                        }
                      ]
                    },
                    "example": {
                      "title": "Follow up with client",
                      "status": "to_do",
                      "dueDate": "2026-09-20T17:00:00.000Z",
                      "priority": 2,
                      "primaryListId": "6a102435124ecfb348bd5507",
                      "project_phase": "discovery"
                    }
                  }
                },
                "title": "ProjectsTaskRecordDto"
              }
            ],
            "example": {
              "id": "6a102435124ecfb348bd5509",
              "locationId": "ve9EPM428h8b87FE9C12Kg",
              "objectKey": "task",
              "assignees": [
                "user_1"
              ],
              "properties": {
                "title": "Follow up with client",
                "status": "to_do",
                "dueDate": "2026-09-20T17:00:00.000Z",
                "priority": 2,
                "primaryListId": "6a102435124ecfb348bd5507"
              }
            }
          }
        },
        "title": "ProjectsTaskResponseDto"
      },
      "ProjectsErrorResponseDto": {
        "type": "object",
        "description": "Error payload for non-2xx responses. Same shape on every Projects operation.\n\n`message` is a string, or a string array for validation failures.\n\n`error` is usually the HTTP reason phrase (`Bad Request`, `Unprocessable Entity`, …). Known domain values include `graph_scope_invalid` (Search list-scope failures).\n\nWhen `error` is `graph_scope_invalid`, `reason` discriminates the failure: `too_many_ids` | `non_list_type` | `duplicate_graph_scope`.",
        "required": [
          "statusCode",
          "message"
        ],
        "properties": {
          "statusCode": {
            "type": "number",
            "description": "HTTP status code",
            "example": 422
          },
          "message": {
            "description": "Human-readable message, or a list of validation messages",
            "oneOf": [
              {
                "type": "string",
                "example": "Task is already in the destination list"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "example": [
                  "dueDate must be a string"
                ]
              }
            ],
            "example": null
          },
          "error": {
            "type": "string",
            "description": "HTTP reason phrase or domain code when present. Domain codes seen today: `graph_scope_invalid`. Otherwise Nest’s reason phrase.",
            "example": "graph_scope_invalid"
          },
          "reason": {
            "type": "string",
            "description": "Present when `error` is `graph_scope_invalid`. Discriminates Search list-scope failures. Allowed: `too_many_ids`, `non_list_type`, `duplicate_graph_scope`.",
            "enum": [
              "too_many_ids",
              "non_list_type",
              "duplicate_graph_scope"
            ],
            "example": "too_many_ids"
          }
        },
        "example": {
          "statusCode": 422,
          "message": "graph.id scope may not exceed 10 list IDs",
          "error": "graph_scope_invalid",
          "reason": "too_many_ids"
        },
        "title": "ProjectsErrorResponseDto"
      }
    }
  }
}
```

## Code Examples

**cURL**

```bash
curl -L -X PATCH 'https://services.leadconnectorhq.com/projects/tasks/<taskId>' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: 2023-02-21' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "title": "Updated title",
  "dueDate": "2026-09-20T12:00:00.000Z",
  "body": "<p>Updated notes</p>",
  "startDate": "2026-09-20T10:00:00.000Z",
  "status": "to_do",
  "priority": 2,
  "parentTaskId": "6a102435124ecfb348bd5520",
  "assignees": [
    "user_1"
  ],
  "contactId": "sx6wyHhbFdRXh302Lunr",
  "businessId": "8fK3mN2pQ7rT1vW9xY4z",
  "customFields": {
    "connections": 42,
    "project_phase": "discovery"
  }
}'
```

**Node.js**

```javascript
const options = {
  method: 'PATCH',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: '2023-02-21',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "title": "Updated title",
      "dueDate": "2026-09-20T12:00:00.000Z",
      "body": "<p>Updated notes</p>",
      "startDate": "2026-09-20T10:00:00.000Z",
      "status": "to_do",
      "priority": 2,
      "parentTaskId": "6a102435124ecfb348bd5520",
      "assignees": [
        "user_1"
      ],
      "contactId": "sx6wyHhbFdRXh302Lunr",
      "businessId": "8fK3mN2pQ7rT1vW9xY4z",
      "customFields": {
        "connections": 42,
        "project_phase": "discovery"
      }
  })
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/projects/tasks/<taskId>', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/projects/tasks/{taskId}"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "2023-02-21"
}

payload = {
    "title": "Updated title",
    "dueDate": "2026-09-20T12:00:00.000Z",
    "body": "<p>Updated notes</p>",
    "startDate": "2026-09-20T10:00:00.000Z",
    "status": "to_do",
    "priority": 2,
    "parentTaskId": "6a102435124ecfb348bd5520",
    "assignees": [
        "user_1"
    ],
    "contactId": "sx6wyHhbFdRXh302Lunr",
    "businessId": "8fK3mN2pQ7rT1vW9xY4z",
    "customFields": {
        "connections": 42,
        "project_phase": "discovery"
    }
}

response = requests.patch(url, json=payload, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/projects/tasks/<taskId>',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'PATCH',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: 2023-02-21',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => '{
  "title": "Updated title",
  "dueDate": "2026-09-20T12:00:00.000Z",
  "body": "<p>Updated notes</p>",
  "startDate": "2026-09-20T10:00:00.000Z",
  "status": "to_do",
  "priority": 2,
  "parentTaskId": "6a102435124ecfb348bd5520",
  "assignees": [
    "user_1"
  ],
  "contactId": "sx6wyHhbFdRXh302Lunr",
  "businessId": "8fK3mN2pQ7rT1vW9xY4z",
  "customFields": {
    "connections": 42,
    "project_phase": "discovery"
  }
}',
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .patch("https://services.leadconnectorhq.com/projects/tasks/<taskId>")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "2023-02-21")
  .header("Content-Type", "application/json")
  .body("{\"title\":\"Updated title\",\"dueDate\":\"2026-09-20T12:00:00.000Z\",\"body\":\"<p>Updated notes</p>\",\"startDate\":\"2026-09-20T10:00:00.000Z\",\"status\":\"to_do\",\"priority\":2,\"parentTaskId\":\"6a102435124ecfb348bd5520\",\"assignees\":[\"user_1\"],\"contactId\":\"sx6wyHhbFdRXh302Lunr\",\"businessId\":\"8fK3mN2pQ7rT1vW9xY4z\",\"customFields\":{\"connections\":42,\"project_phase\":\"discovery\"}}")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
  "strings"
)

func main() {
  url := "https://services.leadconnectorhq.com/projects/tasks/<taskId>"
  payload := strings.NewReader(`{
  "title": "Updated title",
  "dueDate": "2026-09-20T12:00:00.000Z",
  "body": "<p>Updated notes</p>",
  "startDate": "2026-09-20T10:00:00.000Z",
  "status": "to_do",
  "priority": 2,
  "parentTaskId": "6a102435124ecfb348bd5520",
  "assignees": [
    "user_1"
  ],
  "contactId": "sx6wyHhbFdRXh302Lunr",
  "businessId": "8fK3mN2pQ7rT1vW9xY4z",
  "customFields": {
    "connections": 42,
    "project_phase": "discovery"
  }
}`)
  req, _ := http.NewRequest("PATCH", url, payload)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "2023-02-21")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/projects/tasks/<taskId>")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "2023-02-21"
request["Content-Type"] = "application/json"
request.body = '{
  "title": "Updated title",
  "dueDate": "2026-09-20T12:00:00.000Z",
  "body": "<p>Updated notes</p>",
  "startDate": "2026-09-20T10:00:00.000Z",
  "status": "to_do",
  "priority": 2,
  "parentTaskId": "6a102435124ecfb348bd5520",
  "assignees": [
    "user_1"
  ],
  "contactId": "sx6wyHhbFdRXh302Lunr",
  "businessId": "8fK3mN2pQ7rT1vW9xY4z",
  "customFields": {
    "connections": 42,
    "project_phase": "discovery"
  }
}'

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "2023-02-21"
}

$body = '{
  "title": "Updated title",
  "dueDate": "2026-09-20T12:00:00.000Z",
  "body": "<p>Updated notes</p>",
  "startDate": "2026-09-20T10:00:00.000Z",
  "status": "to_do",
  "priority": 2,
  "parentTaskId": "6a102435124ecfb348bd5520",
  "assignees": [
    "user_1"
  ],
  "contactId": "sx6wyHhbFdRXh302Lunr",
  "businessId": "8fK3mN2pQ7rT1vW9xY4z",
  "customFields": {
    "connections": 42,
    "project_phase": "discovery"
  }
}'

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/projects/tasks/<taskId>' -Method 'PATCH' -Headers $headers -Body $body -ContentType 'application/json'
$response | ConvertTo-Json
```
