Get Survey Responses
curl --request GET \
--url https://api.doshi.app/client/user/survey-responses \
--header 'Access-Type: <access-type>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.doshi.app/client/user/survey-responses"
headers = {
"Access-Type": "<access-type>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Access-Type': '<access-type>', Authorization: 'Bearer <token>'}
};
fetch('https://api.doshi.app/client/user/survey-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://api.doshi.app/client/user/survey-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 => [
"Access-Type: <access-type>",
"Authorization: Bearer <token>"
],
]);
$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://api.doshi.app/client/user/survey-responses"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Access-Type", "<access-type>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.doshi.app/client/user/survey-responses")
.header("Access-Type", "<access-type>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.doshi.app/client/user/survey-responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Access-Type"] = '<access-type>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"responses": [
{
"id": "<string>",
"lessonId": "<string>",
"userId": "<string>",
"questionType": "<string>",
"questionId": "<string>",
"question": "<string>",
"answer": {},
"answerType": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"userAttributeKey": "<string>"
}
],
"total": 123
}{
"code": "<string>",
"message": "<string>",
"details": {}
}User
Get Survey Responses
Fetches survey response submissions. Returns answer submissions where answerType is ‘survey’.
GET
/
client
/
user
/
survey-responses
Get Survey Responses
curl --request GET \
--url https://api.doshi.app/client/user/survey-responses \
--header 'Access-Type: <access-type>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.doshi.app/client/user/survey-responses"
headers = {
"Access-Type": "<access-type>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Access-Type': '<access-type>', Authorization: 'Bearer <token>'}
};
fetch('https://api.doshi.app/client/user/survey-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://api.doshi.app/client/user/survey-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 => [
"Access-Type: <access-type>",
"Authorization: Bearer <token>"
],
]);
$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://api.doshi.app/client/user/survey-responses"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Access-Type", "<access-type>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.doshi.app/client/user/survey-responses")
.header("Access-Type", "<access-type>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.doshi.app/client/user/survey-responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Access-Type"] = '<access-type>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"responses": [
{
"id": "<string>",
"lessonId": "<string>",
"userId": "<string>",
"questionType": "<string>",
"questionId": "<string>",
"question": "<string>",
"answer": {},
"answerType": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"userAttributeKey": "<string>"
}
],
"total": 123
}{
"code": "<string>",
"message": "<string>",
"details": {}
}Authorizations
Authentication token (API Key) provided by Doshi. Your server's IP address must be whitelisted to use this API. Contact hello@doshi.app to whitelist your IPs.
Headers
Must be set to 'client' for all API requests
Available options:
client Query Parameters
Filter by user ID
Filter by lesson ID
Page number for pagination
Number of results per page (max 10000)
Was this page helpful?
⌘I
