Before you begin
Tools
jqandcurl
Security bundle
Downloadsecurity-bundle.zip from the Sutro Console during onboarding. Extract it and run all commands from that directory. The bundle includes your API client credentials (apiClient.id, mtls.key, mtls.crt), the Sutro CA certificate (ca.crt), and a pre-generated Builder JWT (builder.jwt) valid for 7 days.
Verify your connection
Test that your credentials work by calling the hello endpoint:Steps
Ship-ready bundles take a few deliberate moves, and each step keeps you in control of inputs and outputs throughout the journey.Create a new project
project.json; refer to that file in upcoming steps.Create an application
application.json; refer to that file in upcoming steps.List Figma pages and frames
Retrieve the structure of your Figma file to locate frame IDs for code generation.Replace:
<FIGMA_URL>: your Figma file link (e.g.https://www.figma.com/design/abc123/MyFile)<FIGMA_PAT>: your Figma personal access token
Generate code from a Figma frame
Trigger the code generation for a specific frame in your Figma file.Replace:The request creates a background job.
<FIGMA_FILE_KEY>: from your Figma URL (/file/<key>/...)<FRAME_ID>: from step 3<FIGMA_PAT>: your Figma personal access token
Check generation status
Poll the application status endpoint to monitor the generation progress.Possible responsesStatus: Generating (Application generation in progress)Status: Active (Generation complete)The application is ready. Proceed to step 6 to download the bundle.Status: Failed (Generation failed)
Download the web bundle
Once the application status is Response
Active, download the generated code as a zip file.- Content-Type:
application/zip - Content-Disposition:
attachment; filename="application-<APPLICATION_ID>-web-bundle.zip" - Body: Binary zip file containing the generated HTML, CSS, and assets
You now have an exportable frontend bundle. Unzip it, drop it into your hosting pipeline, and show it off!