Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Attachment

Attaching content and links to messages https://api.slack.com/docs/message-attachments

Hierarchy

  • Attachment

Index

Properties

Optional author_icon

author_icon: undefined | string

A valid URL that displays a small 16x16px image to the left of the author_name text. Will only work if author_name is present.

Optional author_link

author_link: undefined | string

A valid URL that will hyperlink the author_name text mentioned above. Will only work if author_name is present.

Optional author_name

author_name: undefined | string

Small text used to display the author's name.

Optional color

color: Color | string

Like traffic signals, color-coding messages can quickly communicate intent and help separate them from the flow of other messages in the timeline. An optional value that can either be one of good, warning, danger, or any hex color code (eg. #439FE0). This value is used to color the border along the left side of the message attachment.

Optional fallback

fallback: undefined | string

A plain-text summary of the attachment. This text will be used in clients that don't show formatted text (eg. IRC, mobile notifications) and should not contain any markup.

Optional fields

fields: Feild[]

Fields are defined as an array, and hashes contained within it will be displayed in a table inside the message attachment.

Optional footer

footer: undefined | string

Add some brief text to help contextualize and identify an attachment. Limited to 300 characters, and may be truncated further when displayed to users in environments with limited screen real estate.

Optional footer_icon

footer_icon: undefined | string

To render a small icon beside your footer text, provide a publicly accessible URL string in the footer_icon field. You must also provide a footer for the field to be recognized. We'll render what you provide at 16px by 16px. It's best to use an image that is similarly sized. Example: "https://platform.slack-edge.com/img/default_application_icon.png"

Optional image_url

image_url: undefined | string

A valid URL to an image file that will be displayed inside a message attachment. We currently support the following formats: GIF, JPEG, PNG, and BMP. Large images will be resized to a maximum width of 400px or a maximum height of 500px, while still maintaining the original aspect ratio.

Optional pretext

pretext: undefined | string

This is optional text that appears above the message attachment block.

Optional text

text: undefined | string

This is the main text in a message attachment, and can contain standard message markup. The content will automatically collapse if it contains 700+ characters or 5+ linebreaks, and will display a "Show more..." link to expand the content. Links posted in the text field will not unfurl.

Optional thumb_url

thumb_url: undefined | string

A valid URL to an image file that will be displayed as a thumbnail on the right side of a message attachment. We currently support the following formats: GIF, JPEG, PNG, and BMP. The thumbnail's longest dimension will be scaled down to 75px while maintaining the aspect ratio of the image. The filesize of the image must also be less than 500 KB. For best results, please use images that are already 75px by 75px.

Optional title

title: undefined | string

The title is displayed as larger, bold text near the top of a message attachment.

Optional title_link

title_link: undefined | string

By passing a valid URL in the title_link parameter (optional), the title text will be hyperlinked.

Optional ts

ts: undefined | number

Does your attachment relate to something happening at a specific time? By providing the ts field with an integer value in "epoch time", the attachment will display an additional timestamp value as part of the attachment's footer. Use ts when referencing articles or happenings. Your message will have its own timestamp when published. Example: Providing 123456789 would result in a rendered timestamp of Nov 29th, 1973.

Generated using TypeDoc