Preset settings

With the preset settings you can define what preset and which palette should be used.

Default settings

If no preset setting is specified and the Riddle is created in a project (!) the default preset and its selected palette will be used for the built Riddle.

Click here to learn how to set a default preset for your project.

Properties & example

You can specify the following optional properties:

  • presetId: the ID of the preset you want to use.
  • palette: the ID of the palette you wanty to use. by default the palette of the preset is used.

To obtain any IDs from the Riddle Creator, you can use the Builder API presets endpoint to get the list of presets and palettes. An example response of this endpoint looks like this:

{
    "success": true,
    "code": 200,
    "data": [
        {
            "id": 805,
            "name": "My project preset",
            "palettes": [
                {
                    "id": "Zymx",
                    "name": "my palette"
                }
            ]
        }
    ]
}

The preset settings properties are sent in the preset property of the build object. If we now want to use the preset and palette from the response above the request would look like this:

{
    "blocks": [...],
    "preset": {
        "presetId": 805,
        "palette": "Zymx"
    }
}