multiple environments (staging, development, production)

My company is using the HobSpot API just for contact & company sync of our account.

I’m able to get API key for production environment data and integrate it with our BE. But we also have Staging and Development environments with copletly different data.

I want to ask what is the recommended flow. Shoud I create 3 independent HobSpot accounts and import different data

Or is there way to have one account with different data for different enviroments.

Note: I do understannd there is Testing Account option but from playing around it seems the Testing Account works with real data => not good for my case

Note 2: I think I don’t need to create an App all I need is the API key to pull/push contacts/companies. Unless I’m wrong

Hey @tomas1,

Currently, while we do not have a sandbox environment in which the data replicates the real environment data, the test account that you mentioned is the best workaround.

Test portals created from the developer account would also have access to the CRM tool, so if you’re looking for a completely separate environment, you could use a test portal to create dummy CRM data.

How are others solving this when they need to replicate production data? This seems like a big miss as HubSpot takes on enterprises with staging and real sandbox environments for testing integrations.

@khamer ,

Totally understand and agree. We are working on it :wink:

@dennisedson Hubspot has any timeline for this feature? Until then any workround to replicate production setup in test portal?

@br6

Reducing friction for the developers is very important to us. I don’t have any timeline available at this point, but I want to reiterate that we are actively working to improve the development workflow.

@dbeau79 , what does your team do now to make this as efficient as possible?

Thanks for the reply. I would like to know if Hubspot has any suggested approach(workaround) to fulfil this at the moment?

@br6 ,

HubSpot does not have any suggested solutions for this presently. There are apps on the marketplace such as portal replicator that can get the CRM data into another portal. If you are using a local dev workflow for the CMS, you should be keeping portability in mind which will allow you to move your files where needed as detailed here

@dennisedson and @br6 , sorry for chiming in so late here. On our dev team we each have our own sandbox that we import dummy content into to test things out. We all develop locally so it’s easy to collaborate once the data set is in place.

is there a way to take an existing site in production, move it to staging, do a bunch of changes, etc. and then QA it. when done, flip it back to production?

@dennisedson plus 1Xing this. As a director of engineering I would not ever choose an enterprise product that doesn’t seamlessly support transitions between development / staging / production environments. Unfortunately I arrived after this decision was made and am stuck with it for now.
Stripe and Intercom are great examples to look at. Each provides development and production keys which winds up being one line of code in our system. Our engineers don’t need to jusmp through any hoops and can focus on develping features without any worry of either environment polluting the other.
We are very hopeful that Hubspot can make this happen soon, but we are also acttivel shopping other solutions.

Hello! Any updates on this at all? This would be such a godsend for us.

Even something like Stripe (which generates a second API token) to differentiate “test data” from real data would be hugely interesting and powerful for us — rather than breaking it out into multiple envs.

Three years later and still no reply and update from Hubspot. Is there any timeline planned for this feature?

Hi @AMatthies and welcome, we are so glad to have you here!
Thanks for reaching out to the HubSpot Community!
To reply to @tomas1’s questions: Yes, you should create 3 independent HubSpot accounts for your staging, development, and production environments.
HubSpot doesn’t support multiple data environments within a single account for your use case.

The recommended approach is:

- 3 separate standard HubSpot accounts with different API keys/authentication for each environment
- Each account maintains completely isolated data
- Use different API keys to connect your backend to each environment
Note on Testing Accounts: You’re correct that HubSpot’s testing accounts (developer test accounts) work with real production data and aren’t suitable for isolated staging/dev environments.

About creating an App: For simple contact/company sync, you don’t need to create a full App. You can use API keys or private app access tokens directly for authentication.
Here are some resources for you:
- Test your HubSpot apps with configurable test accounts
- HubSpot Account Types
- Authentication overview
Which test would you like to perform on multiple environments @AMatthies, please?
Thanks and have a lovely day!
Bérangère
This post was created with the assistance of AI tools.