Skip to main content

Composition Objects

Generated from actual PHP reflection and PHPDoc. Names live in the Slackblocks namespace. Use named arguments and declare(strict_types=1); values validate before construction returns.

AreaChart​

An area chart for a data visualization block. Every series needs exactly one data point for each axis category. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$series​

Adds data series in display order. Series names must be unique.

/** @var list<DataSeries> */
public readonly array $series;

Related types: DataSeries

$axisConfig​

Sets the axis categories and labels. Every series needs exactly one point per category.

public readonly AxisConfig $axisConfig;

Related types: AxisConfig

__construct​

Construct a validated immutable value.

public function __construct(array $series, AxisConfig $axisConfig, ?JsonObject $extensions = NULL)
ParameterDescription
serieslist<DataSeries> — Adds data series in display order. Series names must be unique.
axisConfigAxisConfig — Sets the axis categories and labels. Every series needs exactly one point per category.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: AxisConfig, JsonObject

AxisConfig​

The categories and labels shared by bar, area, and line chart axes. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$categories​

Adds axis categories in display order. Labels must be unique.

/** @var list<string> */
public readonly array $categories;

$xLabel​

Sets the horizontal axis label.

public readonly ?string $xLabel;

$yLabel​

Sets the vertical axis label.

public readonly ?string $yLabel;

__construct​

Construct a validated immutable value.

