List enterprise survey results
curl --request GET \
--url https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/surveys \
--header 'Authorization: Bearer <token>'import requests
url = "https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/surveys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/surveys', 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://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/surveys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/surveys"
req, _ := http.NewRequest("GET", url, nil)
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://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/surveys")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/surveys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"team_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"call_id": "<string>",
"csat_score": 3,
"resolved": true,
"feedback": "<string>"
}
],
"pagination": {
"cursor": "<string>",
"has_more": true,
"limit": 123
},
"meta": {
"enterprise_id": 123,
"team_ids": [
123
]
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Surveys
List enterprise survey results
List post-call customer survey results across the enterprise’s accessible teams, ordered by creation time ascending for incremental ingestion. Test surveys are excluded. Requires an enterprise_all_teams key with the read:surveys permission; single-team and portfolio keys receive 403 (use the team-scoped endpoint instead).
GET
/
api
/
v1
/
enterprise
/
{enterpriseId}
/
surveys
List enterprise survey results
curl --request GET \
--url https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/surveys \
--header 'Authorization: Bearer <token>'import requests
url = "https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/surveys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/surveys', 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://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/surveys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/surveys"
req, _ := http.NewRequest("GET", url, nil)
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://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/surveys")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/surveys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"team_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"call_id": "<string>",
"csat_score": 3,
"resolved": true,
"feedback": "<string>"
}
],
"pagination": {
"cursor": "<string>",
"has_more": true,
"limit": 123
},
"meta": {
"enterprise_id": 123,
"team_ids": [
123
]
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
API key in the format avoca_<64 hex characters>
Path Parameters
The enterprise ID
Query Parameters
Filter to one accessible team
Required range:
x >= 1Only rows on/after this ISO 8601 timestamp
Only rows before this ISO 8601 timestamp
Include designated internal QA/test teams in multi-team aggregations (default false)
Opaque pagination cursor from the previous response's pagination.cursor
Results per page (default 50, max 100)
Required range:
1 <= x <= 100Was this page helpful?