# Attachments (ATTACH blocks)Rich message layout — cards, field-value tables, images, files and dividers. Passed in the attach field together with message.
attach is an array of blocks. Each block is an object with a single type key. The MESSAGE text block takes a string; the other blocks take an array of objects with fields.
# Block types# MESSAGE — textA text string. Supports BB codes .
JSON
Copy
{ "MESSAGE": "Task status updated" }
# GRID — field-value table
Field
Type
Description
NAME
string
Field name
VALUE
string
Field value
DISPLAY
string
Layout: LINE (inline), BLOCK, ROW
WIDTH
integer
Column width in pixels
JSON
Copy
{ "GRID": [
{ "NAME": "Task", "VALUE": "Prepare the report", "DISPLAY": "LINE" },
{ "NAME": "Status", "VALUE": "Done", "DISPLAY": "LINE" }
] }
# LINK — link preview
Field
Type
Description
NAME
string
Link title
LINK
string
URL
DESC
string
Description
PREVIEW
string
Preview image URL
JSON
Copy
{ "LINK": [{ "NAME": "Documentation", "LINK": "https://example.com/docs", "DESC": "API reference" }] }
# IMAGE — image
Field
Type
Description
LINK
string
Image URL
NAME
string
Caption
PREVIEW
string
Preview URL
WIDTH
integer
Width in pixels
HEIGHT
integer
Height in pixels
JSON
Copy
{ "IMAGE": [{ "LINK": "https://example.com/chart.png", "NAME": "Sales chart", "WIDTH": 600, "HEIGHT": 400 }] }
# FILE — file
Field
Type
Description
LINK
string
File URL
NAME
string
File name
SIZE
integer
Size in bytes
JSON
Copy
{ "FILE": [{ "LINK": "https://example.com/report.pdf", "NAME": "report.pdf", "SIZE": 2048576 }] }
# USER — user card
Field
Type
Description
NAME
string
User name
AVATAR
string
Avatar URL
LINK
string
Profile URL
JSON
Copy
{ "USER": [{ "NAME": "John Brown", "LINK": "https://example.com/u/42" }] }
# DELIMITER — divider line
Field
Type
Description
SIZE
integer
Width in pixels
COLOR
string
Color in hexadecimal format
JSON
Copy
{ "DELIMITER": [{ "SIZE": 200, "COLOR": "#c6c6c6" }] }
# Full example
JSON
Copy
{
"message": "Task report",
"attach": [
{ "MESSAGE": "[B]Task status updated[/B]" },
{ "DELIMITER": [{}] },
{ "GRID": [
{ "NAME": "Task", "VALUE": "Prepare the report", "DISPLAY": "LINE" },
{ "NAME": "Status", "VALUE": "Done", "DISPLAY": "LINE" }
] },
{ "LINK": [{ "NAME": "Open the task", "LINK": "https://example.com/tasks/42" }] }
]
}
# See also