> ## Documentation Index
> Fetch the complete documentation index at: https://formbricks.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Workspace State

> Retrieves the Workspace state to be used in Formbricks SDKs. Note - Environments are deprecated. Use Workspace/workspaceId terminology. **Cache Behavior**: This endpoint uses server-side caching with a **5-minute TTL (Time To Live)**. Any changes to surveys, action classes, Workspace settings, or other Workspace data will take up to 5 minutes to reflect in the API response. This caching is implemented to improve performance for high-frequency SDK requests.



## OpenAPI

````yaml /api-v2-reference/openapi.yml get /client/{workspaceId}/environment
openapi: 3.1.0
info:
  title: Formbricks API
  description: Manage Formbricks resources programmatically.
  version: 2.0.0
servers:
  - url: https://app.formbricks.com/api/v2
    description: Formbricks Cloud
security:
  - apiKeyAuth: []
tags:
  - name: Health
    description: Operations for checking critical application dependencies health status.
  - name: Roles
    description: Operations for managing roles.
  - name: Me
    description: Operations for managing your API key.
  - name: Management API - Responses
    description: Operations for managing responses.
  - name: Management API - Contacts
    description: Operations for managing contacts.
  - name: Management API - Contact Attributes
    description: Operations for managing contact attributes.
  - name: Management API - Contact Attribute Keys
    description: Operations for managing contact attribute keys.
  - name: Management API - Surveys
    description: Operations for managing surveys.
  - name: Management API - Surveys - Contact Links
    description: Operations for generating personalized survey links for contacts.
  - name: Management API - Webhooks
    description: Operations for managing webhooks.
  - name: Organizations API - Teams
    description: Operations for managing teams.
  - name: Organizations API - Workspace Teams
    description: Operations for managing Workspace teams.
  - name: Organizations API - Users
    description: Operations for managing users.
paths:
  /client/{workspaceId}/environment:
    get:
      tags:
        - Client API - Workspace
      summary: Get Workspace State
      description: >-
        Retrieves the Workspace state to be used in Formbricks SDKs. Note -
        Environments are deprecated. Use Workspace/workspaceId terminology.
        **Cache Behavior**: This endpoint uses server-side caching with a
        **5-minute TTL (Time To Live)**. Any changes to surveys, action classes,
        Workspace settings, or other Workspace data will take up to 5 minutes to
        reflect in the API response. This caching is implemented to improve
        performance for high-frequency SDK requests.
      parameters:
        - in: path
          name: workspaceId
          required: true
          schema:
            type: string
          description: The ID of the Workspace. Deprecated alias `environmentId`.
      responses:
        '200':
          content:
            application/json:
              example:
                workspaceId: ws_01h2xce9q8p3w4x5y6z7a8b9c0
                environmentId: env_01h2xce9q8p3w4x5y6z7a8b9c0
                state: active
              schema:
                type: object
          description: OK
      security: []
      servers:
        - url: https://app.formbricks.com/api/v2
          description: Formbricks Client
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Use your Formbricks x-api-key to authenticate.

````