Get a Company's survey scores
curl --request GET \
--url https://app.gaintrace.com/api/v1/companies/{id}/survey-scores \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.gaintrace.com/api/v1/companies/{id}/survey-scores', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.gaintrace.com/api/v1/companies/{id}/survey-scores"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"companyId": "9b2f6c1e-5d4a-4c3b-8a1f-2e7d9c0b6a55",
"measures": [
{
"measure": "nps",
"value": 33,
"people": 3,
"scaleMax": 10
}
],
"peopleAnswered": 3,
"activePeople": 5,
"decisionMakerHeard": true,
"lastAnsweredAt": "2026-10-12T09:14:00.000Z",
"windowDays": 365,
"method": "Built from each person's latest answer in the last 365 days."
}
}{
"error": {
"code": "unauthorized",
"message": "Missing Authorization header",
"doc_url": "https://docs.gaintrace.com/errors#unauthorized"
}
}{
"error": {
"code": "forbidden",
"message": "Insufficient scope: write:companies required",
"doc_url": "https://docs.gaintrace.com/errors#forbidden"
}
}{
"error": {
"code": "not_found",
"message": "Company not found",
"doc_url": "https://docs.gaintrace.com/errors#not_found"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Can't accept more than 60 requests a minute from one API key. Retry in 23 seconds.",
"doc_url": "https://docs.gaintrace.com/errors#rate_limit_exceeded"
}
}{
"error": {
"code": "internal_server_error",
"message": "Something went wrong. Try again in a moment.",
"doc_url": "https://docs.gaintrace.com/errors#internal_server_error"
}
}{
"error": {
"code": "service_unavailable",
"message": "We had trouble reaching the database. Try again in a moment.",
"doc_url": "https://docs.gaintrace.com/errors#service_unavailable"
}
}{
"error": {
"code": "gateway_timeout",
"message": "The request timed out. Try again in a moment.",
"doc_url": "https://docs.gaintrace.com/errors#gateway_timeout"
}
}Surveys
Get a Company's survey scores
A Company’s NPS, CSAT and effort score under your Company score rules, with how many people each rests on and a sentence describing the method. Returns 404 for a Company outside your workspace. Requires a secret server key (gt_live_). Publishable keys (gt_pub_) return 403.
Scope: read:surveys
GET
/
companies
/
{id}
/
survey-scores
Get a Company's survey scores
curl --request GET \
--url https://app.gaintrace.com/api/v1/companies/{id}/survey-scores \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.gaintrace.com/api/v1/companies/{id}/survey-scores', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.gaintrace.com/api/v1/companies/{id}/survey-scores"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"companyId": "9b2f6c1e-5d4a-4c3b-8a1f-2e7d9c0b6a55",
"measures": [
{
"measure": "nps",
"value": 33,
"people": 3,
"scaleMax": 10
}
],
"peopleAnswered": 3,
"activePeople": 5,
"decisionMakerHeard": true,
"lastAnsweredAt": "2026-10-12T09:14:00.000Z",
"windowDays": 365,
"method": "Built from each person's latest answer in the last 365 days."
}
}{
"error": {
"code": "unauthorized",
"message": "Missing Authorization header",
"doc_url": "https://docs.gaintrace.com/errors#unauthorized"
}
}{
"error": {
"code": "forbidden",
"message": "Insufficient scope: write:companies required",
"doc_url": "https://docs.gaintrace.com/errors#forbidden"
}
}{
"error": {
"code": "not_found",
"message": "Company not found",
"doc_url": "https://docs.gaintrace.com/errors#not_found"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Can't accept more than 60 requests a minute from one API key. Retry in 23 seconds.",
"doc_url": "https://docs.gaintrace.com/errors#rate_limit_exceeded"
}
}{
"error": {
"code": "internal_server_error",
"message": "Something went wrong. Try again in a moment.",
"doc_url": "https://docs.gaintrace.com/errors#internal_server_error"
}
}{
"error": {
"code": "service_unavailable",
"message": "We had trouble reaching the database. Try again in a moment.",
"doc_url": "https://docs.gaintrace.com/errors#service_unavailable"
}
}{
"error": {
"code": "gateway_timeout",
"message": "The request timed out. Try again in a moment.",
"doc_url": "https://docs.gaintrace.com/errors#gateway_timeout"
}
}Authorizations
Bearer API key. Secret server keys start with gt_live_; client-safe browser keys start with gt_pub_ (write-only, origin-pinned). Create and scope keys in Settings → API Keys.
Path Parameters
The Company id.
Response
The Company's scores.
Show child attributes
Show child attributes
Was this page helpful?