public function __construct(array $categories, ?string $xLabel = NULL, ?string $yLabel = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
categorieslist<string> — Adds axis categories in display order. Labels must be unique.
xLabelstring|null — Sets the horizontal axis label.
yLabelstring|null — Sets the vertical axis label.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

BarChart​

A bar chart for a data visualization block. Every series needs exactly one data point for each axis category. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$series​

Adds data series in display order. Series names must be unique.

/** @var list<DataSeries> */
public readonly array $series;

Related types: DataSeries

$axisConfig​

Sets the axis categories and labels. Every series needs exactly one point per category.

public readonly AxisConfig $axisConfig;

Related types: AxisConfig

__construct​

Construct a validated immutable value.

public function __construct(array $series, AxisConfig $axisConfig, ?JsonObject $extensions = NULL)
ParameterDescription
serieslist<DataSeries> — Adds data series in display order. Series names must be unique.
axisConfigAxisConfig — Sets the axis categories and labels. Every series needs exactly one point per category.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: AxisConfig, JsonObject

ChartSegment​

One labelled segment of a pie chart. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$label​

Sets the segment label.

public readonly string $label;

$value​

Sets the segment's size. Must be greater than zero.

public readonly int|float $value;

__construct​

Construct a validated immutable value.

public function __construct(string $label, int|float $value, ?JsonObject $extensions = NULL)
ParameterDescription
labelstring — Sets the segment label.
valueint|float — Sets the segment's size. Must be greater than zero.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

ColumnSettings​

Alignment and wrapping settings for one table column. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$align​

Sets how cell content in the column is aligned.

public readonly ?ColumnAlign $align;

Related types: ColumnAlign

$isWrapped​

Sets whether long cell content wraps instead of being truncated.

public readonly ?bool $isWrapped;

__construct​

Construct a validated immutable value.

public function __construct(?ColumnAlign $align = NULL, ?bool $isWrapped = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
alignColumnAlign|null — Sets how cell content in the column is aligned.
isWrappedbool|null — Sets whether long cell content wraps instead of being truncated.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: ColumnAlign, JsonObject

Confirmation​

A dialog that asks users to confirm an action before it is sent. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$title​

Sets the dialog title.

public readonly PlainText $title;

Related types: PlainText

$text​

Sets the explanatory text in the dialog body.

public readonly Text $text;

Related types: Text

$confirm​

Sets the label of the button that confirms the action.

public readonly PlainText $confirm;

Related types: PlainText

$deny​

Sets the label of the button that cancels the action.

public readonly PlainText $deny;

Related types: PlainText

$style​

Sets the emphasis of the confirm button.

public readonly ?ButtonStyle $style;

Related types: ButtonStyle

__construct​

Construct a validated immutable value.

public function __construct(PlainText|string $title, Text|string $text, PlainText|string $confirm, PlainText|string $deny, ?ButtonStyle $style = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
titlePlainText|string — Sets the dialog title.
textText|string — Sets the explanatory text in the dialog body.
confirmPlainText|string — Sets the label of the button that confirms the action.
denyPlainText|string — Sets the label of the button that cancels the action.
styleButtonStyle|null — Sets the emphasis of the confirm button.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: ButtonStyle, JsonObject, PlainText, Text

ConversationFilter​

Limits which conversations a conversation menu offers. Set at least one filter. Include only im, mpim, private, and public. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$include​

Adds conversation types to offer: im, mpim, private, or public.

/** @var list<string>|null */
public readonly ?array $include;

$excludeExternalSharedChannels​

Sets whether externally shared channels are excluded.

public readonly ?bool $excludeExternalSharedChannels;

$excludeBotUsers​

Sets whether bot users are excluded.

public readonly ?bool $excludeBotUsers;

__construct​

Construct a validated immutable value.

public function __construct(?array $include = NULL, ?bool $excludeExternalSharedChannels = NULL, ?bool $excludeBotUsers = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
includelist<string>|null — Adds conversation types to offer: im, mpim, private, or public.
excludeExternalSharedChannelsbool|null — Sets whether externally shared channels are excluded.
excludeBotUsersbool|null — Sets whether bot users are excluded.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

DataPoint​

One value of a chart series, keyed by axis category. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$label​

Sets the axis category this point belongs to.

public readonly string $label;

$value​

Sets the point's value.

public readonly int|float $value;

__construct​

Construct a validated immutable value.

public function __construct(string $label, int|float $value, ?JsonObject $extensions = NULL)
ParameterDescription
labelstring — Sets the axis category this point belongs to.
valueint|float — Sets the point's value.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

DataSeries​

A named series of chart data points. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$name​

Sets the series name shown in the legend.

public readonly string $name;

$data​

Adds data points in axis-category order.

/** @var list<DataPoint> */
public readonly array $data;

Related types: DataPoint

__construct​

Construct a validated immutable value.

public function __construct(string $name, array $data, ?JsonObject $extensions = NULL)
ParameterDescription
namestring — Sets the series name shown in the legend.
datalist<DataPoint> — Adds data points in axis-category order.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

DispatchActionConfiguration​

Chooses which interactions with an input send a block_actions payload. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$triggerActionsOn​

Adds the interactions that send a payload: on_enter_pressed or on_character_entered.

/** @var list<string>|null */
public readonly ?array $triggerActionsOn;

__construct​

Construct a validated immutable value.

public function __construct(?array $triggerActionsOn = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
triggerActionsOnlist<string>|null — Adds the interactions that send a payload: on_enter_pressed or on_character_entered.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

FeedbackButton​

One button of a feedback buttons element. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$text​

Sets the button label.

public readonly PlainText $text;

Related types: PlainText

$value​

Sets the application-defined value sent in interaction payloads.

public readonly string $value;

$accessibilityLabel​

Sets the label read by screen readers in place of the visible text.

public readonly ?string $accessibilityLabel;

__construct​

Construct a validated immutable value.

public function __construct(PlainText|string $text, string $value, ?string $accessibilityLabel = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
textPlainText|string — Sets the button label.
valuestring — Sets the application-defined value sent in interaction payloads.
accessibilityLabelstring|null — Sets the label read by screen readers in place of the visible text.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject, PlainText

InputParameter​

A named value passed to a workflow trigger. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$name​

Sets the workflow input parameter name.

public readonly string $name;

$value​

Sets the value passed to the workflow input.

public readonly string $value;

__construct​

Construct a validated immutable value.

public function __construct(string $name, string $value, ?JsonObject $extensions = NULL)
ParameterDescription
namestring — Sets the workflow input parameter name.
valuestring — Sets the value passed to the workflow input.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

LineChart​

A line chart for a data visualization block. Every series needs exactly one data point for each axis category. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$series​

Adds data series in display order. Series names must be unique.

/** @var list<DataSeries> */
public readonly array $series;

Related types: DataSeries

$axisConfig​

Sets the axis categories and labels. Every series needs exactly one point per category.

public readonly AxisConfig $axisConfig;

Related types: AxisConfig

__construct​

Construct a validated immutable value.

public function __construct(array $series, AxisConfig $axisConfig, ?JsonObject $extensions = NULL)
ParameterDescription
serieslist<DataSeries> — Adds data series in display order. Series names must be unique.
axisConfigAxisConfig — Sets the axis categories and labels. Every series needs exactly one point per category.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: AxisConfig, JsonObject

MarkdownText​

A mrkdwn text composition object. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$text​

Sets the mrkdwn-formatted text content.

public readonly string $text;

$verbatim​

Sets whether Slack leaves URLs, mentions, and channel names unlinked.

public readonly ?bool $verbatim;

__construct​

Construct a validated immutable value.

public function __construct(string $text, ?bool $verbatim = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
textstring — Sets the mrkdwn-formatted text content.
verbatimbool|null — Sets whether Slack leaves URLs, mentions, and channel names unlinked.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

getText​

Returns the text content through the Text interface.

public function getText(): string

Option​

A selectable option for menus, checkboxes, radio buttons, and overflow menus. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$text​

Sets the option label shown to users.

public readonly Text $text;

Related types: Text

$value​

Sets the value sent in interaction payloads when this option is chosen.

public readonly string $value;

$description​

Sets supporting text shown below the label. Only rendered by checkboxes and radio buttons.

public readonly ?Text $description;

Related types: Text

$url​

Sets a URL loaded in the user's browser when an overflow menu option is chosen.

public readonly ?string $url;

__construct​

Construct a validated immutable value.

public function __construct(Text|string $text, string $value, Text|string|null $description = NULL, ?string $url = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
textText|string — Sets the option label shown to users.
valuestring — Sets the value sent in interaction payloads when this option is chosen.
descriptionText|string|null — Sets supporting text shown below the label. Only rendered by checkboxes and radio buttons.
urlstring|null — Sets a URL loaded in the user's browser when an overflow menu option is chosen.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject, Text

OptionGroup​

A labelled group of options in a static select menu. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$label​

Sets the group heading.

public readonly PlainText $label;

Related types: PlainText

$options​

Adds selectable options in display order.

/** @var list<Option> */
public readonly array $options;

Related types: Option

__construct​

Construct a validated immutable value.

public function __construct(PlainText|string $label, array $options, ?JsonObject $extensions = NULL)
ParameterDescription
labelPlainText|string — Sets the group heading.
optionslist<Option> — Adds selectable options in display order.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject, PlainText

PieChart​

A pie chart for a data visualization block. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$segments​

Adds pie segments in display order.

/** @var list<ChartSegment> */
public readonly array $segments;

Related types: ChartSegment

__construct​

Construct a validated immutable value.

public function __construct(array $segments, ?JsonObject $extensions = NULL)
ParameterDescription
segmentslist<ChartSegment> — Adds pie segments in display order.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

PlainText​

A plain-text composition object. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$text​

Sets the text content.

public readonly string $text;

$emoji​

Sets whether emoji shortcodes such as 🎉 are rendered as emoji.

public readonly ?bool $emoji;

__construct​

Construct a validated immutable value.

public function __construct(string $text, ?bool $emoji = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
textstring — Sets the text content.
emojibool|null — Sets whether emoji shortcodes such as 🎉 are rendered as emoji.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

getText​

Returns the text content through the Text interface.

public function getText(): string

RawNumber​

A numeric data table cell with display text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$value​

Sets the numeric value used for sorting.

public readonly int|float $value;

$text​

Sets the formatted text displayed for the number, such as 1,234.5.

public readonly string $text;

__construct​

Construct a validated immutable value.

public function __construct(int|float $value, string $text, ?JsonObject $extensions = NULL)
ParameterDescription
valueint|float — Sets the numeric value used for sorting.
textstring — Sets the formatted text displayed for the number, such as 1,234.5.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

RawText​

An unformatted table cell. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$text​

Sets the cell text.

public readonly string $text;

__construct​

Construct a validated immutable value.

public function __construct(string $text, ?JsonObject $extensions = NULL)
ParameterDescription
textstring — Sets the cell text.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

RichTextChannel​

A channel mention inside rich text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$channelId​

Sets the ID of the mentioned channel.

public readonly string $channelId;

$style​

Sets the mention style.

public readonly ?RichTextStyle $style;

Related types: RichTextStyle

__construct​

Construct a validated immutable value.

public function __construct(string $channelId, ?RichTextStyle $style = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
channelIdstring — Sets the ID of the mentioned channel.
styleRichTextStyle|null — Sets the mention style.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject, RichTextStyle

RichTextCodeBlock​

A preformatted code block inside rich text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$elements​

Adds inline rich text elements in display order.

/** @var list<RichTextSectionElement> */
public readonly array $elements;

Related types: RichTextSectionElement

$border​

Sets the width of the left border, in pixels.

public readonly ?int $border;

__construct​

Construct a validated immutable value.

public function __construct(array $elements, ?int $border = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
elementslist<RichTextSectionElement> — Adds inline rich text elements in display order.
borderint|null — Sets the width of the left border, in pixels.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

RichTextEmoji​

An emoji inside rich text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$name​

Sets the emoji shortcode name, without colons.

public readonly string $name;

$skinTone​

Sets the emoji skin tone, from 1 to 6.

public readonly ?int $skinTone;

__construct​

Construct a validated immutable value.

public function __construct(string $name, ?int $skinTone = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
namestring — Sets the emoji shortcode name, without colons.
skinToneint|null — Sets the emoji skin tone, from 1 to 6.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

A hyperlink inside rich text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$url​

Sets the link target.

public readonly string $url;

$text​

Sets the visible link text. Slack shows the URL when omitted.

public readonly ?string $text;

$style​

Sets the visual style.

public readonly ?RichTextStyle $style;

Related types: RichTextStyle

$unsafe​

Sets whether Slack treats the link as unsafe.

public readonly ?bool $unsafe;

__construct​

Construct a validated immutable value.

public function __construct(string $url, ?string $text = NULL, ?RichTextStyle $style = NULL, ?bool $unsafe = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
urlstring — Sets the link target.
textstring|null — Sets the visible link text. Slack shows the URL when omitted.
styleRichTextStyle|null — Sets the visual style.
unsafebool|null — Sets whether Slack treats the link as unsafe.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject, RichTextStyle

RichTextList​

A bulleted or numbered list inside rich text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$style​

Sets whether the list is bulleted or numbered.

public readonly RichTextListStyle $style;

Related types: RichTextListStyle

$elements​

Adds list items, one rich text section per item.

/** @var list<RichTextSection> */
public readonly array $elements;

Related types: RichTextSection

$indent​

Sets the list's indentation level.

public readonly ?int $indent;

$offset​

Sets the number of items to skip when numbering an ordered list.

public readonly ?int $offset;

$border​

Sets the width of the left border, in pixels.

public readonly ?int $border;

__construct​

Construct a validated immutable value.

public function __construct(RichTextListStyle $style, array $elements, ?int $indent = NULL, ?int $offset = NULL, ?int $border = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
styleRichTextListStyle — Sets whether the list is bulleted or numbered.
elementslist<RichTextSection> — Adds list items, one rich text section per item.
indentint|null — Sets the list's indentation level.
offsetint|null — Sets the number of items to skip when numbering an ordered list.
borderint|null — Sets the width of the left border, in pixels.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject, RichTextListStyle

RichTextQuote​

A quotation inside rich text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$elements​

Adds inline rich text elements in display order.

/** @var list<RichTextSectionElement> */
public readonly array $elements;

Related types: RichTextSectionElement

$border​

Sets the width of the left border, in pixels.

public readonly ?int $border;

__construct​

Construct a validated immutable value.

public function __construct(array $elements, ?int $border = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
elementslist<RichTextSectionElement> — Adds inline rich text elements in display order.
borderint|null — Sets the width of the left border, in pixels.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

RichTextSection​

A paragraph of inline rich text elements. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$elements​

Adds inline rich text elements in display order.

/** @var list<RichTextSectionElement> */
public readonly array $elements;

Related types: RichTextSectionElement

__construct​

Construct a validated immutable value.

public function __construct(array $elements, ?JsonObject $extensions = NULL)
ParameterDescription
elementslist<RichTextSectionElement> — Adds inline rich text elements in display order.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

RichTextText​

A run of optionally styled text inside rich text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$text​

Sets the text content.

public readonly string $text;

$style​

Sets the visual style.

public readonly ?RichTextStyle $style;

Related types: RichTextStyle

__construct​

Construct a validated immutable value.

public function __construct(string $text, ?RichTextStyle $style = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
textstring — Sets the text content.
styleRichTextStyle|null — Sets the visual style.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject, RichTextStyle

RichTextUser​

A user mention inside rich text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$userId​

Sets the ID of the mentioned user.

public readonly string $userId;

$style​

Sets the visual style.

public readonly ?RichTextStyle $style;

Related types: RichTextStyle

__construct​

Construct a validated immutable value.

public function __construct(string $userId, ?RichTextStyle $style = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
userIdstring — Sets the ID of the mentioned user.
styleRichTextStyle|null — Sets the visual style.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject, RichTextStyle

RichTextUserGroup​

A user group mention inside rich text. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$userGroupId​

Sets the ID of the mentioned user group.

public readonly string $userGroupId;

$style​

Sets the visual style.

public readonly ?RichTextStyle $style;

Related types: RichTextStyle

__construct​

Construct a validated immutable value.

public function __construct(string $userGroupId, ?RichTextStyle $style = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
userGroupIdstring — Sets the ID of the mentioned user group.
styleRichTextStyle|null — Sets the visual style.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject, RichTextStyle

SlackFile​

A reference to an image file hosted in Slack. Provide exactly one of an ID or a URL. An ID must match ^F[A-Z0-9]{8,}$. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$id​

Sets the ID of a file previously uploaded to Slack. Cannot be combined with a URL.

public readonly ?string $id;

$url​

Sets the URL of a file hosted in Slack. Cannot be combined with an ID.

public readonly ?string $url;

__construct​

Construct a validated immutable value.

public function __construct(?string $id = NULL, ?string $url = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
idstring|null — Sets the ID of a file previously uploaded to Slack. Cannot be combined with a URL.
urlstring|null — Sets the URL of a file hosted in Slack. Cannot be combined with an ID.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

SlackIcon​

A Slack-provided icon, referenced by name. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$name​

Sets the name of the Slack-provided icon, such as rocket.

public readonly string $name;

__construct​

Construct a validated immutable value.

public function __construct(string $name, ?JsonObject $extensions = NULL)
ParameterDescription
namestring — Sets the name of the Slack-provided icon, such as rocket.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

Trigger​

A link trigger that starts a workflow. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$url​

Sets the link trigger URL.

public readonly string $url;

$customizableInputParameters​

Adds the input values passed to the workflow's trigger.

/** @var list<InputParameter>|null */
public readonly ?array $customizableInputParameters;

Related types: InputParameter

__construct​

Construct a validated immutable value.

public function __construct(string $url, ?array $customizableInputParameters = NULL, ?JsonObject $extensions = NULL)
ParameterDescription
urlstring — Sets the link trigger URL.
customizableInputParameterslist<InputParameter>|null — Adds the input values passed to the workflow's trigger.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

UrlSource​

A linked source cited by a task card. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$url​

Sets the source URL.

public readonly string $url;

$text​

Sets the source link text.

public readonly string $text;

__construct​

Construct a validated immutable value.

public function __construct(string $url, string $text, ?JsonObject $extensions = NULL)
ParameterDescription
urlstring — Sets the source URL.
textstring — Sets the source link text.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject

Workflow​

The workflow started by a workflow button. Readonly properties contain normalized values. See Value for inherited with(), fromArray(), fromJson(), toArray(), toJson() and jsonSerialize().

See the Slack reference.

$trigger​

Sets the link trigger that starts the workflow.

public readonly Trigger $trigger;

Related types: Trigger

__construct​

Construct a validated immutable value.

public function __construct(Trigger $trigger, ?JsonObject $extensions = NULL)
ParameterDescription
triggerTrigger — Sets the link trigger that starts the workflow.
extensionsJsonObject|null — Additional JSON fields; modeled names and type are reserved.
ThrowsWhen
ValidationErrorA content or contextual rule fails. PHP rejects incompatible call signatures with native errors.

Related types: JsonObject, Trigger

fromUrl​

Builds a workflow trigger from a Slack workflow URL.

public static function fromUrl(string $url, array $parameters = []): self
ParameterDescription
urlstring — Slack workflow trigger URL.
parameterslist<InputParameter> — Ordered customizable workflow inputs; an empty list is omitted.

Returns: self Workflow containing the validated trigger and supplied inputs.

ThrowsWhen
ValidationErrorThe URL or customizable inputs are invalid.