# Block Kit

> The JSON layout format chat apps use for messages, modals and the Home tab — compatible with Slack's Block Kit.

Block Kit is how a [chat app](https://workstation.repzo.com/docs/developers/chat-apps) lays out its messages, [modals](https://workstation.repzo.com/docs/developers/chat-apps/modals) and [Home tab](https://workstation.repzo.com/docs/developers/chat-apps/app-home): a list of **blocks**, stacked top to bottom. Blocks hold text, images and **block elements** — buttons, menus, pickers and inputs — and share small **composition objects** such as text and options.

It is Slack's Block Kit: the same JSON renders in Repzo Chat on the web and in the mobile app. Where Workstation behaves differently, the reference page says so under **How Repzo Chat differs from Slack**.

```json
{
  "blocks": [
    { "type": "header", "text": { "type": "plain_text", "text": "Refund request #4821" } },
    {
      "type": "section",
      "text": { "type": "mrkdwn", "text": "*Acme Ltd* asked for a refund of *JOD 129.00*." },
      "accessory": { "type": "image", "image_url": "https://picsum.photos/id/164/200/200", "alt_text": "Order photo" }
    },
    {
      "type": "actions",
      "elements": [
        { "type": "button", "action_id": "approve", "style": "primary", "text": { "type": "plain_text", "text": "Approve" }, "value": "4821" },
        { "type": "button", "action_id": "reject", "style": "danger", "text": { "type": "plain_text", "text": "Reject" }, "value": "4821" }
      ]
    }
  ]
}
```

## Reference

- [Blocks](https://workstation.repzo.com/docs/developers/block-kit/blocks) — section, header, actions, card, carousel, data table, charts, input and more
- [Block elements](https://workstation.repzo.com/docs/developers/block-kit/elements) — buttons, menus, pickers and inputs
- [Composition objects](https://workstation.repzo.com/docs/developers/block-kit/objects) — text, options, confirmation dialogs, attachments
- [Rich text elements](https://workstation.repzo.com/docs/developers/block-kit/rich-text) — the pieces of a rich text block

## Limits and validation

- Up to **50 blocks** in a message and **100** in a modal or Home view.
- `block_id` and `action_id` are generated when you leave them out. Keep `action_id` unique within a block and `block_id` unique within a message.
- Blocks are never rejected. Anything outside the rules is reported in the API response's `warnings`, and the rest of the message still posts.
- Controls only work in messages posted by an app; the app that posted the message is the one that hears about them.

## Where to go next

- [Sending messages](https://workstation.repzo.com/docs/developers/chat-apps/sending-messages)
- [Interactivity](https://workstation.repzo.com/docs/developers/chat-apps/interactivity)
- [Formatting text](https://workstation.repzo.com/docs/developers/chat-apps/formatting-text)
- The REST API's models for every block, element and object: [/api/v1/docs](https://workstation.repzo.com/api/v1/docs)
