List surveys
curl --request GET \
--url https://app.gaintrace.com/api/v1/surveys \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.gaintrace.com/api/v1/surveys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.gaintrace.com/api/v1/surveys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "7b6f2c1e-4d3a-4b5c-9e8f-1a2b3c4d5e6f",
"name": "Relationship NPS",
"measure": "nps",
"status": "draft",
"questions": [
{
"text": "How likely are you to recommend us to a colleague?",
"type": "rating",
"required": true
},
{
"text": "What is the main reason for your score?",
"type": "text",
"required": false
}
],
"settings": {
"thankYouTitle": "Thank you",
"reminders": {
"afterDays": 3,
"max": 1
}
},
"cooldownDays": 90,
"createdAt": "2026-10-14T09:00:00.000Z",
"updatedAt": "2026-10-14T09:00:00.000Z"
}
],
"meta": {
"limit": 50,
"offset": 0,
"count": 1
}
}{
"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": "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
List surveys
List the workspace’s surveys, newest first. There are no filters. Requires a secret server key (gt_live_). Publishable keys (gt_pub_) return 403.
Scope: read:surveys
GET
/
surveys
List surveys
curl --request GET \
--url https://app.gaintrace.com/api/v1/surveys \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.gaintrace.com/api/v1/surveys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.gaintrace.com/api/v1/surveys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "7b6f2c1e-4d3a-4b5c-9e8f-1a2b3c4d5e6f",
"name": "Relationship NPS",
"measure": "nps",
"status": "draft",
"questions": [
{
"text": "How likely are you to recommend us to a colleague?",
"type": "rating",
"required": true
},
{
"text": "What is the main reason for your score?",
"type": "text",
"required": false
}
],
"settings": {
"thankYouTitle": "Thank you",
"reminders": {
"afterDays": 3,
"max": 1
}
},
"cooldownDays": 90,
"createdAt": "2026-10-14T09:00:00.000Z",
"updatedAt": "2026-10-14T09:00:00.000Z"
}
],
"meta": {
"limit": 50,
"offset": 0,
"count": 1
}
}{
"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": "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.
Query Parameters
Max rows to return. Default 50, max 100.
Required range:
1 <= x <= 100Rows to skip (pagination).
Required range:
x >= 0Was this page helpful?