> 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.

# Create a task on a board

POST https://api-dev.houseofapps.ai/v1/integrations/boards/{board_id}/tasks
Content-Type: application/json

Creates a task on one work board.

Reference: https://docs.houseofapps.ai/api-reference/overview/work/tasks/external-create-board-task-v-1-integrations-boards-board-id-tasks-post

## Request

### Path parameters

- `board_id` (string, required)

### Headers

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

### Body (application/json)

This endpoint expects a CreateCpTaskRequest.

- `title` (string, required) — Task title
- `expected_end_date` (datetime, required) — Due instant (ISO datetime with time; date-only rejected)
- `description` (string, optional, default: ) — Task description
- `priority` (enum, optional) — Priority: low | medium | high | critical
  - Allowed values: `low`, `medium`, `high`, `critical`
- `stage_id` (string, optional, nullable) — Target stage; defaults to board's first stage when omitted
- `lead_id` (string, optional, nullable) — Lead this task follows up on (sales boards only)
- `prospect_id` (string, optional, nullable) — Prospect this task follows up on (sales boards only)
- `assignee_ids` (list of string, optional) — Assignee user ids
- `start_date` (date, optional, nullable) — Start date
- `task_type` (enum, optional) — Task kind: email | call | to_do
  - Allowed values: `email`, `call`, `to_do`
- `attachments` (list of CpAttachmentInput, optional) — Initial attachments (limits: CP_TASK_MAX_ATTACHMENTS, CP_TASK_MAX_ATTACHMENT_BYTES)
- `template_ids` (list of string, optional) — Template ids to apply (copies checklist items)
- `completed_checklist_item_ids` (list of string, optional) — Template checklist item ids to mark done at create. When creating onto a stage whose entry_template_id is included in template_ids, all of that template's items must be listed here (or already done).
- `label_ids` (list of string, optional) — Label ids
- `checklist` (list of CpChecklistItemInput, optional) — Optional ad-hoc checklist items
- `custom_fields` (list of map from string to any, optional) — Root FieldCell create: field_id plus exactly one of value | sub_fields | items. Same shape as leads/contacts; omit or [] when none.
- `notes` (list of CreateCpNoteRequest, optional) — Optional notes to create with the task
- `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

### 201

Created

- `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
{
  "title": "string",
  "expected_end_date": "2024-01-15T09:30:00Z"
}
```

**Response**

```json
{
  "status": "success",
  "message": "Task created successfully",
  "statusCode": 201,
  "code": "2001",
  "data": {
    "task_id": "t1a2b3c4-1111-2222-3333-444455556666"
  }
}
```

**SDK Code**

```python Created
import requests

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

payload = {
    "title": "string",
    "expected_end_date": "2024-01-15T09:30:00Z"
}
headers = {
    "appSecret": "appSecret",
    "licenseKey": "licenseKey",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Created
const url = 'https://api-dev.houseofapps.ai/v1/integrations/boards/board_id/tasks';
const options = {
  method: 'POST',
  headers: {
    appSecret: 'appSecret',
    licenseKey: 'licenseKey',
    'Content-Type': 'application/json'
  },
  body: '{"title":"string","expected_end_date":"2024-01-15T09:30:00Z"}'
};

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

```go Created
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"title\": \"string\",\n  \"expected_end_date\": \"2024-01-15T09:30:00Z\"\n}")

	req, _ := http.NewRequest("POST", 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 Created
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Post.new(url)
request["appSecret"] = 'appSecret'
request["licenseKey"] = 'licenseKey'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"title\": \"string\",\n  \"expected_end_date\": \"2024-01-15T09:30:00Z\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api-dev.houseofapps.ai/v1/integrations/boards/board_id/tasks")
  .header("appSecret", "appSecret")
  .header("licenseKey", "licenseKey")
  .header("Content-Type", "application/json")
  .body("{\n  \"title\": \"string\",\n  \"expected_end_date\": \"2024-01-15T09:30:00Z\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-dev.houseofapps.ai/v1/integrations/boards/board_id/tasks', [
  'body' => '{
  "title": "string",
  "expected_end_date": "2024-01-15T09:30:00Z"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'appSecret' => 'appSecret',
    'licenseKey' => 'licenseKey',
  ],
]);

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

```csharp Created
using RestSharp;

var client = new RestClient("https://api-dev.houseofapps.ai/v1/integrations/boards/board_id/tasks");
var request = new RestRequest(Method.POST);
request.AddHeader("appSecret", "appSecret");
request.AddHeader("licenseKey", "licenseKey");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"title\": \"string\",\n  \"expected_end_date\": \"2024-01-15T09:30:00Z\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Created
import Foundation

let headers = [
  "appSecret": "appSecret",
  "licenseKey": "licenseKey",
  "Content-Type": "application/json"
]
let parameters = [
  "title": "string",
  "expected_end_date": "2024-01-15T09:30:00Z"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-dev.houseofapps.ai/v1/integrations/boards/board_id/tasks")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```