Skip to main content
GET
/
management
/
responses
/
{id}
Get a response
curl --request GET \
  --url https://app.formbricks.com/api/v2/management/responses/{id} \
  --header 'x-api-key: <api-key>'
import requests

url = "https://app.formbricks.com/api/v2/management/responses/{id}"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://app.formbricks.com/api/v2/management/responses/{id}', 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 => "https://app.formbricks.com/api/v2/management/responses/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);

$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 := "https://app.formbricks.com/api/v2/management/responses/{id}"

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

req.Header.Add("x-api-key", "<api-key>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.formbricks.com/api/v2/management/responses/{id}")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.formbricks.com/api/v2/management/responses/{id}")

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

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "createdAt": "2021-01-01T00:00:00.000Z",
  "updatedAt": "2021-01-01T00:00:00.000Z",
  "finished": true,
  "surveyId": "<string>",
  "contactId": "<string>",
  "endingId": "<string>",
  "data": {
    "question1": "answer1",
    "question2": 2,
    "question3": [
      "answer3",
      "answer4"
    ],
    "question4": {
      "subquestion1": "answer5"
    }
  },
  "variables": {
    "variable1": "answer1",
    "variable2": 2
  },
  "ttc": {
    "question1": 10,
    "question2": 20
  },
  "meta": {
    "source": "https://example.com",
    "url": "https://example.com",
    "userAgent": {
      "browser": "Chrome",
      "os": "Windows",
      "device": "Desktop"
    },
    "country": "US",
    "action": "click"
  },
  "contactAttributes": {
    "attribute1": "value1",
    "attribute2": "value2"
  },
  "singleUseId": "<string>",
  "language": "en",
  "displayId": "<string>"
}

Authorizations

x-api-key
string
header
required

Use your Formbricks x-api-key to authenticate.

Path Parameters

id
string
required

The ID of the response

Response

200 - application/json

Response retrieved successfully.

id
string

The ID of the response

createdAt
string

The date and time the response was created

Example:

"2021-01-01T00:00:00.000Z"

updatedAt
string

The date and time the response was last updated

Example:

"2021-01-01T00:00:00.000Z"

finished
boolean

Whether the response is finished

Example:

true

surveyId
string

The ID of the survey

contactId
string | null

The ID of the contact

endingId
string | null

The ID of the ending

data
object

The data of the response

Example:
{
"question1": "answer1",
"question2": 2,
"question3": ["answer3", "answer4"],
"question4": { "subquestion1": "answer5" }
}
variables
object

The variables of the response

Example:
{ "variable1": "answer1", "variable2": 2 }
ttc
object

The TTC of the response

Example:
{ "question1": 10, "question2": 20 }
meta
object

The meta data of the response

Example:
{
"source": "https://example.com",
"url": "https://example.com",
"userAgent": {
"browser": "Chrome",
"os": "Windows",
"device": "Desktop"
},
"country": "US",
"action": "click"
}
contactAttributes
object | null

The attributes of the contact

Example:
{
"attribute1": "value1",
"attribute2": "value2"
}
singleUseId
string | null

The single use ID of the response

language
string | null

The language of the response

Example:

"en"

displayId
string | null

The display ID of the response