Skip to main content
GET
/
api
/
v1
/
client
/
{environmentId}
/
environment
Get Environment State
curl --request GET \
  --url 'http://{{baseurl}}/api/v1/client/{environmentId}/environment'
import requests

url = "http://{{baseurl}}/api/v1/client/{environmentId}/environment"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('http://{{baseurl}}/api/v1/client/{environmentId}/environment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "http://{{baseurl}}/api/v1/client/{environmentId}/environment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "http://{{baseurl}}/api/v1/client/{environmentId}/environment"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("http://{{baseurl}}/api/v1/client/{environmentId}/environment")
.asString();
require 'uri'
require 'net/http'

url = URI("http://{{baseurl}}/api/v1/client/{environmentId}/environment")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "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://feedbackflowhq.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
        }
      }
    ]
  }
}
{
"code": "not_found",
"details": {
"resource_id": "tpywklouw2p7tebdu4zv01an",
"resource_type": "environment"
},
"message": "Environment not found"
}
{
"code": "internal_server_error",
"details": {},
"message": "Unable to complete request: Expected property name or '}' in JSON at position 29"
}

Path Parameters

environmentId
string
required

The ID of the environment

Response

HTTP Status 200

data
object