Made in Builder.io

Join us for an AI launch event by

Builder.io and Figma
Talk to Us
Product
Developers
Talk to Us

Blog

Home

Resources

Blog

Forum

Github

Login

Signup

×

Visual CMS

Drag-and-drop visual editor and headless CMS for any tech stack

Theme Studio for Shopify

Build and optimize your Shopify-hosted storefront, no coding required

Resources

Blog

Get StartedLogin

in beta

enterprise plans

When using environments, you can integrate your code with any of your environments. This document covers how to integrate with an environment other than your main environment.

To get the most out of this document, ensure you already have an environment in addition to your main environment.

For detailed instructions, read Setting Up Environments.

This section covers how to update the Preview URL for a model in an environment.

Notice that when you change the Preview URL in one existing environment, it does not affect the Preview URL on the same model in another environment.

Tip: The recommended workflow is to update non-main Preview URLs, even if the model is linked.

In the environment, modify the Preview URL to reflect the correct URL.

  1. In the non-main environment you're integrating, go to Models.
  2. Change the model* Preview URL to the appropriate location—for example, http://localhost:####, where #### is your port, such as 3000—for local development.
  3. Click the Update Preview URL button.

*As an example, if you're developing Pages, change the Page model Preview URL.

For more detail on Preview URLs, read Editing and Previewing your Site.

To get the API key for the environment that you'd like to integrate with:

  1. Go to the main Account Settings > Environments.
  2. Select and copy the API Key for the environment you want to integrate with.
  3. In your code, replace the API Key of the main environment with the API key of the child environment.
  4. Deploy the codebase to the relevant URL using the updated API key.

If you are running the environment locally, no deployment is required. However, if the environment has a specific URL—for example, dev.my-url.com— remember to deploy the changes.

For more detailed information on API Keys in general, read Using Builder API Keys.


Looking to hire a third party to help with your project?

Submit a project request and our partnerships team will reach out to connect you with an Expert from our partner ecosystem.

Connect with us

Was this article helpful?

Product

Visual CMS

Theme Studio for Shopify

Sign up

Login

Featured Integrations

React

Angular

Next.js

Gatsby

Get In Touch

Chat With Us

Twitter

Linkedin

Careers

© 2020 Builder.io, Inc.

Security

Privacy Policy

Terms of Service

Get the latest from Builder.io

Developer Newsletter

Latest tips, tricks, and news for frontend developers from our blog

Product Newsletter

Latest features and updates on the Builder.io platform

By submitting, you agree to our Privacy Policy

Product

Features

Pricing

What's New

Developers

Builder for Developers

Developer Docs

Open Source Projects

Performance Insights

Headless CMS: Visual Guide

Resources

Documentation

Blog

Community Forum

Templates

Partners

Submit an Idea

Use Cases

Landing Pages

Headless CMS

Headless Storefront

Customer Showcase

Customer Success Stories

Builder.io logo

Visually build and optimize digital experiences on any tech stack. No coding required, and developer approved.

Get Started

Log In

Product

Features

Pricing

Integrations

React.js

Next.js

Gatsby

Angular

Vue

Nuxt

Hydrogen

Salesforce

All Integrations

Use Cases

© 2023 Builder.io, Inc.

Security

Privacy Policy

SaaS Terms