Field | Type | Required? | Description |
type | String | Yes | The available values are |
text | String | Yes | The actual text |
emoji | Boolean | No | Works with the |
Example
{type: 'plain_text',text: 'lorem ipsum 🚀',emoji: true,}
Field | Type | Required? | Description |
text | Object | Yes | The |
value | String | Yes | The actual value the option represents |
{value: 'option_1',text: {type: 'plain_text',text: 'lorem ipsum 🚀',emoji: true,}}
Field | Type | Required? | Description |
type | String | Yes | The type of the block element, that is this case is 'button' |
text | Object | Yes | The |
value | String | No | A value sent along with the button information when an action is made upon the element |
url | String | No | An URL * |
style | String | No | The style of the button. Can be either |
actionId | String | Yes | An unique identifier for an action make upon the element |
{type: 'button',text: {type: 'plain_text',text: 'danger❗',emoji: true,},actionId: 'button_1_danger',style: 'danger',}
Field | Type | Required? | Description |
type | String | Yes | The type of the block element, that is this case is 'image' |
imageUrl | String | Yes | The URL of the image |
altText | String | Yes | A text describing the image being displayed |
{type: 'image',imageUrl: 'https://picsum.photos/200/300',altText: 'An image',}
Field | Type | Required? | Description |
type | String | Yes | The type of the block element, that is this case is 'overflow' |
options | Array | Yes | An array with the possible options (the option object) |
actionId | String | Yes | An unique identifier for an action make upon the element |
{type: 'overflow',actionId: 'overflow_1',options: [{value: 'option_1',text: {type: 'plain_text',text: 'lorem ipsum 🚀',emoji: true,}},{value: 'option_2',text: {type: 'plain_text',text: 'lorem ipsum 🚀',emoji: true,}},],}
Field | Type | Required? | Description |
type | String | Yes | The type of the block element, that is this case is 'plain_text_input' |
actionId | String | Yes | An unique identifier for an action make upon the element |
placeholder | Object | Yes | A placeholder text for the input (plain text object) |
initialValue | String | No | The initial value of the field |
multiline | Boolean | No | A flag that indicates whether the field should be a single line (default) or a bigger text area |
{type: 'plain_text_input',actionId: 'plain_text_input_1',placeholder: {type: 'plain_text',text: 'Enter name',emoji: true,},initialValue: 'John Doe',multiline: false,}
Field | Type | Required? | Description |
type | String | Yes | The type of the block element, that is this case is 'static_select' |
actionId | String | Yes | An unique identifier for an action make upon the element |
placeholder | Object | Yes | A placeholder text for the input (plain text object) |
initialValue | String | No | The initial value selected ( |
options | Array | Yes | An array with the possible options (the option object) |
{type: 'static_select',actionId: 'overflow_1',initialValue: 'option_2',options: [{value: 'option_1',text: {type: 'plain_text',text: 'lorem ipsum 🚀',emoji: true,}},{value: 'option_2',text: {type: 'plain_text',text: 'lorem ipsum 🚀',emoji: true,}},],placeholder: {type: 'plain_text',text: 'Select an item',},}
Field | Type | Required? | Description |
type | String | Yes | The type of the block element, that is this case is 'multi_static_select' |
actionId | String | Yes | An unique identifier for an action make upon the element |
placeholder | Object | Yes | A placeholder text for the input (plain text object) |
initialValue | Array of strings | No | The initial values selected ( |
options | Array | Yes | An array with the possible options (the option object) |
{type: 'static_select',actionId: 'overflow_1',initialValue: ['option_1' ,'option_2'],options: [{value: 'option_1',text: {type: 'plain_text',text: 'lorem ipsum 🚀',emoji: true,}},{value: 'option_2',text: {type: 'plain_text',text: 'lorem ipsum 🚀',emoji: true,}},],placeholder: {type: 'plain_text',text: 'Select an item',},}
Field | Type | Required? | Description |
blockId | String | No | An unique identifier for the block |
type | String | Yes | The type of the block, that is this case is 'section' |
text | Object | Yes | The |
accessory | Object | No | One element that can be a |
{type: 'section',blockId: 'section_1',text: {type: 'plain_text',text: 'lorem ipsum 🚀',emoji: true,}accessory: { /* one of the accessory elements */ } ,}
Field | Type | Required? | Description |
blockId | String | No | An unique identifier for the block |
type | String | Yes | The type of the block, that is this case is 'divider' |
{type: 'divider',blockId: 'divider_1',}
Field | Type | Required? | Description |
blockId | String | No | An unique identifier for the block |
type | String | Yes | The type of the block, that is this case is 'image' |
imageUrl | String | Yes | The URL of the image |
altText | String | Yes | A text describing the image being displayed |
title | Object | No | The |
{type: 'image',blockId: 'image_1',imageUrl: 'https://picsum.photos/200/300',altText: 'An image',title: {type: 'plain_text',text: 'lorem ipsum 🚀',emoji: true,}}
Field | Type | Required? | Description |
blockId | String | No | An unique identifier for the block |
type | String | Yes | The type of the block, that is this case is 'actions' |
elements | Array | Yes | A list of interactive block elements |
{type: 'actions',blockId: 'actions_1',elements: [ /* block elements */ ]}
Field | Type | Required? | Description |
blockId | String | No | An unique identifier for the block |
type | String | Yes | The type of the block, that is this case is 'actions' |
elements | Array | Yes | A list of block elements. Allowed elements are |
{type: 'context',blockId: 'context_1',elements: [ /* block elements */ ]}
Field | Type | Required? | Description |
blockId | String | No | An unique identifier for the block |
type | String | Yes | The type of the block, that is this case is 'input' |
element | Array | Yes | The input element, that can be |
{type: 'input',blockId: 'input_1',element: { /* input element */ }}