> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.houseofapps.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.houseofapps.ai/_mcp/server.

# Update a task

PATCH https://api-dev.houseofapps.ai/v1/integrations/tasks/{task_id}
Content-Type: application/json

Updates the fields you send on one task.

Reference: https://docs.houseofapps.ai/api-reference/overview/work/tasks/external-update-task-v-1-integrations-tasks-task-id-patch

## Request

### Path parameters

- `task_id` (string, required)

### Headers

- `licenseKey` (string, required)
- `appSecret` (string, required)

### Body (application/json)

This endpoint expects an UpdateCpTaskRequest.

- `title` (string, optional, nullable) — Task title
- `description` (string, optional, nullable) — Task description
- `priority` (enum, optional, nullable) — Task priority
  - Allowed values: `low`, `medium`, `high`, `critical`
- `stage_id` (string, optional, nullable) — Target stage id
- `lead_id` (string, optional, nullable) — Link to a lead (sales boards only); send null to unlink
- `prospect_id` (string, optional, nullable) — Link to a prospect (sales boards only); send null to unlink
- `assignee_ids` (list of string, optional, nullable) — Assignee user ids
- `start_date` (date, optional, nullable) — Start date
- `expected_end_date` (datetime, optional, nullable) — Due instant when set (ISO datetime with time); omit to leave unchanged; null/date-only rejected
- `task_type` (enum, optional, nullable) — Task kind: email | call | to_do
  - Allowed values: `email`, `call`, `to_do`
- `sort_order` (integer, optional, nullable) — Position within stage
- `template_ids` (list of string, optional, nullable) — Linked template ids
- `label_ids` (list of string, optional, nullable) — Label ids
- `attachments` (list of CpAttachmentInput, optional, nullable) — Replace attachments list when provided (limits: CP_TASK_MAX_ATTACHMENTS, CP_TASK_MAX_ATTACHMENT_BYTES)
- `checklist` (list of CpChecklistItemInput, optional, nullable) — Replace ad-hoc checklist when provided
- `custom_fields` (list of map from string to any, optional, nullable) — Root FieldCell patch (same shape as leads/contacts); omit to leave unchanged
- `notes` (list of CreateCpNoteRequest, optional, nullable) — Append notes when provided (does not replace existing notes)
- `comment` (string, optional, nullable) — Reason / comment logged with start/end date changes (timeline + end_date_history)
- `eta_hours` (double, optional, nullable) — Optional estimated effort in hours for the task
- `actual_completion_hours` (double, optional, nullable) — Optional actual effort in hours (cleared when leaving terminal stage)

## Response

### 200

OK

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable success message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `data` (SuccessResponseData, optional, nullable) — Payload for this endpoint

## Errors

### 422 Unprocessable Entity Error

Unprocessable Entity

- `status` (string, required) — Response status
- `message` (string, required) — Human-readable error message
- `statusCode` (integer, required) — HTTP status code
- `code` (string, required) — Custom application status code
- `messageKey` (string, optional) — i18n key for the message
- `errors` (list of map from string to any, optional) — Optional field-level validation errors

## Types

### CpAttachmentInput

Inbound attachment metadata (file upload is handled separately).

- `name` (string, required) — File name
- `id` (string, optional, nullable) — Optional client-supplied attachment id
- `size` (integer, optional, default: 0) — File size in bytes (limited by CP_TASK_MAX_ATTACHMENT_BYTES on tasks)
- `type` (string, optional, default: application/octet-stream) — MIME type

### CpChecklistItemInput

Ad-hoc checklist item to add on a task (no template required).

- `text` (string, required) — Checklist item text
- `description` (string, optional, nullable) — Optional item description
- `eta_hours` (double, optional, nullable) — Estimated hours
- `owner_id` (string, optional, nullable) — Optional owner user id
- `team_id` (string, optional, nullable) — Optional team id
- `done` (boolean, optional, default: false) — Mark item complete at create/replace (needed for entry-stage create)

### CreateCpNoteRequest

Note input nested on task create/update (``body``, not CEO ``text``).

- `body` (string, required) — Note body
- `attachments` (list of CpAttachmentInput, optional) — Optional note attachments

### SuccessResponseData

Payload for this endpoint

- map from string to any
- list of any
- string
- double
- boolean

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "status": "success",
  "message": "Task updated successfully",
  "statusCode": 200,
  "code": "2000",
  "data": {
    "task_id": "t1a2b3c4-1111-2222-3333-444455556666",
    "title": "Follow up"
  }
}
```

**SDK Code**

```python OK
import requests

url = "https://api-dev.houseofapps.ai/v1/integrations/tasks/task_id"

payload = {}
headers = {
    "appSecret": "appSecret",
    "licenseKey": "licenseKey",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript OK
const url = 'https://api-dev.houseofapps.ai/v1/integrations/tasks/task_id';
const options = {
  method: 'PATCH',
  headers: {
    appSecret: 'appSecret',
    licenseKey: 'licenseKey',
    'Content-Type': 'application/json'
  },
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go OK
package main

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

func main() {

	url := "https://api-dev.houseofapps.ai/v1/integrations/tasks/task_id"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("appSecret", "appSecret")
	req.Header.Add("licenseKey", "licenseKey")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

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

url = URI("https://api-dev.houseofapps.ai/v1/integrations/tasks/task_id")

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

request = Net::HTTP::Patch.new(url)
request["appSecret"] = 'appSecret'
request["licenseKey"] = 'licenseKey'
request["Content-Type"] = 'application/json'
request.body = "{}"

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

```java OK
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api-dev.houseofapps.ai/v1/integrations/tasks/task_id")
  .header("appSecret", "appSecret")
  .header("licenseKey", "licenseKey")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php OK
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api-dev.houseofapps.ai/v1/integrations/tasks/task_id', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
    'appSecret' => 'appSecret',
    'licenseKey' => 'licenseKey',
  ],
]);

echo $response->getBody();
```

```csharp OK
using RestSharp;

var client = new RestClient("https://api-dev.houseofapps.ai/v1/integrations/tasks/task_id");
var request = new RestRequest(Method.PATCH);
request.AddHeader("appSecret", "appSecret");
request.AddHeader("licenseKey", "licenseKey");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift OK
import Foundation

let headers = [
  "appSecret": "appSecret",
  "licenseKey": "licenseKey",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-dev.houseofapps.ai/v1/integrations/tasks/task_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```