Skip to main content
  {
      "task_id": "task-elnizmojzrjsogdm",
      "title": "Resolve customer escalation",
      "type": "message",
      "status": "closed",
      "priority": 3,
      "assignee": "ankit.singh@hashlabs.dev",
      "created_by": "anjali.pandey@hashlabs.dev",
      "last_updated_by": "ankit.singh@hashlabs.dev",
      "created_at": "2026-06-03T06:00:56.592+00:00",
      "last_updated_at": "2026-06-04T18:09:36.420636+00:00",
      "due_date": "2026-06-15T18:00:00+00:00",
      "remind_at": "2026-06-18T18:00:00+00:00",
      "notes": "Customer escalated via email — coordinate with support",
      "chat_id": "919205202401@c.us",
      "association": {
          "type": "message",
          "message_id": "true_4ca42ab6-77a9-428d-b614-5eb37bcf8f95_anjali.pandey@hashlabs.dev",
          "chat_id": "919205202401@c.us"
      },
      "completed_metadata": {
          "completed_at": "2026-06-04T18:09:36.407Z",
          "completed_by": "ankit.singh@hashlabs.dev"
      }
  }
A Task always has the same set of fields. The association field varies depending on type. The four examples below cover every possible shape.

Example: todo task

A standalone to-do has no association. The chat_id field and association are both null.
{
  "task_id": "task-00000000000000a1",
  "title": "Example todo task title",
  "type": "todo",
  "status": "closed",
  "priority": 1,
  "assignee": "member1@example.com",
  "created_by": "admin@example.com",
  "last_updated_by": "admin@example.com",
  "created_at": "2026-01-01T10:00:00.000Z",
  "last_updated_at": "2026-01-02T15:30:00.000Z",
  "due_date": "2026-01-05T17:00:00.000Z",
  "remind_at": "2026-01-05T16:30:00.000Z",
  "notes": "Example notes for a todo task.",
  "chat_id": null,
  "association": null,
  "completed_metadata": {
    "completed_at": "2026-01-02T15:30:00.000Z",
    "completed_by": "admin@example.com"
  }
}

Example: chat task

Linked to a chat. association.chat_id and the top-level chat_id mirror each other.
{
  "task_id": "task-00000000000000b2",
  "title": "Example chat task title",
  "type": "chat",
  "status": "closed",
  "priority": 2,
  "assignee": "member2@example.com",
  "created_by": "member1@example.com",
  "last_updated_by": "member2@example.com",
  "created_at": "2026-02-01T09:00:00.000Z",
  "last_updated_at": "2026-02-03T11:45:00.000Z",
  "due_date": "2026-02-10T17:00:00.000Z",
  "remind_at": "2026-02-10T16:30:00.000Z",
  "notes": "Example notes for a chat task.",
  "chat_id": "911234567890",
  "association": {
    "type": "chat",
    "chat_id": "911234567890"
  },
  "completed_metadata": {
    "completed_at": "2026-02-03T11:45:00.000Z",
    "completed_by": "member2@example.com"
  }
}

Example: message task

Linked to a specific message inside a chat. association.chat_id is the chat the message belongs to (denormalized for convenience).
{
  "task_id": "task-00000000000000c3",
  "title": "Example message task title",
  "type": "message",
  "status": "closed",
  "priority": 3,
  "assignee": "member3@example.com",
  "created_by": "member1@example.com",
  "last_updated_by": "member3@example.com",
  "created_at": "2026-03-01T08:00:00.000Z",
  "last_updated_at": "2026-03-04T12:00:00.000Z",
  "due_date": "2026-03-10T17:00:00.000Z",
  "remind_at": "2026-03-10T16:00:00.000Z",
  "notes": "Example notes for a message task.",
  "chat_id": "911234567890",
  "association": {
    "type": "message",
    "message_id": "msg-0000000000000001",
    "chat_id": "911234567890"
  },
  "completed_metadata": {
    "completed_at": "2026-03-04T12:00:00.000Z",
    "completed_by": "member3@example.com"
  }
}

Example: ticket task

Linked to a ticket. association.chat_id is the chat the ticket lives in.
{
  "task_id": "task-00000000000000d4",
  "title": "Example ticket task title",
  "type": "ticket",
  "status": "closed",
  "priority": 1,
  "assignee": "member4@example.com",
  "created_by": "member2@example.com",
  "last_updated_by": "member4@example.com",
  "created_at": "2026-04-01T07:00:00.000Z",
  "last_updated_at": "2026-04-05T13:15:00.000Z",
  "due_date": "2026-04-15T17:00:00.000Z",
  "remind_at": "2026-04-15T16:00:00.000Z",
  "notes": "Example notes for a ticket task.",
  "chat_id": "911234567890",
  "association": {
    "type": "ticket",
    "ticket_id": "tkt-0000000000000001",
    "chat_id": "911234567890"
  },
  "completed_metadata": {
    "completed_at": "2026-04-05T13:15:00.000Z",
    "completed_by": "member4@example.com"
  }
}

Attributes

task_id
string
Server-generated. Stable identifier for the task (e.g. task-00000000000000a1).
title
string
Human-readable summary. 1–500 characters.
type
string
What this task is attached to. One of todo, chat, message, ticket. Defaults to todo. Immutable after creation.
status
string
Workflow state. One of open, inprogress, closed. Defaults to open.
priority
number
Numeric priority. One of 1, 2, 3. 1 is the highest. Defaults to 1.
assignee
string | null
Email of an org member, or null if unassigned.
created_by
string
Email of the org member who created the task, or the literal string "api" if not specified on create. Immutable after creation.
last_updated_by
string | null
Email of whoever last modified the task, or "api".
created_at
string
ISO 8601 formatted timestamp when the task was created. Immutable.
last_updated_at
string
ISO 8601 formatted timestamp. Auto-updated on every PATCH.
due_date
string | null
ISO 8601 timestamp for when the task is due. null if no deadline.
remind_at
string | null
ISO 8601 timestamp for when a reminder should fire. null if no reminder.
notes
string | null
Free-form additional context.
chat_id
string | null
Derived from the association at create time. Populated for chat, message, and ticket tasks; null for todo.
association
object | null
Structured reference to the linked resource. null for todo tasks. Immutable after creation.
completed_metadata
object | null
Auto-managed completion record. Populated when the task is closed.