# Task card block

Displays a single task — one action an app or AI agent is taking — with its status, details, output and sources.

| | |
|---|---|
| **Type** | `task_card` |
| **Available in** | Messages, Modals, Home tab |
| **Compatible block elements** | [URL source element](https://workstation.repzo.com/docs/developers/block-kit/elements/url-source-element) |

## Fields

| Field | Type | Description | Required? |
|---|---|---|---|
| `type` | String | The type of block. For a task card block, `type` is always `task_card`. | Required |
| `task_id` | String | An ID for the task. | Required |
| `title` | String | Title of the task, in plain text. | Required |
| `status` | String | One of `pending`, `in_progress`, `complete` or `error`. Defaults to `pending`. | Optional |
| `details` | [Rich text block](https://workstation.repzo.com/docs/developers/block-kit/blocks/rich-text-block) | Details of the task, as a single `rich_text` block. | Optional |
| `output` | [Rich text block](https://workstation.repzo.com/docs/developers/block-kit/blocks/rich-text-block) | Output of the task, as a single `rich_text` block. Shown in a shaded box. | Optional |
| `sources` | Array of [URL source element](https://workstation.repzo.com/docs/developers/block-kit/elements/url-source-element) | Links to the sources the task used, shown as chips. | Optional |
| `block_id` | String | A unique identifier for the block. Maximum length is 255 characters. It must be unique within the message or view — a duplicate is replaced and reported as a warning. | Optional |
| `hide_title` | Boolean | When `true`, `title` isn't shown and `details` becomes the top line. `title` is still required. | Optional |

> **How Repzo Chat differs from Slack**
>
> - Slack shows task cards in messages only. Repzo shows them in modals and the Home tab too.
> - `status` is optional and may be `pending` (Slack requires one of `in_progress`, `complete` or `error`).
> - `icon` is accepted but not shown.

## Examples

### A finished task with sources

```json
{
  "blocks": [
    {
      "type": "task_card",
      "task_id": "lookup_order",
      "title": "Looked up order SO-2041",
      "status": "complete",
      "output": {
        "type": "rich_text",
        "elements": [
          {
            "type": "rich_text_section",
            "elements": [
              {
                "type": "text",
                "text": "Shipped on 12 Oct from the Riyadh warehouse; delivery expected 15 Oct."
              }
            ]
          }
        ]
      },
      "sources": [
        {
          "type": "url",
          "url": "https://example.com/orders/SO-2041",
          "text": "Order SO-2041"
        },
        {
          "type": "url",
          "url": "https://example.com/shipments/SH-88120",
          "text": "Shipment SH-88120"
        }
      ]
    }
  ]
}
```

### A task in progress

```json
{
  "blocks": [
    {
      "type": "task_card",
      "task_id": "draft_reply",
      "title": "Drafting a reply to ticket #4821",
      "status": "in_progress",
      "details": {
        "type": "rich_text",
        "elements": [
          {
            "type": "rich_text_section",
            "elements": [
              {
                "type": "text",
                "text": "Checking the known issues for firmware 4.2.1"
              }
            ]
          }
        ]
      }
    }
  ]
}
```

## Related

- [Blocks](https://workstation.repzo.com/docs/developers/block-kit/blocks)
- [Block Kit overview](https://workstation.repzo.com/docs/developers/block-kit)
