diff --git a/README.md b/README.md
index c4a4f8a..effeb27 100644
--- a/README.md
+++ b/README.md
@@ -25,12 +25,14 @@ import formbricks from "@formbricks/js";
if (typeof window !== "undefined") {
formbricks.setup({
- environmentId: "your-environment-id",
+ workspaceId: "your-workspace-id",
appUrl: "https://app.formbricks.com",
});
}
```
-Replace your-environment-id with your actual environment ID. You can find your environment ID in the **Setup Checklist** in the Formbricks settings. If you want to use the user identification feature, please check out [our docs for details](https://formbricks.com/docs/app-surveys/user-identification).
+Replace your-workspace-id with your actual workspace ID. You can find your workspace ID in the **Setup Checklist** in the Formbricks settings. If you want to use the user identification feature, please check out [our docs for details](https://formbricks.com/docs/app-surveys/user-identification).
+
+> `environmentId` is still accepted for backward compatibility but is deprecated and will be removed in a future version. Prefer `workspaceId`.
For more detailed guides for different frameworks, check out our [Framework Guides](https://formbricks.com/docs/getting-started/framework-guides).
diff --git a/apps/playground/.env.example b/apps/playground/.env.example
index 2581d17..eb1614c 100644
--- a/apps/playground/.env.example
+++ b/apps/playground/.env.example
@@ -1,2 +1,2 @@
VITE_FORMBRICKS_API_HOST=http://localhost:3000
-VITE_FORMBRICKS_ENVIRONMENT_ID=YOUR-ENVIRONMENT-ID
+VITE_FORMBRICKS_WORKSPACE_ID=YOUR-WORKSPACE-ID
diff --git a/apps/playground/README.md b/apps/playground/README.md
index 7becf37..1ce1ed1 100644
--- a/apps/playground/README.md
+++ b/apps/playground/README.md
@@ -13,11 +13,13 @@ pnpm install
1. Create a `.env` file with your Formbricks credentials:
```env
-VITE_FORMBRICKS_ENVIRONMENT_ID=your-environment-id
+VITE_FORMBRICKS_WORKSPACE_ID=your-workspace-id
VITE_FORMBRICKS_API_HOST=https://app.formbricks.com
```
-You can find your environment ID in the Formbricks app under Settings → Setup.
+Replace your-workspace-id with your actual workspace ID. You can find your workspace ID in the **Connections instructions** in the Formbricks **Configuration** pages.
+
+> `environmentId` / `VITE_FORMBRICKS_ENVIRONMENT_ID` is still accepted for backward compatibility but is deprecated and will be removed in a future version. Prefer `workspaceId`.
1. Start the development server:
diff --git a/apps/playground/src/app.tsx b/apps/playground/src/app.tsx
index 314dfc0..ccdd366 100644
--- a/apps/playground/src/app.tsx
+++ b/apps/playground/src/app.tsx
@@ -24,8 +24,8 @@ export default function App(): React.JSX.Element {
}
const missingEnvVars = [
- !import.meta.env.VITE_FORMBRICKS_ENVIRONMENT_ID
- ? "VITE_FORMBRICKS_ENVIRONMENT_ID"
+ !import.meta.env.VITE_FORMBRICKS_WORKSPACE_ID
+ ? "VITE_FORMBRICKS_WORKSPACE_ID"
: null,
!import.meta.env.VITE_FORMBRICKS_API_HOST
? "VITE_FORMBRICKS_API_HOST"
@@ -34,7 +34,7 @@ export default function App(): React.JSX.Element {
if (missingEnvVars.length === 0) {
formbricks.setup({
- environmentId: import.meta.env.VITE_FORMBRICKS_ENVIRONMENT_ID,
+ workspaceId: import.meta.env.VITE_FORMBRICKS_WORKSPACE_ID,
appUrl: import.meta.env.VITE_FORMBRICKS_API_HOST,
});
} else {
@@ -79,11 +79,11 @@ export default function App(): React.JSX.Element {
- You're connected with env: + You're connected with workspace: