API ReferenceTasks and Checklists

List tasks for a deal

GET
/api/v1/orgs/{orgId}/deals/{dealId}/tasks

Deal-scoped alias for listTasks. The path dealId is applied as a filter; a conflicting dealId query param returns 400 (ASSOCIATION_MISMATCH).

Checklists

Checklists are left out of results by default; their items are included.

  • type=checklist returns only checklists.
  • parentId=<checklist taskId> returns the items of one checklist.

Requires the api_tasks_list scope.

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer token using a Clai API key secret (clai_live_*).

In: header

Path Parameters

NameTypeDescription
orgId
required
string

Organization ID the key is operating in

dealId
required
string

Deal ID

Formatuuid

Query Parameters

NameTypeDescription
packageIdstring

Filter tasks anchored to a package in the deal identified by the dealId path parameter

Formatuuid
submissionIdstring

Filter tasks anchored to a submission in the deal identified by the dealId path parameter

Formatuuid
parentIdstring

Filter checklist child tasks for a parent checklist

Formatuuid
statusstring

Filter by current task status (exact match on any non-empty string). Common built-in values: pending, in_progress, awaiting_approval, complete, canceled.

Length1 <= length
typestring

When checklist, returns checklist parents; otherwise checklist parents are excluded

Allowed"general""checklist"
updatedSincestring

RFC 3339 UTC watermark (inclusive) for CRM sync polling on updated_at

Formatdate-time
includeDeletedstring

When true, include hard-deleted tombstones (deletedAt set). Canceled tasks remain visible by default.

Allowed"true""false"
limitinteger

Maximum tasks to return (1-100)

Range1 <= value <= 100
cursorstring

Opaque pagination cursor from a previous response

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://app.goclai.com/api/v1/orgs/org_2abc123/deals/550e8400-e29b-41d4-a716-446655440010/tasks"
{
  "tasks": [
    {
      "taskId": "e6e9d88a-9b63-468a-aec3-b7a11de27af8",
      "title": "string",
      "description": "string",
      "type": "general",
      "status": "string",
      "dealId": "f480fdfe-5c44-458b-b537-f3d9f40f9678",
      "packageId": "471cc1d4-ec27-4504-b7c2-949af95662bc",
      "submissionId": "23243110-f447-42f4-a433-27cb8d276b19",
      "parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",
      "dueDate": "2019-08-24T14:15:22Z",
      "assignees": [
        {
          "type": "user",
          "id": "string",
          "name": "string"
        }
      ],
      "approvers": [
        {
          "type": "user",
          "id": "string",
          "name": "string"
        }
      ],
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "deletedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "hasMore": true,
  "nextCursor": "string"
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {}
  }
}

POSTCreate a task

Creates a task in the organization. `dealId` is optional; `packageId` and `submissionId` require a deal. Requires the `api_tasks_create` scope and an `Idempotency-Key` header for safe retries. ## Checklists A checklist is a task with `type: "checklist"`. Its items are tasks with `parentId` set to the `taskId` of the checklist. 1. Create the checklist. `dealId` is optional: ```json { "title": "Closing checklist", "type": "checklist" } ``` 2. Create each item with the `taskId` from step 1: ```json { "title": "Order title search", "parentId": "<checklist taskId>" } ``` `parentId` must point to a checklist (`422 PARENT_NOT_CHECKLIST`) whose deal matches, including when both are unset (`400 ASSOCIATION_MISMATCH`). A template deal accepts `dealId` and `packageId` (not `submissionId`). Its tasks are copied into deals created from the template and never notify assignees.

POSTCreate a task on a deal

Deal-scoped alias for createTask. The path `dealId` anchors the task; `packageId` and `submissionId` remain optional body fields. Requires the `api_tasks_create` scope and an `Idempotency-Key` header for safe retries. ## Checklists A checklist is a task with `type: "checklist"`. Its items are tasks with `parentId` set to the `taskId` of the checklist. 1. Create the checklist: ```json { "title": "Closing checklist", "type": "checklist" } ``` 2. Create each item with the `taskId` from step 1: ```json { "title": "Order title search", "parentId": "<checklist taskId>" } ``` `parentId` must point to a checklist (`422 PARENT_NOT_CHECKLIST`) on this deal (`400 ASSOCIATION_MISMATCH`).