curl --request GET \
--url https://{baseurl}/api/v1/client/{environmentId}/environment{
"data": {
"actionClasses": [
{
"id": "cm6orqtdd000b19wjec82bpp2",
"key": null,
"name": "New Session",
"noCodeConfig": null,
"type": "automatic"
},
{
"id": "cm6oryki3000i19wj860utcnn",
"key": "code",
"name": "code action",
"noCodeConfig": null,
"type": "code"
}
],
"project": {
"clickOutsideClose": true,
"darkOverlay": false,
"id": "cm6orqtcl000319wj9wb7dltl",
"inAppSurveyBranding": true,
"placement": "bottomRight",
"recontactDays": 7,
"styling": {
"allowStyleOverwrite": true,
"brandColor": {
"light": "#64748b"
}
}
},
"surveys": [
{
"autoClose": null,
"delay": 0,
"displayLimit": 5,
"displayOption": "respondMultiple",
"displayPercentage": null,
"endings": [
{
"buttonLabel": "Create your own Survey",
"buttonLink": "https://formbricks.com",
"headline": "Thank you!",
"id": "o729tod5klhix62njmk262dk",
"subheader": "We appreciate your feedback.",
"type": "endScreen"
}
],
"hiddenFields": {
"enabled": true,
"fieldIds": [
"<string>"
]
},
"id": "cm6orr901000g19wjwwa690eo",
"languages": [
"<string>"
],
"name": "Start from scratch",
"questions": [
{
"buttonLabel": "Next",
"charLimit": false,
"headline": "What would you like to know?",
"id": "dd5c8w2a4ttkbnjb9nwhtb17",
"inputType": "text",
"placeholder": "Type your answer here...",
"required": true,
"type": "openText"
}
],
"recontactDays": 0,
"segment": {
"createdAt": "2025-02-03T08:08:33.377Z",
"description": null,
"filters": [
"<string>"
],
"id": "cm6orr90h000h19wj1lnwoxwg",
"isPrivate": true,
"title": "cm6orr901000g19wjwwa690eo",
"updatedAt": "2025-02-03T08:08:33.377Z"
},
"showLanguageSwitch": null,
"status": "inProgress",
"styling": null,
"triggers": [
{
"actionClass": "code action"
}
],
"type": "app",
"variables": [
"<string>"
],
"welcomeCard": {
"buttonLabel": "Next",
"enabled": false,
"headline": "Welcome!",
"html": "Thanks for providing your feedback - let's go!",
"showResponseCount": false,
"timeToFinish": false
}
}
]
}
}Retrieves the environment state to be used in Formbricks SDKs Cache Behavior: This endpoint uses server-side caching with a 5-minute TTL (Time To Live). Any changes to surveys, action classes, project settings, or other environment 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.
curl --request GET \
--url https://{baseurl}/api/v1/client/{environmentId}/environment{
"data": {
"actionClasses": [
{
"id": "cm6orqtdd000b19wjec82bpp2",
"key": null,
"name": "New Session",
"noCodeConfig": null,
"type": "automatic"
},
{
"id": "cm6oryki3000i19wj860utcnn",
"key": "code",
"name": "code action",
"noCodeConfig": null,
"type": "code"
}
],
"project": {
"clickOutsideClose": true,
"darkOverlay": false,
"id": "cm6orqtcl000319wj9wb7dltl",
"inAppSurveyBranding": true,
"placement": "bottomRight",
"recontactDays": 7,
"styling": {
"allowStyleOverwrite": true,
"brandColor": {
"light": "#64748b"
}
}
},
"surveys": [
{
"autoClose": null,
"delay": 0,
"displayLimit": 5,
"displayOption": "respondMultiple",
"displayPercentage": null,
"endings": [
{
"buttonLabel": "Create your own Survey",
"buttonLink": "https://formbricks.com",
"headline": "Thank you!",
"id": "o729tod5klhix62njmk262dk",
"subheader": "We appreciate your feedback.",
"type": "endScreen"
}
],
"hiddenFields": {
"enabled": true,
"fieldIds": [
"<string>"
]
},
"id": "cm6orr901000g19wjwwa690eo",
"languages": [
"<string>"
],
"name": "Start from scratch",
"questions": [
{
"buttonLabel": "Next",
"charLimit": false,
"headline": "What would you like to know?",
"id": "dd5c8w2a4ttkbnjb9nwhtb17",
"inputType": "text",
"placeholder": "Type your answer here...",
"required": true,
"type": "openText"
}
],
"recontactDays": 0,
"segment": {
"createdAt": "2025-02-03T08:08:33.377Z",
"description": null,
"filters": [
"<string>"
],
"id": "cm6orr90h000h19wj1lnwoxwg",
"isPrivate": true,
"title": "cm6orr901000g19wjwwa690eo",
"updatedAt": "2025-02-03T08:08:33.377Z"
},
"showLanguageSwitch": null,
"status": "inProgress",
"styling": null,
"triggers": [
{
"actionClass": "code action"
}
],
"type": "app",
"variables": [
"<string>"
],
"welcomeCard": {
"buttonLabel": "Next",
"enabled": false,
"headline": "Welcome!",
"html": "Thanks for providing your feedback - let's go!",
"showResponseCount": false,
"timeToFinish": false
}
}
]
}
}The ID of the environment
HTTP Status 200
Show child attributes
[
{
"id": "cm6orqtdd000b19wjec82bpp2",
"key": null,
"name": "New Session",
"noCodeConfig": null,
"type": "automatic"
},
{
"id": "cm6oryki3000i19wj860utcnn",
"key": "code",
"name": "code action",
"noCodeConfig": null,
"type": "code"
}
]Show child attributes
true
false
"cm6orqtcl000319wj9wb7dltl"
true
"bottomRight"
7
List of surveys in the environment
Show child attributes
null
0
5
"respondMultiple"
null
Show child attributes
"Create your own Survey"
"https://formbricks.com"
"Thank you!"
"o729tod5klhix62njmk262dk"
"We appreciate your feedback."
"endScreen"
"cm6orr901000g19wjwwa690eo"
"Start from scratch"
Show child attributes
"Next"
false
"What would you like to know?"
"dd5c8w2a4ttkbnjb9nwhtb17"
"text"
"Type your answer here..."
true
"openText"
0
Show child attributes
"2025-02-03T08:08:33.377Z"
null
"cm6orr90h000h19wj1lnwoxwg"
true
"cm6orr901000g19wjwwa690eo"
"2025-02-03T08:08:33.377Z"
null
"inProgress"
null
"app"
Show child attributes
"Next"
false
"Welcome!"
"Thanks for providing your feedback - let's go!"
false
false
Was this page helpful?