Send a message with HTML

When sending a message using the send endpoint, you can specify the html of the message you wish to send, along with regular text (If you didn't send any text, we'll convert the html to plain text).

Coding HTML email is old school. Think back to 1999, when we called ourselves “webmasters” and used Frontpage, WYSIWYG editors and tables to mark up our websites. Therefore the supported attributes, tags and styles are very basic.

The html is valid only in the web chat and email channels.

{
"text": "Ahoy!",
"html": "<div>Ahoy!</div>"
}

Only inline CSS is supported:

{
"html": "<p style=\"text-align: center;\">Sounds like we should connect you to our enterprise team.</p>"
}

Supported CSS properties:

background, background-attachment, background-color, background-image, background-position, background-repeat, border, border-bottom, border-bottom-color, border-bottom-style, border-bottom-width, border-collapse, border-color, border-left, border-left-color, border-left-style, border-left-width, border-right, border-right-color, border-right-style, border-right-width, border-spacing, border-style, border-top, border-top-color, border-top-style, border-top-width, border-width, bottom, clear, clip, color, content, direction, display, empty-cells, float, font, font-family, font-size, font-style, font-variant, font-weight, height, left, letter-spacing, line-height, list-style, list-style-image, list-style-position, list-style-type, margin, margin-bottom, margin-left, margin-right, margin-top, max-height, max-width, min-height, min-width, opacity, outline, outline-color, outline-style, outline-width, overflow, padding, padding-bottom, padding-left, padding-right, padding-top, quotes, right, table-layout, text-align, text-decoration, text-indent, text-transform, top, unicode-bidi, vertical-align, visibility, white-space, width, word-spacing, z-index, box-sizing

Suppported HTML tags:

a, abbr, address, b, big, blockquote, br, caption, center, cite, code, col, colgroup, dd, dfn, div, dl, dt, em, h1, h2, h3, h4, h5, h6, hr, i, img, ins, label, legend, li, ol, p, pre, q, s, samp, small, span, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, u, ul, var, section, nav, article, aside, header, footer, main, figure, figcaption, data, time, mark, ruby, rt, rp, bdi, wbr, details, summary, menuitem, html, head, body

Supported attributes:

align, alt, border, cellpadding, cellspacing, cite, clear, colspan, compact, datetime, dir, disabled, for, frame, headers, height, href, label, lang, media, name, noshade, nowrap, rel, rev, rowspan, rules, scope, shape, span, src, start, style, summary, target, title, valign, vspace, width, high, open, placeholder, pubdate, reversed, data-cid, crossorigin


How did we do?

Powered by HelpDocs (opens in a new tab)