Build Foolproof Integrations: Introducing Mandatory Layers for the API!
Shared by Guillaume
• July 30, 2025
Hi there,
For everyone building powerful workflows on top of our API, we know that data integrity is everything. That’s why we’re launching a new feature designed to make your automations more robust and error-proof: Mandatory Layers.
You can now designate specific layers in your templates as "mandatory." This acts as a powerful safeguard, ensuring that critical data is never missed during an API generation, preventing accidental generations with placeholder content.
What's New?
-
Enforce Required Fields: When a layer is marked as mandatory, our API will require that you provide a new value for it in every single generation call. The template's default value will not be accepted, guaranteeing each visual is populated correctly.
-
Clear & Actionable Error Responses: If you attempt a generation without providing data for a mandatory layer, the API will return a
422
error with a clear message, making debugging your integration a breeze.
Invalid parameters: elements.layer_name.payload: Mandatory field is required. Default value is: [default value]
-
Programmatic Discovery: You can now easily identify which layers need to be filled. When querying the API for design details, each layer's data will include a
settings
object with an is_mandatory
flag.
How to Use It?
1. Configure the setting in the editor:
- Open your design and navigate to Design Settings on the left.
- Go to the "Layer Configuration" section.
- Select the layer you wish to enforce from the list.
- Enable the option: "Mark Layer as Mandatory (API Generation Only)".
- Save your settings.
2. Implement the logic in your code:
- Query the design details endpoint to check for layers where
is_mandatory
is true
.
- When calling the generation endpoint, ensure you are always passing a new value for each mandatory layer to avoid errors.
This feature is designed to give you more control and confidence when generating visuals at scale. Build smarter, more reliable automations today!