Get a survey response
curl --request GET \
--url https://app.gaintrace.com/api/v1/survey-responses/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.gaintrace.com/api/v1/survey-responses/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.gaintrace.com/api/v1/survey-responses/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"id": "0d5e8a9b-1c2d-4e3f-8a4b-5c6d7e8f9a0b",
"surveyId": "7b6f2c1e-4d3a-4b5c-9e8f-1a2b3c4d5e6f",
"surveyName": "Relationship NPS",
"measure": "nps",
"score": 4,
"scaleMax": 10,
"band": "negative",
"comment": "Reports take too long to load.",
"answers": {
"q0": 4,
"q1": "Reports take too long to load."
},
"questionAnswers": [
{
"key": "q0",
"number": 1,
"text": "How likely are you to recommend us to a colleague?",
"type": "rating",
"value": 4,
"display": "4"
},
{
"key": "q1",
"number": 2,
"text": "What is the main reason for your score?",
"type": "text",
"value": "Reports take too long to load.",
"display": "Reports take too long to load."
}
],
"companyId": "a1f0c2d3-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"personId": "c3d24e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
"subject": {
"type": "ticket",
"id": "5d1e7a3b-2c4f-4b6a-8d9e-0f1a2b3c4d5e"
},
"respondentEmail": "[email protected]",
"respondentName": "Ana Ruiz",
"status": "new",
"ownerId": null,
"taskId": null,
"submittedAt": "2026-10-14T09:12:43.000Z",
"reviewedAt": null
}
}{
"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"
}
}Survey responses
Get a survey response
Read one GainTrace survey response, with its answers, the questions they answer, and the record it is about. Requires a secret server key (gt_live_). Publishable keys (gt_pub_) return 403.
Scope: read:surveys
GET
/
survey-responses
/
{id}
Get a survey response
curl --request GET \
--url https://app.gaintrace.com/api/v1/survey-responses/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.gaintrace.com/api/v1/survey-responses/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.gaintrace.com/api/v1/survey-responses/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"id": "0d5e8a9b-1c2d-4e3f-8a4b-5c6d7e8f9a0b",
"surveyId": "7b6f2c1e-4d3a-4b5c-9e8f-1a2b3c4d5e6f",
"surveyName": "Relationship NPS",
"measure": "nps",
"score": 4,
"scaleMax": 10,
"band": "negative",
"comment": "Reports take too long to load.",
"answers": {
"q0": 4,
"q1": "Reports take too long to load."
},
"questionAnswers": [
{
"key": "q0",
"number": 1,
"text": "How likely are you to recommend us to a colleague?",
"type": "rating",
"value": 4,
"display": "4"
},
{
"key": "q1",
"number": 2,
"text": "What is the main reason for your score?",
"type": "text",
"value": "Reports take too long to load.",
"display": "Reports take too long to load."
}
],
"companyId": "a1f0c2d3-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"personId": "c3d24e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
"subject": {
"type": "ticket",
"id": "5d1e7a3b-2c4f-4b6a-8d9e-0f1a2b3c4d5e"
},
"respondentEmail": "[email protected]",
"respondentName": "Ana Ruiz",
"status": "new",
"ownerId": null,
"taskId": null,
"submittedAt": "2026-10-14T09:12:43.000Z",
"reviewedAt": null
}
}{
"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 survey response's UUID.
Response
The response.
The same shape as the survey_response webhook payload for a GainTrace survey, without source and channel.
Show child attributes
Show child attributes
Was this page helpful?