Skip to main content
GET
/
api
/
v1
/
management
/
responses
Get Survey Responses
curl --request GET \
  --url https://{baseurl}/api/v1/management/responses \
  --header 'x-api-key: <x-api-key>'
import requests

url = "https://{baseurl}/api/v1/management/responses"

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

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

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

fetch('https://{baseurl}/api/v1/management/responses', 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://{baseurl}/api/v1/management/responses",
  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: <x-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://{baseurl}/api/v1/management/responses"

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

	req.Header.Add("x-api-key", "<x-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://{baseurl}/api/v1/management/responses")
  .header("x-api-key", "<x-api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://{baseurl}/api/v1/management/responses")

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

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

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "createdAt": "2024-04-23T08:03:32.901Z",
      "data": {
        "1": "clicked",
        "hs8yd14l9h8u353tjmv6rzaw": "clicked",
        "hs8yd14l9h8u353tjmv6rzawqqq": "clicked",
        "tcgls0063n8ri7dtrbnepcmz": "Who? Who? Who?",
        "tcgls012312312063n8ri7dtrbnepcmz": "Who? Who? Who?"
      },
      "finished": true,
      "id": "clvc3n6hy000u494jn2ypw30r",
      "language": null,
      "meta": {
        "action": "test action",
        "source": "Postman API",
        "url": "https://postman.com",
        "userAgent": {}
      },
      "person": {
        "attributes": {
          "Created From": "API",
          "created_from": "API"
        },
        "createdAt": "2024-04-23T07:39:22.696Z",
        "id": "clvc2s3ig000k494jltkqkm2u",
        "updatedAt": "2024-04-23T07:39:22.696Z",
        "userId": "THIS-IS-A-VVERY-LONG-USER-ID-FOR-TESTING",
        "workspaceId": "clurwouax000azffxt7n5unn3"
      },
      "personAttributes": {
        "Created From": "API",
        "created_from": "API"
      },
      "singleUseId": null,
      "surveyId": "clusgqpml0000135cxet3y8vh",
      "tags": [],
      "ttc": {},
      "updatedAt": "2024-04-23T08:14:12.343Z"
    },
    {
      "createdAt": "2024-04-23T08:00:01.151Z",
      "data": {
        "hs8yd14l9h8u353tjmv6rzaw": "clicked",
        "tcgls0063n8ri7dtrbnepcmz": "Who? Who? Who?"
      },
      "finished": false,
      "id": "clvc3in3z000t494j4wtax1oi",
      "language": null,
      "meta": {
        "userAgent": {}
      },
      "person": {
        "attributes": {
          "Created From": "API",
          "created_from": "API"
        },
        "createdAt": "2024-04-23T07:39:22.696Z",
        "id": "clvc2s3ig000k494jltkqkm2u",
        "updatedAt": "2024-04-23T07:39:22.696Z",
        "userId": "THIS-IS-A-VVERY-LONG-USER-ID-FOR-TESTING",
        "workspaceId": "clurwouax000azffxt7n5unn3"
      },
      "personAttributes": {
        "Created From": "API",
        "created_from": "API"
      },
      "singleUseId": null,
      "surveyId": "clusgqpml0000135cxet3y8vh",
      "tags": [],
      "ttc": {},
      "updatedAt": "2024-04-23T08:00:01.151Z"
    },
    {
      "createdAt": "2024-04-23T07:59:49.759Z",
      "data": {
        "hs8yd14l9h8u353tjmv6rzaw": "clicked",
        "tcgls0063n8ri7dtrbnepcmz": "Who? Who? Who?"
      },
      "finished": true,
      "id": "clvc3iebk000s494j37tq10o3",
      "language": null,
      "meta": {
        "userAgent": {}
      },
      "person": {
        "attributes": {
          "Created From": "API",
          "created_from": "API"
        },
        "createdAt": "2024-04-23T07:39:22.696Z",
        "id": "clvc2s3ig000k494jltkqkm2u",
        "updatedAt": "2024-04-23T07:39:22.696Z",
        "userId": "THIS-IS-A-VVERY-LONG-USER-ID-FOR-TESTING",
        "workspaceId": "clurwouax000azffxt7n5unn3"
      },
      "personAttributes": {
        "Created From": "API",
        "created_from": "API"
      },
      "singleUseId": null,
      "surveyId": "clusgqpml0000135cxet3y8vh",
      "tags": [],
      "ttc": {},
      "updatedAt": "2024-04-23T07:59:49.759Z"
    },
    {
      "createdAt": "2024-04-23T07:57:27.583Z",
      "data": {
        "hs8yd14l9h8u353tjmv6rzaw": "ho ho ho",
        "tcgls0063n8ri7dtrbnepcmz": "Who? Who? Who?"
      },
      "finished": true,
      "id": "clvc3fcm7000r494jgvs99mqa",
      "language": null,
      "meta": {
        "userAgent": {}
      },
      "person": {
        "attributes": {
          "Created From": "API",
          "created_from": "API"
        },
        "createdAt": "2024-04-23T07:39:22.696Z",
        "id": "clvc2s3ig000k494jltkqkm2u",
        "updatedAt": "2024-04-23T07:39:22.696Z",
        "userId": "THIS-IS-A-VVERY-LONG-USER-ID-FOR-TESTING",
        "workspaceId": "clurwouax000azffxt7n5unn3"
      },
      "personAttributes": {
        "Created From": "API",
        "created_from": "API"
      },
      "singleUseId": null,
      "surveyId": "clusgqpml0000135cxet3y8vh",
      "tags": [],
      "ttc": {},
      "updatedAt": "2024-04-23T07:57:27.583Z"
    },
    {
      "createdAt": "2024-04-23T07:56:59.441Z",
      "data": {
        "hs7yd14l9h8u353tjmv6rzaw": "clicked",
        "tcgls0063n8ri7dtrbnepcmz": "Who? Who? Who?"
      },
      "finished": true,
      "id": "clvc3eqwj000q494jali1xhzq",
      "language": null,
      "meta": {
        "userAgent": {}
      },
      "person": {
        "attributes": {
          "Created From": "API",
          "created_from": "API"
        },
        "createdAt": "2024-04-23T07:39:22.696Z",
        "id": "clvc2s3ig000k494jltkqkm2u",
        "updatedAt": "2024-04-23T07:39:22.696Z",
        "userId": "THIS-IS-A-VVERY-LONG-USER-ID-FOR-TESTING",
        "workspaceId": "clurwouax000azffxt7n5unn3"
      },
      "personAttributes": {
        "Created From": "API",
        "created_from": "API"
      },
      "singleUseId": null,
      "surveyId": "clusgqpml0000135cxet3y8vh",
      "tags": [],
      "ttc": {},
      "updatedAt": "2024-04-23T07:56:59.441Z"
    },
    {
      "createdAt": "2024-04-23T07:53:49.935Z",
      "data": {
        "hs8yd14l9h8u353tjmv6rzaw": "clicked",
        "tcgls0063n8ri7dtrbnepcmz": "Who? Who? Who?"
      },
      "finished": true,
      "id": "clvc3aool000p494jzjuukfzu",
      "language": null,
      "meta": {
        "userAgent": {}
      },
      "person": {
        "attributes": {
          "Created From": "API",
          "created_from": "API"
        },
        "createdAt": "2024-04-23T07:39:22.696Z",
        "id": "clvc2s3ig000k494jltkqkm2u",
        "updatedAt": "2024-04-23T07:39:22.696Z",
        "userId": "THIS-IS-A-VVERY-LONG-USER-ID-FOR-TESTING",
        "workspaceId": "clurwouax000azffxt7n5unn3"
      },
      "personAttributes": {
        "Created From": "API",
        "created_from": "API"
      },
      "singleUseId": null,
      "surveyId": "clusgqpml0000135cxet3y8vh",
      "tags": [],
      "ttc": {},
      "updatedAt": "2024-04-23T07:53:49.935Z"
    },
    {
      "createdAt": "2024-04-12T13:49:47.746Z",
      "data": {
        "hs8yd14l9h8u353tjmv6rzaw": "clicked",
        "inputType": "text",
        "tcgls0063n8ri7dtrbnepcmz": "fsef"
      },
      "finished": true,
      "id": "cluwq6352000klvz6t82e1oyt",
      "language": null,
      "meta": {
        "action": "New Session",
        "url": "http://localhost:3002/app?formbricksDebug=true",
        "userAgent": {
          "browser": "Chrome",
          "os": "Linux"
        }
      },
      "person": null,
      "personAttributes": null,
      "singleUseId": null,
      "surveyId": "clusgqpml0000135cxet3y8vh",
      "tags": [],
      "ttc": {
        "_total": 6908,
        "hs8yd14l9h8u353tjmv6rzaw": 4094.60000000149,
        "tcgls0063n8ri7dtrbnepcmz": 2813.39999999851
      },
      "updatedAt": "2024-04-12T13:53:24.650Z"
    },
    {
      "createdAt": "2024-04-12T13:09:54.616Z",
      "data": {
        "hs8yd14l9h8u353tjmv6rzaw": "clicked"
      },
      "finished": false,
      "id": "cluwoqsl4000ilvz6xmbaf5fl",
      "language": null,
      "meta": {
        "action": "New Session",
        "url": "http://localhost:3002/app?formbricksDebug=true",
        "userAgent": {
          "browser": "Chrome",
          "os": "Linux"
        }
      },
      "person": null,
      "personAttributes": null,
      "singleUseId": null,
      "surveyId": "clusgqpml0000135cxet3y8vh",
      "tags": [],
      "ttc": {},
      "updatedAt": "2024-04-12T13:09:54.616Z"
    },
    {
      "createdAt": "2024-04-12T13:09:19.823Z",
      "data": {
        "hs8yd14l9h8u353tjmv6rzaw": "clicked",
        "inputType": "text",
        "tcgls0063n8ri7dtrbnepcmz": "aaa"
      },
      "finished": true,
      "id": "cluwoq1qn000glvz6ntrzf3kc",
      "language": null,
      "meta": {
        "action": "New Session",
        "url": "http://localhost:3002/app?formbricksDebug=true",
        "userAgent": {
          "browser": "Chrome",
          "os": "Linux"
        }
      },
      "person": null,
      "personAttributes": null,
      "singleUseId": null,
      "surveyId": "clusgqpml0000135cxet3y8vh",
      "tags": [],
      "ttc": {
        "_total": 4311.599999997765,
        "hs8yd14l9h8u353tjmv6rzaw": 2231.199999999255,
        "tcgls0063n8ri7dtrbnepcmz": 2080.39999999851
      },
      "updatedAt": "2024-04-12T13:09:23.793Z"
    },
    {
      "createdAt": "2024-04-12T13:08:58.008Z",
      "data": {
        "hs8yd14l9h8u353tjmv6rzaw": "clicked"
      },
      "finished": false,
      "id": "cluwopkwr000dlvz6mxvueqm8",
      "language": null,
      "meta": {
        "action": "New Session",
        "url": "http://localhost:3002/app?formbricksDebug=true",
        "userAgent": {
          "browser": "Chrome",
          "os": "Linux"
        }
      },
      "person": null,
      "personAttributes": null,
      "singleUseId": null,
      "surveyId": "clusgqpml0000135cxet3y8vh",
      "tags": [],
      "ttc": {},
      "updatedAt": "2024-04-12T13:08:58.008Z"
    },
    {
      "createdAt": "2024-04-12T13:07:01.174Z",
      "data": {
        "hs8yd14l9h8u353tjmv6rzaw": "clicked"
      },
      "finished": true,
      "id": "cluwon2ra000clvz6pwo3b5g3",
      "language": null,
      "meta": {
        "action": "New Session",
        "url": "http://localhost:3002/app?formbricksDebug=true",
        "userAgent": {
          "browser": "Chrome",
          "os": "Linux"
        }
      },
      "person": null,
      "personAttributes": null,
      "singleUseId": null,
      "surveyId": "clusgqpml0000135cxet3y8vh",
      "tags": [],
      "ttc": {},
      "updatedAt": "2024-04-12T13:07:01.174Z"
    }
  ]
}

Headers

x-api-key
string
required

Query Parameters

surveyId
string

The ID of the survey to fetch responses for

limit
integer

Number of items to return

Required range: x >= 0
skip
integer

Number of items to skip

Required range: x >= 0

Response

200 - application/json

OK

The response is of type object.