Message with Multiple Sections
Messages of type section
can be used to group the different message
types. This is useful when you want to have multiple sidebars with
different colors or footers to group your message content.
Inside the
sections
array you can add your message type.
To see the style options reference the
Full JSON Schemabelow.
Example
Example’s JSON
{"head": {"text": "I am a header","sub_head": {"text": "I am a sub header"}},"body": [{"type": "section","sidebar_color": "#ffffff","sections": [{"type": "message","text": "I am a message with text"}],"footer": "I am a footer","footer_icon": "https://d24cgw3uvb9a9h.cloudfront.net/static/93516/image/new/ZoomLogo.png","ts": 1560446471819},{"type": "section","sidebar_color": "#F56416","sections": [{"type": "message","text": "I am a message with text"}],"footer": "I am a footer","footer_icon": "https://upload.wikimedia.org/wikipedia/en/thumb/5/58/San_Francisco_Giants_Logo.svg/1200px-San_Francisco_Giants_Logo.svg.png","ts": 1560446471819}]}
Full JSON Schema
{"type": "object","properties": {"head": {"type": "object","required": ["text"],"properties": {"text": {"type": "string"},"style": {"type": "object","properties": {"color": {"type": "string","format": "Hex"},"bold": {"type": "boolean"},"italic": {"type": "boolean"}}},"sub_head": {"type": "object","required": ["text"],"properties": {"text": {"type": "string"},"style": {"type": "object","properties": {"color": {"type": "string","format": "Hex"},"bold": {"type": "boolean"},"italic": {"type": "boolean"}}}}}}},"body": {"type": "array","items": {"type": "object","required": ["type","sections"],"properties": {"type": {"type": "string","enum": ["section"]},"sidebar_color": {"type": "string","format": "Hex"},"sections": {"type": "array","items": {"type": "object","required": ["type"],"properties": {"type": {"type": "string","enum": ["message","actions","fields","select","attachments"]}}}},"footer_icon": {"type": "string","format": "uri"},"footer": {"type": "string"},"ts": {"type": "integer","format": "Unix Timestamp"}}}}}}
Need help?
If you're looking for help, try Developer Support or our Developer Forum. Priority support is also available with Premier Developer Support plans.