Result pages
A result page is built one of two mutually exclusive ways - you pick one per result object:
- Simple: send
title(required) and, optionally,descriptionon theresult(or, for a quiz, each entry ofresults) object. - Complex: send a
blocksarray instead - see Advanced result pages below. As soon as you sendblocks,title/descriptionare no longer accepted on that same object, since the page's content now comes entirely from the blocks.
Sending title/description together with blocks on the same result object is rejected - here for the result of a Poll:
{
"success": false,
"code": 400,
"error": "RIDDLE_BUILDER_BLOCK_PROPERTY_VALUE_VALIDATION",
"message": "Poll result: \"title\" is not a supported property here. Supported: blocks."
}
Note: This rejection is part of the strict key validation, which is always active when you edit an existing Riddle and opt-in via strictProperties when you create one. Without it, the title is silently dropped instead - the result page still comes out as a complex one built from your blocks.
Note: For quiz results, minPercentage/maxPercentage are required either way - they define the score range a result applies to and are independent of which of the two shapes above you choose for its content.
For quiz (simple result pages):
{
"blocks": [...],
"results": [
{
"minPercentage": 0,
"maxPercentage": 50,
"title": "Bad result",
"description": "You answered less than 50% of the questions correctly"
},
{
"minPercentage": 51,
"maxPercentage": 100,
"title": "Good result",
"description": "You answered more than 50% of the questions correctly"
}
]
}
For any other Riddle type (simple result page):
{
"blocks": [...],
"result": {
"title": "Thank you!",
"description": "We are happy to have you here"
}
}
A quiz has one result per score range: every entry of results needs a minPercentage (0-100) and a maxPercentage (1-100). Every other Riddle type has exactly one result, given as the single result object.
title is required on a simple result page; description is optional.
This default (simple) result page always consists of:
- Your given title and description
- A block which allows the user to share the result on different social networks
Additionally it may contain:
- For quiz: a block which shows the user how many questions they answered correctly
- For personality: a block which shows the user information about their winning personality and other personalities (if available)
In most cases this should suffice - if you want to create result URL redirects or advanced result pages similar to the functionality in the Creator, keep reading.
Redirect to a URL
If you want to redirect the user to a URL after they have completed the Riddle, you can do this by adding a redirectUrl property to the result object.
{
"blocks": [...],
"result": {
"redirectUrl": "https://www.riddle.com"
}
}
This will redirect the user to https://www.riddle.com after they have completed the Riddle.
Note: This result redirecting works for Poll, Quiz, Form, Predictor, and Minigame Riddles. Personality tests and leaderboards do not support it.
Optional properties
There are several options you can choose from when adding a result redirect:
| Property | Required | Type | Description | Default |
|---|---|---|---|---|
delay | integer | The delay in seconds before the redirect happens | 0 | |
isDelayEnabled | boolean | Whether the delay applies at all. A delay greater than 0 switches it on; sending false keeps the delay stored but redirects immediately. See feature toggles | derived from delay | |
title | string | The title of the result page. This will be displayed in the browser tab | ||
description | string | The description of the result page. This will be displayed in the browser tab | ||
media | string|object | The media shown on the result page. Adding it automatically switches its display on. See Use media | ||
mediaOrientation | string | How it is cropped: Settings, Wide, Square, Tall, or Original | Settings | |
openFullscreen | boolean | If true the redirect leaves the embed and opens in the parent window instead of inside the Riddle | true |
Note: Only with the delay property will the user actually see the title and description.
Note: For Quiz Riddles, redirects are defined per result inside the results array. In this case minPercentage and maxPercentage are additionally required to define the score range for which this redirect applies.
Example:
{
"blocks": [...],
"result": {
"redirectUrl": "https://www.riddle.com",
"delay": 5,
"title": "Thank you!",
"description": "We are happy to have you here",
"openFullscreen": false
}
}
Advanced result pages
You can create advanced result pages with texts, images, answered blocks, and more via the API's result builder. See the result page documentation to see how this works in the Creator.
Similar to the Riddle's blocks the result page is also structured in blocks. blocks is an array of objects (see item formats) - every block needs at least its type. You can add up to 10 blocks to the result page. To do this send a blocks array in the result object instead of, not in addition to, a title and description property - the two are mutually exclusive, see above.
For poll (or any type which only has one result):
{
"blocks": [...],
"result": {
"blocks": [
{
"type": "Text",
"text": "This is my result page text!"
},
...
]
}
}
For quiz:
{
"blocks": [...],
"results": [
{
"minPercentage": 0,
"maxPercentage": 50,
"blocks": [
{
"type": "Text",
"text": "Bad result"
},
...
]
},
{
"minPercentage": 51,
"maxPercentage": 100,
"blocks": [
{
"type": "Text",
"text": "Good result"
},
...
]
}
]
}
Every result page block consists of a type property and additional properties depending on the block type. For example here is the content for the button block only with required options:
{
"type": "Button",
"label": "My new button!",
"url": "https://riddle.com"
}
This will create a button with the label "My new button!" which links to https://riddle.com. If we now want to set the optional property isOpenInNewTabEnabled to true the object for this button would look like this:
{
"type": "Button",
"label": "My new button!",
"url": "https://riddle.com",
"isOpenInNewTabEnabled": true <--- optional property
}
In the next sections all available blocks are listed with their required and optional properties. These are the available type values:
| Type | What it does | Available for... |
|---|---|---|
Text | A rich-text block | all Riddle types |
Media | An image, video or embedded social media post | all Riddle types |
Button | A call-to-action button linking to a URL | all Riddle types |
Share | Share buttons for social networks | all Riddle types |
ResultScore | The visitor's score | all Riddle types |
AnsweredBlocks | What the visitor answered, including vote statistics | all Riddle types |
Leaderboard | A leaderboard the Riddle is connected to | all Riddle types |
PopularChoices | A ranking of what all respondents predicted | Predictor only |
WinningPersonality | The visitor's winning personality | Personality only |
OtherPersonalities | The remaining personalities | Personality only |
Attributes | A bar per attribute with its score | Personality only |
RecommendedContent | Other Riddles to check out next | all Riddle types |
A result page needs at least 1 and accepts at most 10 blocks. Using a type that is not available for the Riddle type you are building (e.g. WinningPersonality in a poll) is rejected with an "Invalid result builder block type" error.
Add user's score
Displays the user's score in a given format.
Properties
| Property | Required | Type | Description | Default |
|---|---|---|---|---|
type | ✓ | string | Set to ResultScore | |
format | string | The format in which the user's score should be displayed, valid values: Score (displays the user's score in an absolute number), ScoreTotalScore (displays the user's score in relation to the total score), ScorePoints ( displays the user's score in points), Percentage (displays the user's score in percentage) | Percentage | |
colorBg | string | The background color of the score | rgba(0, 0, 0, 0) | |
colorText | string | The text color of the score | (the palette's text color) | |
colorCircle | string | The color of the circle | (the palette's text color) | |
colorCircleBg | string | The background color of the circle | rgba(0,0,0,0.1) | |
size | integer | The diameter of the score circle in px; 1 or more | 96 | |
isFillingEnabled | boolean | Whether the circle fills up proportionally to the score | false |
Example
{
"type": "ResultScore",
"format": "Score",
"colorBg": "#fff",
"colorText": "#000",
"colorCircle": "#000",
"colorCircleBg": "#fff"
}
Add text
Displays a regular text block. You can use HTML tags in the text.
Tip: Use dynamic variables here to personalize the result page text to user input.
Properties
| Property | Required | Type | Description | Default |
|---|---|---|---|---|
text | ✓ | string | The text to be displayed |
Example
{
"type": "Text",
"text": "This is my result page text!"
}
Add button
Displays a call to action button that links to a specified URL on click.
Tip: Use dynamic variables in the label or URL.
Properties
| Property | Required | Type | Description | Default |
|---|---|---|---|---|
type | ✓ | string | Set to Button | |
label | ✓ | string | The button text | |
url | ✓ | string | The URL the button should link to | |
isOpenInNewTabEnabled | boolean | If true the link will open in a new tab | false | |
isFillingEnabled | boolean | If true the button spans the full width of the result page | true | |
presetId | string | The ID of a button style preset of your project to inherit the styling from | ||
colorBg | string | The background color of the button | #000 | |
colorBgHover | string | The background color of the button on hover | rgba(0,0,0,0.8) | |
colorBorder | string | The border color of the button | #77baf6ff | |
colorBorderHover | string | The border color of the button on hover | #93c3ed | |
colorText | string | The text color of the button | #fff | |
colorTextHover | string | The text color of the button on hover | #fff | |
borderRadius | string | The border radius of the button; all corners are the same | 18px | |
borderWidth | string | The border width of the button; all sides are the same | 0px | |
padding | string | The padding of the button; all sides are the same | 11px | |
textCapitalization | string | The text capitalization of the button. Valid values: capitalize, uppercase, lowercase, none | uppercase | |
textAlign | string | The text alignment of the button. Valid values: start, end, left, right, center, justify, inherit | center | |
textLetterSpacing | string | The letter spacing of the button | 0.12rem | |
textLineHeight | string | The line height of the button | 1.4rem | |
fontSize | string | The font size of the button | 1.6rem | |
fontFamily | string | The font family for this button. Must be one of the values listed below | normal | |
fontStyle | string | The font style of the button. Valid values: normal, italic, oblique | normal | |
fontWeight | string | The font weight of the button. Valid values: normal, bold, bolder, lighter, inherit, n100, n200, n300, n400, n500, n600, n700, n800, n900 | n600 |
Note: fontFamily only accepts one of the following values (generic CSS families like Arial or sans-serif are rejected with a NOT_ALLOWED_VALUE error) - use the Builder API font families endpoint to fetch this same list at any time (that endpoint requires a Business or Enterprise plan):
ABeeZee, Abril Fatface, Alex Brush, Archivo, Arimo, Assistant, Atkinson Hyperlegible, Barlow, Baskervville, Bebas Neue, BioRhyme, Bitter, Bree Serif, Cabin, Cabin Sketch, Cairo, Calistoga, Candal, Cantarell, Cardo, Cormorant, Cormorant Garamond, Cormorant Infant, Cormorant SC, Cormorant Unicase, Courgette, Crimson Text, Dancing Script, DM Sans, DM Serif Display, DM Serif Text, Domine, EB Garamond, Electrolize, Exo, Exo 2, Fira Sans, Fjalla One, Gentium Basic, Gentium Book Basic, IBM Plex Sans, IBM Plex Serif, Inconsolata, Inter, Istok Web, Josefin Sans, Jost, Jura, Karla, Khand, Lato, Libre Baskerville, Libre Franklin, Lora, M PLUS 1p, M PLUS Rounded 1c, Maven Pro, Montserrat, Montserrat Alternates, Mukta, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Sans SC, Noto Serif, Nunito, Nunito Sans, Old Standard TT, Open Sans, Open Sans Condensed, Oswald, Overpass, Pacifico, Permanent Marker, Playball, Playfair Display, Poppins, PT Mono, PT Sans, PT Serif, Quattrocento, Quattrocento Sans, Qwigley, Raleway, Red Hat Display, Red Hat Text, Roboto, Roboto Condensed, Roboto Mono, Roboto Slab, Rokkitt, Rubik, Russo One, Sanchez, Satisfy, Schoolbell, Source Code Pro, Source Sans Pro, Source Serif Pro, Spartan, Special Elite, Spectral, Teko, Tenor Sans, Tinos, Titillium Web, Ubuntu, Unica One, Varela, Varela Round, Vollkorn, Work Sans, Zilla Slab
Example
{
"type": "Button",
"label": "Click me!",
"url": "https://riddle.com",
"isOpenInNewTabEnabled": true,
"colorBg": "_colorBg",
"colorBgHover": "#fff",
"colorBorder": "#fff",
"colorBorderHover": "#fff",
"colorText": "#fff",
"colorTextHover": "#fff",
"borderRadius": "5px",
"borderWidth": "5px",
"padding": "5px",
"textCapitalization": "lowercase",
"textAlign": "inherit",
"textLetterSpacing": "20px",
"textLineHeight": "20px",
"fontFamily": "Poppins",
"fontSize": "20px",
"fontStyle": "oblique",
"fontWeight": "bolder"
}
Add share to social block
Displays a share block that allows users to share the result on different social networks.
You can customize the share messages, URLs and all of the share block's design properties.
Properties
| Property | Required | Type | Description | Default |
|---|---|---|---|---|
type | ✓ | string | Set to Share | |
label | string | The label of the share element | Share | |
messageTitle | string | The message users will share and will see as the title in the share dialogue | (empty) | |
messageDescription | string | The description users will see in the share dialogue as a description | (empty) | |
messageUrl | string | The URL users will share | (empty) (will go to Riddle showcase, riddle.com/view/X) | |
messageImage | string|object | The image users will see in the share dialogue | (empty) | |
isOverwriteValuesEnabled | boolean | Master switch: whether the four message* values override the Riddle's own defaults at all | false | |
networks | array | The networks the user can share the result on. See below to get the available social networks | 'facebook', 'whatsapp', 'twitter' | |
networkConfigs | object | Per-network overrides; see below | ||
colorBg | string | The background color of the share block | #ffffff00 | |
colorButtonBg | string | The background color of the share button | #000 | |
colorButtonBgHover | string | The background color of the share button on hover | #333 | |
colorButtonIcon | string | The color of the share button icon | #fff | |
colorButtonIconHover | string | The color of the share button icon on hover | #fff | |
colorBrandIsEnabled | boolean | If true the brand color will be used for the share button | false | |
colorText | string | The text color of the share block | #000 | |
buttonBorderRadius | string | The border radius of the share button | 50% | |
buttonGap | string | The gap between the share buttons | 0.8rem | |
buttonIconSize | string | The size of the share button icon | 2.1rem | |
buttonSize | string | The size of the share button | 3.6rem | |
textCapitalization | string | The text capitalization of the share block. Valid values: capitalize, uppercase, lowercase, none | uppercase | |
textAlign | string | The text alignment of the share block. Valid values: start, end, left, right, center, justify, inherit | inherit | |
textLetterSpacing | string | The letter spacing of the share block | 0.12rem | |
textLineHeight | string | The line height of the share block | 1.4rem | |
fontFamily | string | The font family for this button. Must be one of the same values listed under Add button above | none | |
fontSize | string | The font size of the share block | 1.6rem | |
fontStyle | string | The font style of the share block. Valid values: normal, italic, oblique | normal | |
fontWeight | string | The font weight of the share block. Valid values: normal, bold, bolder, lighter, inherit, n100, n200, n300, n400, n500, n600, n700, n800, n900 | n400 |
Example
{
"type": "Share",
"messageTitle": "Share this poll!",
"messageDescription": "This is a description",
"networks": ["facebook", "linkedin"]
}
Per-network configuration
networks only switches networks on and off. If you want a different share message per network, use networkConfigs instead - an object keyed by network name, where each value may contain:
| Property | Required | Type | Description | Default |
|---|---|---|---|---|
isEnabled | boolean | Whether this network is offered | ||
isOverwriteValuesEnabled | boolean | Whether this network overrides the global share message | ||
title | string | The title shared on this network | ||
description | string | The description shared on this network | ||
url | string | The URL shared on this network | ||
image | string | The image URL shared on this network. Unlike the block's own messageImage, this only accepts a plain URL string - it is not uploaded to our CDN |
Setting any of title, description, url or image for a network automatically sets that network's isOverwriteValuesEnabled to true. Unknown network names are rejected. networkConfigs is applied after networks, so you can enable a set of networks with the simple list and then refine individual ones.
Example:
{
"type": "Share",
"networks": ["facebook", "linkedin"],
"networkConfigs": {
"linkedin": {
"title": "I scored 9/10 - can you beat me?",
"url": "https://www.your-website.com/quiz"
}
}
}
Available social networks
The following social networks are available to share on (make sure to use the same casing!):
- buffer
- evernote
- instapaper
- line
- messenger
- odnoklassniki
- skype
- sms
- telegram
- tumblr
- viber
- vk
- yammer
Add answered blocks
Displays a block that shows the user what they answered and how many votes each answer got (if enabled).
Properties
| Property | Required | Type | Description | Default |
|---|---|---|---|---|
type | ✓ | string | Set to AnsweredBlocks | |
areTotalVotesVisible | boolean | If true the total number of votes will be displayed | false | |
isPercentageVisible | boolean | If true the percentage of votes will be displayed | true | |
isVotesNumberVisible | boolean | If true the number of votes will be displayed | false | |
areAnswerImagesHidden | boolean | If true the images of the answers will be hidden | false | |
areMainImagesHidden | boolean | If true the main images will be hidden | false | |
areTitlesHidden | boolean | If true the question titles will be hidden | false | |
areChoicesSortedByVote | boolean | If true the answer options are sorted by how many votes they got instead of their original order | false | |
isRightWrongMsgEnabled | boolean | Quiz: if true a "correct"/"incorrect" message is shown per question | false | |
isRightWrongVisualEnabled | boolean | Quiz: if true correct and incorrect answers are highlighted visually | false |
Example
{
"type": "AnsweredBlocks",
"areTotalVotesVisible": true
}
Add image
Displays an image, a video, or embedded social media content.
Properties
| Property | Required | Type | Description | Default |
|---|---|---|---|---|
type | ✓ | string | Set to Media | |
media | ✓ | string|object | The media to display. See Use media | |
mediaFit | string | How the media fills the block: Cover (crop to fill) or Contain (fit entirely) | Cover | |
isBlurredBgEnabled | boolean | Whether a blurred copy of the media fills the empty space around it | true |
Example
{
"type": "Media",
"media": "https://httpbin.io/image/jpeg",
"mediaFit": "Contain"
}
Add leaderboard
Add a leaderboard to the result page.
Properties
| Property | Required | Type | Description | Default |
|---|---|---|---|---|
type | ✓ | string | Set to Leaderboard | |
leaderboard | ✓ | string | The UUID of the leaderboard you want to connect | |
isTitleVisible | boolean | Whether the leaderboard's title is shown above the entries | false | |
isShareButtonVisible | boolean | Whether visitors can share their leaderboard entry | false |
Example
{
"type": "Leaderboard",
"leaderboard": "hQ3SYWur"
}
Note: The leaderboard has to satisfy two conditions, and both are checked while the build runs:
- it must already be published - a leaderboard that only exists as a draft is rejected with
Leaderboard hQ3SYWur is not published, so publish it (or build it with"publish": true) before referencing it here, and - the Riddle you are building must be connected to it, otherwise the build is rejected with
Leaderboard hQ3SYWur is not connected to Riddle abcdef12.
The connection is configured in build.leaderboard.connections of this Riddle, or from the leaderboard's side via riddleConnections - see Create and connect to Leaderboard. Sending both the connection and this block in one build configuration works: the connection is established before the result page is built.
Add popular choices
Ranks the outcomes all respondents predicted, e.g. "63% picked Team A". Only available for predictors.
Properties
| Property | Required | Type | Description | Default |
|---|---|---|---|---|
type | ✓ | string | Set to PopularChoices | |
topChoicesCountSingleQuestion | integer | How many choices to rank when the predictor has a single question; 1 or more | 5 | |
topChoicesCountPerQuestion | integer | How many choices to rank per question when the predictor has several questions; 1 or more | 1 | |
showOtherChoicesSummary | boolean | Whether the remaining choices are summarized below the ranking | true |
Example
{
"type": "PopularChoices",
"topChoicesCountSingleQuestion": 3,
"showOtherChoicesSummary": false
}
Add winning personality
Displays the user's winning personality. Only available for personality tests.
Properties
| Property | Required | Type | Description | Default |
|---|---|---|---|---|
type | ✓ | string | Set to WinningPersonality | |
showMedia | boolean | If true the media of the personality will be displayed | true | |
format | string | The format in which the personality will be displayed. Valid values: PercentageTitle, TitlePercentage, PointsTitle, TitlePoints, Title | PercentageTitle | |
mediaOrientation | string | How that media is cropped: Settings, Wide, Square, Tall, or Original | Settings |
Example
{
"type": "WinningPersonality",
"showMedia": true,
"format": "Title"
}
Add other personalities
Displays the other personalities. Only available for personality tests.
Properties
| Property | Required | Type | Description | Default |
|---|---|---|---|---|
type | ✓ | string | Set to OtherPersonalities | |
format | string | The format in which the personalities will be displayed. Valid values: PercentageTitle, TitlePercentage, PointsTitle, TitlePoints, Title | TitlePercentage | |
count | integer | The number of personalities to display; 1 or more. Only applies when isShowAllEnabled is false | 2 | |
isShowAllEnabled | boolean | If true all personalities are shown and count is ignored | true | |
layout | string | The layout in which the personalities will be displayed. Valid values: FullWidth, TwoColumns | TwoColumns | |
includeWinningPersonality | boolean | If true the winning personality will also be displayed | false | |
mediaOrientation | string | How the personalities' media is cropped: Settings, Wide, Square, Tall, or Original | Settings |
Example
{
"type": "OtherPersonalities",
"format": "Title",
"count": 3,
"layout": "FullWidth",
"includeWinningPersonality": false
}
Add attributes
Displays a bar per Personality attribute with its score. Only available for personality tests.
Properties
| Property | Required | Type | Description | Default |
|---|---|---|---|---|
type | ✓ | string | Set to Attributes | |
areAllAttributesVisible | boolean | If true every attribute is shown and count is ignored | false | |
count | integer | How many top attributes to display; 1 or more. Only applies when areAllAttributesVisible is false | ||
format | string | The format in which each attribute is displayed. Valid values: PercentageTitle, TitlePercentage, PointsTitle, TitlePoints, Title | ||
layout | string | The layout in which the attributes are displayed. Valid values: FullWidth, TwoColumns | ||
mediaOrientation | string | How the attributes' media is cropped: Settings, Wide, Square, Tall, or Original | Settings |
Example
{
"type": "Attributes",
"format": "Title",
"count": 3,
"layout": "FullWidth"
}
Add recommended content
Displays other Riddles the visitor might want to check out next. You can either pick the Riddles yourself, or have them selected dynamically by type/tag.
Properties
| Property | Required | Type | Description | Default |
|---|---|---|---|---|
type | ✓ | string | Set to RecommendedContent | |
title | string | The block's own title | ||
selectionMode | string | Manual (you pick the Riddles yourself via selectedRiddles) or Conditions (Riddles are selected dynamically via riddleTypes/tags/sortBy/amount) | ||
selectedRiddles | string | Manual only: 1-10 UUIDs of published Riddles you own | ||
riddleTypes | string | Conditions only: limit to these Riddle types; omit or send an empty array for "every type" | ||
tags | (integer|string) | Conditions only: limit to Riddles carrying at least one of these tags, each given as a tag ID or a tag name | ||
sortBy | string | Conditions only: how the matching Riddles are sorted | ||
amount | integer | Conditions only: how many Riddles to show, 1-10 | ||
showMedia | boolean | Whether each Riddle's media is shown | true | |
showTitle | boolean | Whether each Riddle's title is shown | true | |
displayMode | string | How the Riddles are laid out |
Note: selectionMode and its matching properties form two strictly separate sets - Manual only ever reads selectedRiddles, Conditions only ever reads riddleTypes/tags/sortBy/amount. This is enforced, not just gated for display:
- As soon as you send any property from either set, you must also send
selectionModeexplicitly (set toManualorConditions) - it is never inferred from what else you sent. - Sending a property that belongs to the other mode than the one you selected is rejected outright.
- In
Manualmode,selectedRiddlesmust be a non-empty list - an empty selection would show nothing.
Each selectedRiddles UUID must belong to a Riddle you (or your team) own and that is currently published; an unpublished, missing, or foreign Riddle is rejected.
Each tags entry must be an existing tag of the same scope as the Riddle you are building - your team's tags for a team Riddle, your own otherwise. Send either the numeric tag ID or the tag name; a tag that does not exist, or belongs to someone else, is rejected (a build never creates a tag), and naming the same tag twice is rejected as well. Tags always read back as their numeric IDs, which - unlike a name two tags could share - are unambiguous. If a tag is deleted later, reading the Riddle back leaves it out and reports a warning; sending that build configuration back therefore also removes it from the stored filter.
Example: manual results
{
"type": "RecommendedContent",
"title": "You might also like",
"selectionMode": "Manual",
"selectedRiddles": ["hQ3SYWur", "aB1cDeFg"]
}
Example: conditional results
{
"type": "RecommendedContent",
"title": "More quizzes",
"selectionMode": "Conditions",
"riddleTypes": ["Quiz"],
"tags": ["Summer"],
"amount": 3
}
Offset any block with margins
If you want to create a gap between two result page builder blocks, e.g. to emphasize a certain block, you can use margins to better position the blocks.
Note: The margin does not work with pixel values! Instead we use the coordinate system just as in the Creator to position the blocks. This means that setting "marginTop: 2" will result in a block offset by two units. We recommend you play around and see what works best for your design.
Properties
| Property | Required | Type | Description | Default |
|---|---|---|---|---|
marginTop | integer | The margin at the top of the block; 0-10 | 0 | |
marginBottom | integer | The margin at the bottom of the block; 0-10 | 0 |
Both are accepted on every result page block type.
Example
{
"type": "Text",
"text": "This is my result page text!",
"marginTop": 2,
"marginBottom": 2
}
Full example
A poll with an advanced result page built into it: a text, the answered blocks with their total votes, an image and a button back to your site.
{
"type": "Poll",
"build": {
"title": "Pasta poll",
"blocks": [
{
"type": "SingleChoice",
"title": "Spaghetti or Fusilli?",
"items": [
{ "title": "Spaghetti" },
{ "title": "Fusilli" }
]
}
],
"result": {
"blocks": [
{
"type": "Text",
"text": "Thanks for voting!"
},
{
"type": "AnsweredBlocks",
"areTotalVotesVisible": true
},
{
"type": "Media",
"media": "https://httpbin.io/image/png",
"mediaFit": "Contain"
},
{
"type": "Button",
"label": "Back to the blog",
"url": "https://riddle.com"
}
]
}
}
}

