Environment Manager

Every project has three environments — mock, staging, and production. Switch between them with one click. Every code output and shareable link reflects the active environment automatically.

What environments do

Each environment stores a base URL for your API. When you switch environments, the base URL used in your generated hooks and the shareable contract link updates to match. Your team always builds against the right backend without manually editing URLs.

Environment Manager — your project
Environments

Mock        https://invokix.com/mock/your-project-id       Active
Staging     https://staging.api.yourcompany.com
Production  https://api.yourcompany.com

Adding environments

Go to your project and open the Environments tab. Click Add Environment. Give it a name and a base URL. Set it as default if you want it to be the active environment for new team members.

You can add as many environments as you need — mock, staging, production, preview, local, or any custom environment your team uses.

Switching environments

Click the environment name to make it active. All generated code outputs update immediately to use the new base URL. The shareable contract link updates too — so external partners always see the correct endpoint URLs.

Generated hooks use your active environment

When you generate React Query hooks or React Native hooks, the base URL in the generated file reflects your active environment:

Generated hooks — staging environment active
// Base URL reflects your active environment
const BASE_URL = "https://staging.api.yourcompany.com"

export function useGetOrders() {
return useQuery({
  queryKey: orderKeys.list(),
  queryFn: async () => {
    const res = await fetch(BASE_URL + "/orders")
    if (!res.ok) throw new Error("Failed to fetch orders")
    return res.json()
  },
})
}

Next steps