Slaikydocs

    You say#blocks

    Blocks

    The closed catalog of layout blocks a bot message, a modal or a Home tab is made of.

    A message can carry up to 50 blocks next to its text. People who can’t see blocks (notifications, search, previews) read the text, so always send one. Blocks come from this catalog only; anything else is refused with the field that is wrong.

    Message blocks

    ArgumentTypeRequiredWhat
    textstringyes1–150 characters.

    section

    ArgumentTypeRequiredWhat
    textstringnoUp to 3,000 characters.
    fieldsarray of stringnoUp to 10 items.
    accessoryvalueno

    actions

    ArgumentTypeRequiredWhat
    elementsarray of valueyesUp to 5 items.

    context

    ArgumentTypeRequiredWhat
    elementsarray of stringyesUp to 10 items.

    divider

    No arguments.

    image

    ArgumentTypeRequiredWhat
    urlURLyesUp to 3,000 characters.
    altstringnoUp to 2,000 characters.

    Elements

    Buttons and menus go in an actions block or as a section’s accessory; input elements go in an input block (modals and Home only).

    button

    ArgumentTypeRequiredWhat
    textstringyes1–75 characters.
    actionIdstringyes1–255 characters.
    valuestringnoUp to 2,000 characters.
    style"primary" / "danger"no
    urlURLnoUp to 3,000 characters.

    static_select

    ArgumentTypeRequiredWhat
    actionIdstringyes1–255 characters.
    optionsarray of objectyesUp to 100 items.
    placeholderstringnoUp to 150 characters.
    initialValuestringnoUp to 2,000 characters.

    plain_text_input

    ArgumentTypeRequiredWhat
    actionIdstringyes1–255 characters.
    placeholderstringnoUp to 150 characters.
    initialValuestringnoUp to 3,000 characters.
    multilinebooleanno
    minLengthintegerno0–3,000.
    maxLengthintegerno1–3,000.

    checkboxes

    ArgumentTypeRequiredWhat
    actionIdstringyes1–255 characters.
    optionsarray of objectyesUp to 10 items.
    initialValuesarray of stringnoUp to 10 items.

    datepicker

    ArgumentTypeRequiredWhat
    actionIdstringyes1–255 characters.
    placeholderstringnoUp to 150 characters.
    initialDatestringno

    Views

    A modal or a Home tab: views.open, views.push, views.update, views.publish. Its blocks are the message blocks plus input.

    ArgumentTypeRequiredWhat
    blocksblocksyesUp to 50 items.
    titlestringno1–24 characters.
    submitstringno1–24 characters.
    closestringno1–24 characters.
    callbackIdstringnoUp to 255 characters.
    privateMetadatastringnoUp to 3,000 characters.
    notifyOnClosebooleanno

    input

    ArgumentTypeRequiredWhat
    blockIdstringyes1–255 characters.
    labelstringyes1–150 characters.
    elementvalueyes
    hintstringnoUp to 300 characters.
    optionalbooleanno

    Updated . Every method, scope, event and limit here is generated from the server’s own code.