Surveys
On this page, we'll dive into the different survey endpoints you can use to schedule surveys to recipients, collect their responses, and manage the reusable forms behind them.
In Babele, a Survey Definition schedules a Survey Form to a set of recipients on a recurring (or one-off) iteration. As recipients answer, their Survey Responses are collected against that definition, and — when kpiConvert is enabled — eligible answers convert into KPI values. A Survey Form is the reusable question template (questions, options, sections) that one or more survey definitions can point at via its formId.
All survey endpoints require an authenticated principal (a Bearer JWT or an API key). Access to a specific community, survey, or response is decided per request; a request you are not allowed to make comes back as 403 Forbidden. A survey or survey response that does not exist does not come back as 404 Not Found — it surfaces as 500 Internal Server Error. Survey forms are the exception: an unknown form ID does return a genuine 404.
Get a survey definition
This endpoint allows you to fetch a single survey definition (its metadata and scheduling configuration) by its ID.
This endpoint takes no communityId. Access is decided per survey rather than per community: you can read a definition if you are an admin of the survey's own community, a recipient the survey targets through its methodologies, project tags or privacy circles, or a designated response viewer of that survey. The community the definition is filed under comes back as communityId.
Path parameters
- Name
id- Type
- integer
- Description
The ID of the survey definition to retrieve.
Response attributes
- Name
id- Type
- integer
- Description
The ID of the survey definition.
- Name
title- Type
- string
- Description
The survey title.
- Name
description- Type
- string
- Description
The survey description. Defaults to an empty string.
- Name
surveyType- Type
- integer
- Description
The
SurveyTypeenum value:0Individual,1Startup.
- Name
communityId- Type
- integer
- Description
The ID of the community the survey belongs to.
- Name
formId- Type
- integer
- Description
The ID of the survey form whose questions this survey uses.
- Name
iterationNumber- Type
- integer
- Description
The current iteration of the survey, computed from
startDate,iterationDurationand the current date. It is always1or greater — non-recurrent surveys and surveys with aniterationDurationof0report1.
- Name
iterationDuration- Type
- integer
- Description
The length of one iteration in days, derived from
iterationType:7Weekly,30Monthly,90Quarterly,180Semestral,365Yearly,customIteration(or30) for Custom, and30otherwise.
- Name
iterationType- Type
- integer
- Description
The
SurveyIterationTypeenum value:0Weekly,1Monthly,2Quarterly,3Semestral,4Yearly,5Custom,6NonRecurrent.
- Name
kpiConvert- Type
- boolean
- Description
Whether eligible answers convert into KPI values.
- Name
startDate- Type
- string
- Description
The survey start date-time (ISO 8601).
- Name
startDateTimezoneCode- Type
- string
- Description
The IANA timezone code the start date was entered in. Defaults to an empty string.
- Name
endDate- Type
- string | null
- Description
The survey end date-time (ISO 8601).
nullon definitions created before an end date was mandatory.
- Name
endDateTimezoneCode- Type
- string
- Description
The IANA timezone code the end date was entered in. Defaults to an empty string.
- Name
timezone- Type
- string | null
- Description
The IANA timezone code the schedule runs in.
- Name
surveyPrivacyCircles- Type
- array of integer
- Description
The circle IDs allowed to see the survey. Every ID the survey was created or updated with is stored as a community-circle ID — including project-circle IDs resolved on the create path — so they all appear here.
- Name
surveyCommunityUserTags- Type
- array of string
- Description
The community-user tag names the survey targets.
- Name
surveyMethodologies- Type
- array of integer
- Description
The IDs of the methodologies the survey targets. Methodologies are surfaced as Programs in the product.
- Name
surveyProjectTags- Type
- array of string
- Description
The project tag names the survey targets.
- Name
deadline- Type
- string | null
- Description
The deadline of the current iteration (ISO 8601), computed from
startDate,iterationTypeanditerationDuration. For non-recurrent surveys it is theendDate.
- Name
surveyResponseViewers- Type
- array
- Description
The users granted read access to this survey's responses. Described under
surveyResponseViewersarray items below.
- Name
allowAccessToResponses- Type
- boolean
- Description
Whether the
surveyResponseViewersgrant is active. While it isfalsethe listed viewers get no access.
- Name
currentUserIsResponseViewerOnly- Type
- boolean
- Description
truewhen the authenticated user reaches this survey solely through the response-viewer grant — that is, they are not an admin of the survey's community.
surveyResponseViewers array items
- Name
userId- Type
- integer
- Description
The ID of the user granted read access to this survey's responses.
- Name
user- Type
- object | null
- Description
The viewer's name record. On this endpoint it is always populated; it is
nullon endpoints that return the viewer rows without the user record. Described undersurveyResponseViewers[].userobject below.
surveyResponseViewers[].user object
- Name
id- Type
- integer
- Description
The ID of the viewer. Matches the enclosing
userId.
- Name
firstName- Type
- string
- Description
The viewer's first name.
- Name
lastName- Type
- string
- Description
The viewer's last name.
Possible errors
- Name
401 Unauthorized- Description
The request is missing valid authentication.
- Name
403 Forbidden- Description
The survey exists but you are not allowed to read it.
- Name
500 Internal Server Error- Description
No survey definition with that ID exists. A missing survey surfaces as a
500rather than a404.
Request
curl -X GET https://api.babele.co/api/Survey/survey-definition/1 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJleGFtcGxlIiwiZXhwIjoxNzQzODY1MjA3fQ.DEMO_SIGNATURE_NOT_A_REAL_TOKEN"
Response
{
"id": 1,
"title": "Startup Feedback Survey",
"description": "We have selected 12 startups who are currently enrolled in our programme. The programme started in July and will continue until this year's Demo Day...",
"surveyType": 1,
"communityId": 999,
"formId": 1515,
"iterationNumber": 1,
"iterationDuration": 30,
"iterationType": 6,
"kpiConvert": true,
"startDate": "2024-01-01T09:00:00Z",
"startDateTimezoneCode": "Europe/Bucharest",
"endDate": "2024-01-31T18:00:00Z",
"endDateTimezoneCode": "Europe/Bucharest",
"timezone": "Europe/Bucharest",
"surveyPrivacyCircles": [11, 22, 33, 1886],
"surveyCommunityUserTags": ["feedback", "satisfaction", "New2025"],
"surveyMethodologies": [101, 202],
"surveyProjectTags": ["some", "tags"],
"deadline": "2024-01-31T18:00:00Z",
"surveyResponseViewers": [
{
"userId": 16,
"user": { "id": 16, "firstName": "Mihai", "lastName": "Ionescu" }
}
],
"allowAccessToResponses": true,
"currentUserIsResponseViewerOnly": false
}
List survey definitions
This endpoint allows you to retrieve a paginated, filtered list of survey definitions for a community. Filters are passed in the request body, so although it lists data this is a POST. It is a read, not a mutation.
The response returns a trimmed shape (SurveyDefinitionBaseDto) — id, title, startDate, endDate, and iterationNumber only — not the full definition.
communityId decides both what you get back and whether you get anything at all. When you are an admin of that community you receive all of its survey definitions, filtered and paged, and count is the unpaged total. When you are not an admin but have been granted response-viewer access to at least one survey in that community, you receive only the surveys you were granted access to, and count is the size of the returned page rather than an unpaged total. When you are neither, the request is rejected. Omitting communityId binds it to 0, which matches no community — so an omitted value always ends in rejection rather than in an unscoped list.
Request body attributes
- Name
communityId- Type
- integer
- Description
The ID of the community to list surveys for. Required.
- Name
take- Type
- integer
- Description
The page size (number of definitions to return). Optional; defaults to
10.
- Name
skip- Type
- integer
- Description
The number of definitions to skip. Optional; defaults to
0.
- Name
statusFilters- Type
- object
- Description
Optional filter on the survey's lifecycle status. Described under
statusFiltersobject below.
- Name
iterationFilters- Type
- object
- Description
Optional filter on the survey's current iteration index. Described under
iterationFiltersobject below.
statusFilters object
- Name
type- Type
- integer
- Description
The
DynamicFilterTypeenum value:0IsAnyOf (keep matches),1IsNoneOf (exclude matches).
- Name
values- Type
- array of integer
- Description
The
SurveyStatusvalues to match:0Draft (the start date is in the future),1Active (started and not yet ended),2Expired (the end date has passed). The whole filter is ignored when this isnullor empty, and values outside that range match nothing.
iterationFilters object
- Name
type- Type
- integer
- Description
The
DynamicFilterTypeenum value:0IsAnyOf,1IsNoneOf.
- Name
values- Type
- array of integer
- Description
The iteration indexes to match. A survey's current index is the whole number of
iterationDurationdays elapsed since itsstartDate; surveys with aniterationDurationof0match the value1. The whole filter is ignored when this isnullor empty.
Response attributes
- Name
count- Type
- integer
- Description
The total number of survey definitions matching the filters, ignoring paging. For a caller who is only a response viewer in the community this is instead the number of definitions in the returned page.
- Name
list- Type
- array
- Description
The page of survey definitions. Described under
listarray items below.
list array items
- Name
id- Type
- integer
- Description
The ID of the survey definition. Use it with the get-a-survey-definition endpoint above for the full shape.
- Name
title- Type
- string
- Description
The survey title.
- Name
startDate- Type
- string
- Description
The survey start date-time (ISO 8601).
- Name
endDate- Type
- string | null
- Description
The survey end date-time (ISO 8601).
nullwhen the definition has no end date.
- Name
iterationNumber- Type
- integer
- Description
The current iteration of the survey. Always
1or greater.
Possible errors
- Name
401 Unauthorized- Description
The request is missing valid authentication.
- Name
403 Forbidden- Description
You are neither an admin of the given community nor a response viewer in it.
Request
curl -X POST https://api.babele.co/api/Survey/survey-definitions \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJleGFtcGxlIiwiZXhwIjoxNzQzODY1MjA3fQ.DEMO_SIGNATURE_NOT_A_REAL_TOKEN" \
-H "Content-Type: application/json" \
-d '{"communityId":999,"skip":0,"take":20,"statusFilters":{"type":0,"values":[1]},"iterationFilters":{"type":0,"values":[1,2]}}'
Response
{
"count": 12,
"list": [
{
"id": 1,
"title": "Startup Feedback Survey",
"startDate": "2024-01-01T09:00:00Z",
"endDate": "2024-01-31T18:00:00Z",
"iterationNumber": 1
},
{
"id": 2,
"title": "Quarterly Impact Check-in",
"startDate": "2024-04-01T09:00:00Z",
"endDate": "2024-04-30T18:00:00Z",
"iterationNumber": 3
},
{
"id": 3,
"title": "Demo Day Readiness Pulse",
"startDate": "2024-05-01T09:00:00Z",
"endDate": null,
"iterationNumber": 1
}
]
}
Create a survey definition
This endpoint allows you to create a new survey definition in a community, scheduling a form to its targeted recipients. Creating a definition triggers invitation notifications to the targeted users. It responds with 201 Created and the full survey definition.
The surveyType enum is 0 Individual / 1 Startup. The iterationType enum is 0 Weekly, 1 Monthly, 2 Quarterly, 3 Semestral, 4 Yearly, 5 Custom, 6 NonRecurrent. Set customIteration only when iterationType is 5 (Custom).
communityId and formId do different jobs here. communityId is where
the definition is filed, and it is what you read back on the survey.
formId is what the permission check runs against: you must be an admin
of the form's community to create the survey, and both the invitation
audience and the privacy circles are resolved against that same
community. Sending a communityId that differs from the form's community
is accepted, and produces a survey filed under communityId whose
privacy circles were resolved against the form's community. Omitting
communityId binds it to 0 and files the survey under community 0,
so always send it explicitly.
Request body attributes
- Name
communityId- Type
- integer
- Description
The ID of the community to file the survey under. Required.
- Name
title- Type
- string
- Description
The survey title.
- Name
description- Type
- string
- Description
A description of the survey.
- Name
surveyType- Type
- integer
- Description
The
SurveyTypeenum value. Required.
- Name
formId- Type
- integer
- Description
The ID of the form whose questions this survey uses. Required. It also decides which community you must administer to make this call.
- Name
iterationType- Type
- integer
- Description
The
SurveyIterationTypeenum value. Required.
- Name
kpiConvert- Type
- boolean
- Description
Whether responses convert into KPI values. Required.
- Name
startDate- Type
- string
- Description
The survey start date-time (ISO 8601). Required.
- Name
timezone- Type
- string
- Description
The IANA timezone code for the schedule.
- Name
endDate- Type
- string
- Description
The survey end date-time (ISO 8601). Required in practice — the request is rejected when it is missing or earlier than
startDate.
- Name
surveyPrivacyCircles- Type
- array of integer
- Description
Circle IDs allowed to see the survey. Both community-circle and project-circle IDs are accepted and are resolved against the form's community; every resolved ID is stored as a community-circle ID, so all of them are echoed back in the response's
surveyPrivacyCircles.
- Name
surveyMethodologies- Type
- array of integer
- Description
Methodology (Program) IDs the survey targets. Required together with or instead of
surveyProjectTagswhensurveyTypeis1(Startup).
- Name
deadline- Type
- string
- Description
The response deadline (ISO 8601). Accepted but inert — it is never stored, and the
deadlineyou read back is always computed fromstartDate,iterationTypeanditerationDuration.
- Name
surveyCommunityUserTags- Type
- array of string
- Description
Community-user tag names. On an Individual survey these select the recipients.
- Name
surveyProjectTags- Type
- array of string
- Description
Project tag names. On a Startup survey these select the recipient projects.
- Name
customIteration- Type
- integer | null
- Description
The iteration length in days, used only when
iterationTypeis5(Custom). Sendnullfor every other iteration type — the value is ignored, and wheniterationTypeis Custom anullfalls back to30days.
- Name
surveyResponseViewers- Type
- array
- Description
The users to grant read access to this survey's responses. Only takes effect when
allowAccessToResponsesistrue. Described undersurveyResponseViewersarray items below.
- Name
allowAccessToResponses- Type
- boolean
- Description
Whether the users listed in
surveyResponseViewersmay read this survey's responses. Defaults tofalse; while it isfalsethe grant is inert.
surveyResponseViewers array items
- Name
userId- Type
- integer
- Description
The ID of a user to grant read access to this survey's responses. Duplicate
userIdvalues are collapsed, and sendingnullfor the whole array is equivalent to sending an empty one.
Response attributes
The 201 Created body is the full survey definition — the same shape as the response attributes of Get a survey definition above. Two fields behave differently on the create path:
- Name
surveyResponseViewers[].user- Type
- null
- Description
Always
nullhere. The viewer rows returned on the create path carry onlyuserId.
- Name
currentUserIsResponseViewerOnly- Type
- boolean
- Description
Always
falsehere. It is only computed on the get-by-id path.
Possible errors
- Name
400 Bad Request- Description
The request body could not be parsed.
- Name
401 Unauthorized- Description
The request is missing valid authentication.
- Name
403 Forbidden- Description
You are not an admin of the form's community.
- Name
500 Internal Server Error- Description
The body failed validation — a missing
endDate, anendDateearlier thanstartDate, or a Startup survey with neithersurveyMethodologiesnorsurveyProjectTags.
Request
curl -X POST https://api.babele.co/api/Survey/survey-definition \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJleGFtcGxlIiwiZXhwIjoxNzQzODY1MjA3fQ.DEMO_SIGNATURE_NOT_A_REAL_TOKEN" \
-H "Content-Type: application/json" \
-d '{"communityId":999,"title":"Startup Feedback Survey","description":"Quarterly feedback from enrolled startups.","surveyType":1,"formId":1515,"iterationType":2,"kpiConvert":true,"startDate":"2024-01-01T09:00:00Z","timezone":"Europe/Bucharest","endDate":"2024-01-31T18:00:00Z","surveyPrivacyCircles":[11,22,33,1886],"surveyMethodologies":[101,202],"deadline":"2024-03-01T09:00:00Z","surveyCommunityUserTags":["feedback","satisfaction"],"surveyProjectTags":["cohort-2024"],"customIteration":null,"surveyResponseViewers":[{"userId":16}],"allowAccessToResponses":true}'
Response
{
"id": 1771,
"title": "Startup Feedback Survey",
"description": "Quarterly feedback from enrolled startups.",
"surveyType": 1,
"communityId": 999,
"formId": 1515,
"iterationNumber": 1,
"iterationDuration": 90,
"iterationType": 2,
"kpiConvert": true,
"startDate": "2024-01-01T09:00:00Z",
"startDateTimezoneCode": "Europe/Bucharest",
"endDate": "2024-01-31T18:00:00Z",
"endDateTimezoneCode": "Europe/Bucharest",
"timezone": "Europe/Bucharest",
"surveyPrivacyCircles": [11, 22, 33, 1886],
"surveyCommunityUserTags": ["feedback", "satisfaction"],
"surveyMethodologies": [101, 202],
"surveyProjectTags": ["cohort-2024"],
"deadline": "2024-04-01T09:00:00Z",
"surveyResponseViewers": [
{ "userId": 16, "user": null }
],
"allowAccessToResponses": true,
"currentUserIsResponseViewerOnly": false
}
Update a survey definition
This endpoint allows you to update an existing survey definition. Note the path segment is plural (survey-definitions) and the path parameter is named surveyId.
The update body differs from the create body: it has iterationDuration instead of deadline. iterationDuration is accepted but never read — the stored duration is always recomputed from iterationType and customIteration.
communityId is used twice on this endpoint, and both uses matter. It is
the permission scope: you must be an admin of the community you name, not
of the survey's current community. It is also written onto the survey, so
sending a communityId different from the survey's current one moves
the definition into that community. Omitting it binds 0, which fails
the permission check. Always send the survey's current communityId
unless a move is intended.
Path parameters
- Name
surveyId- Type
- integer
- Description
The ID of the survey definition to update.
Request body attributes
- Name
communityId- Type
- integer
- Description
The ID of the community the survey belongs to. Required. It is both the permission scope for the call and the value written onto the survey.
- Name
title- Type
- string
- Description
The survey title.
- Name
description- Type
- string
- Description
A description of the survey.
- Name
surveyType- Type
- integer
- Description
The
SurveyTypeenum value.
- Name
formId- Type
- integer
- Description
The ID of the form whose questions this survey uses.
- Name
iterationDuration- Type
- integer
- Description
The duration of an iteration, in days. Accepted but inert — the stored value is recomputed from
iterationTypeandcustomIterationon every update.
- Name
kpiConvert- Type
- boolean
- Description
Whether responses convert into KPI values.
- Name
startDate- Type
- string
- Description
The survey start date-time (ISO 8601).
- Name
surveyPrivacyCircles- Type
- array of integer
- Description
Community-circle IDs allowed to see the survey. This is the full replacement set — the previous circles are deleted, and sending
nullor[]removes all of them. Unlike the create endpoint, every value here is stored as a community-circle ID; project circles are not resolved.
- Name
surveyMethodologies- Type
- array of integer
- Description
Methodology (Program) IDs the survey targets. Full replacement set; sending
nullor[]removes all of them.
- Name
endDate- Type
- string
- Description
The survey end date-time (ISO 8601).
- Name
surveyCommunityUserTags- Type
- array of string
- Description
Community-user tag names the survey targets. Full replacement set — tags not listed are dropped, new names are created, and sending
nullor[]removes all of them.
- Name
surveyProjectTags- Type
- array of string
- Description
Project tag names the survey targets. Full replacement set; sending
nullor[]removes all of them.
- Name
iterationType- Type
- integer
- Description
The
SurveyIterationTypeenum value.
- Name
customIteration- Type
- integer | null
- Description
The iteration length in days, used only when
iterationTypeis5(Custom). Sendnullfor every other iteration type — the value is ignored, and wheniterationTypeis Custom anullfalls back to30days.
- Name
timezone- Type
- string
- Description
The IANA timezone code for the schedule.
- Name
surveyResponseViewers- Type
- array
- Description
The full replacement set of response viewers. Viewers not present in the array are revoked; omitting the field or sending
nullrevokes all of them. Described undersurveyResponseViewersarray items below.
- Name
allowAccessToResponses- Type
- boolean
- Description
Whether the users in
surveyResponseViewersmay read this survey's responses. It is written on every update, so omitting it sendsfalseand switches the grant off.
surveyResponseViewers array items
- Name
userId- Type
- integer
- Description
The ID of a user granted read access to this survey's responses. Duplicate
userIdvalues are collapsed.
Possible errors
- Name
400 Bad Request- Description
The request body could not be parsed.
- Name
401 Unauthorized- Description
The request is missing valid authentication.
- Name
403 Forbidden- Description
You are not an admin of the community named in
communityId.
- Name
500 Internal Server Error- Description
No survey definition with that
surveyIdexists. A missing survey surfaces as a500rather than a404.
Request
curl -X PUT https://api.babele.co/api/Survey/survey-definitions/1771 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJleGFtcGxlIiwiZXhwIjoxNzQzODY1MjA3fQ.DEMO_SIGNATURE_NOT_A_REAL_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"Startup Feedback Survey (rev 2)","communityId":999,"description":"Updated description.","surveyType":1,"formId":1515,"iterationDuration":90,"kpiConvert":true,"startDate":"2024-01-01T09:00:00Z","surveyPrivacyCircles":[11,22,33,1886],"surveyMethodologies":[101,202],"endDate":"2024-01-31T18:00:00Z","surveyCommunityUserTags":["feedback"],"surveyProjectTags":["cohort-2024"],"iterationType":2,"customIteration":null,"timezone":"Europe/Bucharest","surveyResponseViewers":[{"userId":16}],"allowAccessToResponses":true}'
Response
204 No Content
Delete a survey definition
This endpoint allows you to delete a survey definition. The path segment is singular (survey-definition) and the path parameter is named surveyId.
Path parameters
- Name
surveyId- Type
- integer
- Description
The ID of the survey definition to delete.
Possible errors
- Name
401 Unauthorized- Description
The request is missing valid authentication.
- Name
403 Forbidden- Description
You are not an admin of the survey's community.
- Name
500 Internal Server Error- Description
No survey definition with that
surveyIdexists. A missing survey surfaces as a500rather than a404.
Request
curl -X DELETE https://api.babele.co/api/Survey/survey-definition/1771 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJleGFtcGxlIiwiZXhwIjoxNzQzODY1MjA3fQ.DEMO_SIGNATURE_NOT_A_REAL_TOKEN"
Response
204 No Content
Get a survey response
This endpoint allows you to fetch a single survey response — one user's answers for one iteration — by its ID. The status field is a SurveyResponseStatus enum (0 Pending/Draft, 1 Submitted).
This endpoint takes no communityId. Access is decided per response: you can read a response if you are its own author, a team member of the community-project the response was submitted on behalf of, an admin of the survey's community, or a designated response viewer of the survey. The community link is carried indirectly by the response's community-project, which is also what projectId and projectName are derived from.
On an Individual survey the response has no project link, so projectId
and projectName are both null.
Path parameters
- Name
id- Type
- integer
- Description
The ID of the survey response to retrieve.
Response attributes
- Name
id- Type
- integer
- Description
The ID of the survey response.
- Name
userId- Type
- integer
- Description
The ID of the user who authored the response.
- Name
userName- Type
- string
- Description
The author's first and last name joined by a space.
- Name
status- Type
- integer
- Description
The
SurveyResponseStatusenum value:0Pending (draft),1Submitted.
- Name
iterationDeadline- Type
- string | null
- Description
The deadline of the iteration this response belongs to, as a date without a time (
YYYY-MM-DD) — not a full date-time.nullfor surveys whoseiterationTypeis5(Custom) or6(NonRecurrent), which have no per-iteration deadline.
- Name
projectId- Type
- integer | null
- Description
The ID of the project the response was submitted on behalf of.
nullon Individual surveys and on any response with no project link.
- Name
surveyId- Type
- integer
- Description
The ID of the survey definition this response answers.
- Name
surveyTitle- Type
- string
- Description
The title of the survey definition. An empty string when the definition could not be resolved.
- Name
iterationNumber- Type
- integer
- Description
The 1-based iteration this response belongs to.
- Name
answers- Type
- array
- Description
The submitted answers. Described under
answersarray items below.
- Name
projectName- Type
- string | null
- Description
The name of the project in
projectId.nullwhenprojectIdisnull.
- Name
iteration- Type
- integer
- Description
The same value as
iterationNumber, kept for backwards compatibility.
- Name
tags- Type
- array of string
- Description
The tag names attached to this response.
- Name
isCurrentIteration- Type
- boolean
- Description
Whether this response belongs to the survey's current iteration. Always
truefor a non-recurrent survey with aniterationDurationof0.
answers array items
- Name
formQuestionId- Type
- integer
- Description
The ID of the survey-form question this answer belongs to.
- Name
answer- Type
- string | null
- Description
The answer value: free text, the selected option's text, a number, or the URL of a previously uploaded file.
- Name
id- Type
- integer
- Description
The ID of the stored answer row.
- Name
formId- Type
- integer
- Description
The ID of the survey form the question belongs to. Matches the survey definition's
formId.
- Name
userId- Type
- integer
- Description
The ID of the user who saved the answer.
- Name
lastSubmitedTime- Type
- string | null
- Description
When the answer was last saved (ISO 8601).
nullon answers stored without a timestamp.
- Name
optionAnswerOrder- Type
- integer
- Description
The zero-based order of the selected option for choice questions.
0for question types that carry no option.
- Name
optionRowAnswerOrder- Type
- integer
- Description
The zero-based row order of the selected option for matrix and table questions.
0for question types that carry no row.
Possible errors
- Name
401 Unauthorized- Description
The request is missing valid authentication.
- Name
403 Forbidden- Description
The response exists but you are not allowed to read it.
- Name
500 Internal Server Error- Description
No survey response with that ID exists. A missing response surfaces as a
500rather than a404.
Request
curl -X GET https://api.babele.co/api/Survey/survey-response/5012 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJleGFtcGxlIiwiZXhwIjoxNzQzODY1MjA3fQ.DEMO_SIGNATURE_NOT_A_REAL_TOKEN"
Response
{
"id": 5012,
"userId": 15,
"userName": "Ana Popescu",
"status": 0,
"iterationDeadline": "2024-03-01",
"projectId": 101,
"surveyId": 10,
"surveyTitle": "Startup Feedback Survey",
"iterationNumber": 1,
"answers": [
{
"formQuestionId": 8801,
"answer": "Answer 1",
"id": 1,
"formId": 1515,
"userId": 15,
"lastSubmitedTime": "2024-12-01T09:14:22Z",
"optionAnswerOrder": 1,
"optionRowAnswerOrder": 2
},
{
"formQuestionId": 8802,
"answer": "/Images/Uploads/999/survey/pitch-deck.pdf",
"id": 2,
"formId": 1515,
"userId": 15,
"lastSubmitedTime": null,
"optionAnswerOrder": 0,
"optionRowAnswerOrder": 0
}
],
"projectName": "Project 1",
"iteration": 1,
"tags": ["high-priority", "reviewed"],
"isCurrentIteration": true
}
List survey responses
This endpoint allows you to retrieve a filtered, paginated list of responses for a given survey definition, plus the available filter facets. Filters are passed in the request body, so although it lists data this is a POST. It is a read, not a mutation.
Each filter object is { "type", "values" }, where type is a DynamicFilterType (0 IsAnyOf, 1 IsNoneOf). The response wraps the responses in a SurveyResponseListDto with count, list, and surveyResponseFilters.
This endpoint takes no communityId. The scope comes entirely from the survey named in the path: you must be an admin of that survey's community or a designated response viewer of it. The whole request body is optional — omitting it applies no filters and uses the default paging.
Set includeAnswers to true to embed each response's answers. When it
is false (the default), answers comes back as [], and projectName,
iteration and isCurrentIteration are not computed — they come back as
null, 0 and false respectively.
projectFilters.values holds community-project IDs, while each
response's projectId is a project ID. They are different identifier
spaces, so a value taken from list[].projectId will not filter as you
expect.
Path parameters
- Name
id- Type
- integer
- Description
The ID of the survey definition whose responses to list.
Request body attributes
- Name
submissionDateFilters- Type
- object
- Description
Optional filter on the response's submission date-time. Described under
submissionDateFiltersobject below.
- Name
tagFilters- Type
- object
- Description
Optional filter on the response's tags. Described under
tagFiltersobject below.
- Name
statusFilters- Type
- object
- Description
Optional filter on the response's status. Described under
statusFiltersobject below.
- Name
iterationFilters- Type
- object
- Description
Optional filter on the response's iteration number. Described under
iterationFiltersobject below.
- Name
projectFilters- Type
- object
- Description
Optional filter on the response's community-project link. Described under
projectFiltersobject below.
- Name
userFilters- Type
- object
- Description
Optional filter on the response's author. Described under
userFiltersobject below.
- Name
take- Type
- integer
- Description
The page size. Optional; defaults to
10.
- Name
skip- Type
- integer
- Description
The number of responses to skip. Optional; defaults to
0.
- Name
includeAnswers- Type
- boolean
- Description
Whether to embed each response's
answers. Optional; defaults tofalse.
submissionDateFilters object
- Name
type- Type
- integer
- Description
The
DynamicFilterTypeenum value:0IsAnyOf,1IsNoneOf.
- Name
values- Type
- array of string
- Description
Submission date-times (ISO 8601) to match. The comparison is an exact equality test against each response's stored submission timestamp, not a range — a response matches only when its submission date-time is one of these values exactly. Under
IsNoneOfthe filter also keeps responses that were never submitted.
tagFilters object
- Name
type- Type
- integer
- Description
The
DynamicFilterTypeenum value:0IsAnyOf,1IsNoneOf.
- Name
values- Type
- array of string
- Description
Tag names. A response matches when any of its tags is in the list.
statusFilters object
- Name
type- Type
- integer
- Description
The
DynamicFilterTypeenum value:0IsAnyOf,1IsNoneOf.
- Name
values- Type
- array of integer
- Description
The
SurveyResponseStatusvalues to match:0Pending (draft),1Submitted. This is a different enum from thestatusFilterson List survey definitions above, which usesSurveyStatus.
iterationFilters object
- Name
type- Type
- integer
- Description
The
DynamicFilterTypeenum value:0IsAnyOf,1IsNoneOf.
- Name
values- Type
- array of integer
- Description
Iteration numbers to match, compared against each response's
iterationNumber.
projectFilters object
- Name
type- Type
- integer
- Description
The
DynamicFilterTypeenum value:0IsAnyOf,1IsNoneOf.
- Name
values- Type
- array of integer
- Description
Community-project IDs, not project IDs. A response matches when its community-project link is in the list. Under
IsNoneOfthe filter additionally drops every response with no project link.
userFilters object
- Name
type- Type
- integer
- Description
The
DynamicFilterTypeenum value:0IsAnyOf,1IsNoneOf.
- Name
values- Type
- array of integer
- Description
User IDs to match against each response's
userId.
Response attributes
- Name
count- Type
- integer
- Description
The total number of responses matching the filters, ignoring paging.
- Name
list- Type
- array
- Description
The page of survey responses. Described under
listarray items below.
- Name
surveyResponseFilters- Type
- object
- Description
The filter facets computed from the responses on this page. Described under
surveyResponseFiltersobject below.
list array items
Each element has the same shape as the response attributes of Get a survey response above, and each element's answers items have the same shape as the answers array items documented there. Note that the facets are computed from the paged result set, not from the whole survey, and that four fields depend on includeAnswers as described in the note above.
surveyResponseFilters object
- Name
submissionDateMinimum- Type
- string | null
- Description
The earliest submission date-time among the returned responses (ISO 8601). Falls back to the current time when none of them has been submitted.
- Name
submissionDateMaximum- Type
- string | null
- Description
The latest submission date-time among the returned responses (ISO 8601). Falls back to the current time when none of them has been submitted.
- Name
tagFilters- Type
- array of string
- Description
The distinct tag names present on the returned responses.
- Name
statusFilters- Type
- null
- Description
Reserved for the response-status facet. This endpoint never populates it, so it is always
null. Treat the twoSurveyResponseStatusvalues (0Pending,1Submitted) as the fixed, known set instead of reading them from here.
- Name
iterationFilters- Type
- array of integer
- Description
The distinct iteration numbers present on the returned responses.
- Name
projectFilters- Type
- array
- Description
The projects present on the returned responses. Described under
surveyResponseFilters.projectFiltersarray items below.
- Name
userFilters- Type
- array
- Description
The authors of the returned responses. Described under
surveyResponseFilters.userFiltersarray items below.
The embedded projectFilters facet resolves community-project IDs
against project IDs, which are different identifier spaces — so entries
frequently fail to resolve and the array comes back sparse or empty. Use
the Get survey response filters endpoint below for the authoritative
project facet.
surveyResponseFilters.projectFilters array items
- Name
id- Type
- integer
- Description
The ID of the project.
- Name
name- Type
- string | null
- Description
The project's name.
surveyResponseFilters.userFilters array items
- Name
id- Type
- integer
- Description
The ID of a user who authored at least one of the returned responses.
- Name
firstName- Type
- string | null
- Description
The user's first name.
- Name
lastName- Type
- string | null
- Description
The user's last name.
Possible errors
- Name
401 Unauthorized- Description
The request is missing valid authentication.
- Name
403 Forbidden- Description
You are neither an admin of the survey's community nor a designated response viewer of it.
- Name
500 Internal Server Error- Description
No survey definition with that ID exists. A missing survey surfaces as a
500rather than a404.
Request
curl -X POST https://api.babele.co/api/Survey/survey-definition/10/survey-responses \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJleGFtcGxlIiwiZXhwIjoxNzQzODY1MjA3fQ.DEMO_SIGNATURE_NOT_A_REAL_TOKEN" \
-H "Content-Type: application/json" \
-d '{"submissionDateFilters":{"type":0,"values":["2024-12-01T09:14:22Z"]},"tagFilters":{"type":0,"values":["high-priority"]},"statusFilters":{"type":0,"values":[1]},"iterationFilters":{"type":0,"values":[1,2]},"projectFilters":{"type":0,"values":[2044]},"userFilters":{"type":0,"values":[15,16]},"take":20,"skip":0,"includeAnswers":true}'
Response
{
"count": 2,
"list": [
{
"id": 5012,
"userId": 15,
"userName": "Ana Popescu",
"status": 1,
"iterationDeadline": "2024-03-01",
"projectId": 101,
"surveyId": 10,
"surveyTitle": "Startup Feedback Survey",
"iterationNumber": 1,
"answers": [
{
"formQuestionId": 8801,
"answer": "Answer 1",
"id": 1,
"formId": 1515,
"userId": 15,
"lastSubmitedTime": "2024-12-01T09:14:22Z",
"optionAnswerOrder": 1,
"optionRowAnswerOrder": 2
}
],
"projectName": "Project 1",
"iteration": 1,
"tags": ["high-priority"],
"isCurrentIteration": true
},
{
"id": 5013,
"userId": 16,
"userName": "Mihai Ionescu",
"status": 0,
"iterationDeadline": null,
"projectId": null,
"surveyId": 10,
"surveyTitle": "Startup Feedback Survey",
"iterationNumber": 1,
"answers": [],
"projectName": null,
"iteration": 1,
"tags": [],
"isCurrentIteration": true
}
],
"surveyResponseFilters": {
"submissionDateMinimum": "2024-11-01T00:00:00Z",
"submissionDateMaximum": "2024-12-15T00:00:00Z",
"tagFilters": ["high-priority", "reviewed"],
"statusFilters": null,
"iterationFilters": [1, 2, 3],
"projectFilters": [{ "id": 101, "name": "Project 1" }],
"userFilters": [
{ "id": 15, "firstName": "Ana", "lastName": "Popescu" },
{ "id": 16, "firstName": "Mihai", "lastName": "Ionescu" }
]
}
}
Create a survey response
This endpoint allows you to submit a new survey response — a user's set of answers, saved either as a draft or fully submitted. It responds with 201 Created and a bare integer body: the new survey response ID.
File answers are not uploaded here. Upload the file first, then put the resulting URL into the answer's answer field.
There is no communityId on this endpoint. The project scope is carried by communityProjectId, and it is optional. When you supply it, it is used as-is. When you omit it but supply projectId, the project is resolved against the survey's own community to find the matching community-project link; if no link exists for that pair, the response is created with no project link. When you supply neither, the response is created with no project link at all.
The resolved community-project link does three things: it becomes the
projectId and projectName you read back later, it participates in the
one-response-per-iteration uniqueness check, and it is required for KPI
creation. Without a resolved link no KPI values are produced, even on a
Startup survey whose definition has kpiConvert enabled.
Request body attributes
- Name
surveyId- Type
- integer
- Description
The ID of the survey being answered. Required.
- Name
status- Type
- integer
- Description
The
SurveyResponseStatusenum value (0Pending/Draft,1Submitted). Required.
- Name
communityProjectId- Type
- integer | null
- Description
The community-project link the response is submitted on behalf of. Optional, and the preferred way to attach a response to a startup.
- Name
projectId- Type
- integer | null
- Description
The project the response is on behalf of (for Startup surveys). Optional. This is a fallback for clients that know the project but not the community-project link: it is resolved against the survey's own community, and
communityProjectIdtakes precedence when both are sent.
- Name
tags- Type
- array of string
- Description
Tag names to attach to the response. This endpoint does not persist them — use the bulk retag endpoint below to set a response's tags.
- Name
answers- Type
- array
- Description
The answers being submitted. The field must be present, even if the array is empty. Described under
answersarray items below.
answers array items
- Name
formQuestionId- Type
- integer
- Description
The ID of the survey-form question being answered. Required.
- Name
answer- Type
- string | null
- Description
The answer value: free text, the selected option's text, a number, or the URL of a previously uploaded file.
- Name
optionAnswerOrder- Type
- integer
- Description
The zero-based order of the selected option, for choice questions. Send
0for question types that carry no option —0is the no-op value, not "omit the field".
- Name
optionRowAnswerOrder- Type
- integer
- Description
The zero-based row order of the selected option, for matrix and table questions. Send
0for question types that carry no row.
Response attributes
- Name
(body)- Type
- integer
- Description
The ID of the newly created survey response. Returned with
201 Created; the body is a bare integer, not an object.
Possible errors
- Name
400 Bad Request- Description
The request body could not be parsed.
- Name
401 Unauthorized- Description
The request is missing valid authentication.
- Name
403 Forbidden- Description
You are not allowed to submit a response to this survey.
- Name
500 Internal Server Error- Description
No survey with the given
surveyIdexists, or a response for this iteration already exists.
Request
curl -X POST https://api.babele.co/api/Survey/survey-response \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJleGFtcGxlIiwiZXhwIjoxNzQzODY1MjA3fQ.DEMO_SIGNATURE_NOT_A_REAL_TOKEN" \
-H "Content-Type: application/json" \
-d '{"surveyId":10,"status":1,"communityProjectId":2044,"projectId":101,"tags":["cohort-2024"],"answers":[{"formQuestionId":8801,"answer":"Very satisfied","optionAnswerOrder":1,"optionRowAnswerOrder":0},{"formQuestionId":8802,"answer":"/Images/Uploads/999/survey/pitch-deck.pdf","optionAnswerOrder":0,"optionRowAnswerOrder":0}]}'
Response
5012
Update a survey response
This endpoint allows you to update an existing survey response — edit its answers or change its status to Submitted. The body is the same as the create body but without surveyId.
Unlike the create endpoint, this endpoint does not resolve projectId
into a community-project link — projectId is ignored here. Send
communityProjectId to keep or change the response's project, and send
it on every update: the value is written straight through, so
omitting it clears the link and the response afterwards reads back with
projectId and projectName both null.
A response that has already been submitted cannot be updated — the
request comes back as 403 Forbidden. Setting status to 1 in this
call is therefore a one-way submit.
Path parameters
- Name
surveyResponseId- Type
- integer
- Description
The ID of the survey response to update.
Request body attributes
- Name
status- Type
- integer
- Description
The
SurveyResponseStatusenum value. Required.
- Name
communityProjectId- Type
- integer | null
- Description
The community-project link the response is submitted on behalf of. Always send the response's current value — the field is written straight through, so omitting it clears the link.
- Name
projectId- Type
- integer | null
- Description
The project the response is on behalf of. Ignored on this endpoint; only the create endpoint resolves it into a community-project link.
- Name
tags- Type
- array of string
- Description
Tag names to attach to the response. This endpoint does not persist them — use the bulk retag endpoint below to replace a response's tags.
- Name
answers- Type
- array
- Description
The full replacement set of answers — every previously stored answer of this response is deleted and re-created from the payload, so answers omitted here are lost. The field must be present. Each item has the same shape as the
answersarray items of Create a survey response above.
Possible errors
- Name
400 Bad Request- Description
The request body could not be parsed.
- Name
401 Unauthorized- Description
The request is missing valid authentication.
- Name
403 Forbidden- Description
You are not allowed to update this response, or it has already been submitted.
- Name
500 Internal Server Error- Description
No survey response with that
surveyResponseIdexists. A missing response surfaces as a500rather than a404.
Request
curl -X PATCH https://api.babele.co/api/Survey/survey-response/5012 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJleGFtcGxlIiwiZXhwIjoxNzQzODY1MjA3fQ.DEMO_SIGNATURE_NOT_A_REAL_TOKEN" \
-H "Content-Type: application/json" \
-d '{"status":1,"communityProjectId":2044,"tags":["cohort-2024","final"],"answers":[{"formQuestionId":8801,"answer":"Extremely satisfied","optionAnswerOrder":2,"optionRowAnswerOrder":0}]}'
Response
204 No Content
Update survey response tags
This endpoint allows you to bulk-set the tags on one or more survey responses. The body is an array; each item's tags is the full replacement set for that response. This is the only endpoint that actually writes a survey response's tags — the create and update endpoints above accept a tags field but do not persist it.
This endpoint takes no communityId. The community scope is derived server-side from the first array item: you must be an admin of the community that owns the survey behind the first item's surveyResponseId.
An empty top-level array is a silent no-op and still returns 204.
surveyResponseId values that do not exist are silently ignored — there
is no per-item 404. The one exception is the first item: if its
surveyResponseId does not exist the request comes back as 500.
Request body attributes
The request body is a JSON array of tag-update objects, not an object. Its item members are described under request array items below.
request array items
- Name
surveyResponseId- Type
- integer
- Description
The ID of the survey response to retag. Required — an omitted value binds to
0and matches no response.
- Name
tags- Type
- array of string
- Description
The complete replacement set of tag names for that response. Every existing tag on the response is deleted and re-created from this list, so passing
[]removes every tag from it.
Possible errors
- Name
401 Unauthorized- Description
The request is missing valid authentication.
- Name
403 Forbidden- Description
You are not a community admin of the survey that owns the first item's response.
- Name
500 Internal Server Error- Description
The first item's
surveyResponseIddoes not exist.
Request
curl -X PUT https://api.babele.co/api/Survey/survey-response/tags \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJleGFtcGxlIiwiZXhwIjoxNzQzODY1MjA3fQ.DEMO_SIGNATURE_NOT_A_REAL_TOKEN" \
-H "Content-Type: application/json" \
-d '[{"surveyResponseId":5012,"tags":["reviewed","high-priority"]},{"surveyResponseId":5013,"tags":[]}]'
Response
204 No Content
Get survey response filters
This endpoint allows you to retrieve the available filter facets for a survey's responses — date range, tags, iterations, projects, and users — so a client can build filter dropdowns. Unlike the facets embedded in List survey responses above, these are computed across all of the survey's responses rather than across one page, and the project facet resolves correctly.
This endpoint takes no communityId. The community is implied by the survey named in the path: you must be an admin of that survey's community or a designated response viewer of it.
submissionDateMinimum and submissionDateMaximum are computed from the
survey's submitted responses only. A survey with zero submitted
responses does not return null values here — the request fails with a
500 instead.
Path parameters
- Name
id- Type
- integer
- Description
The ID of the survey definition.
Response attributes
- Name
submissionDateMinimum- Type
- string
- Description
The earliest submission date-time across this survey's submitted responses (ISO 8601).
- Name
submissionDateMaximum- Type
- string
- Description
The latest submission date-time across this survey's submitted responses (ISO 8601).
- Name
tagFilters- Type
- array of string
- Description
The distinct tag names applied to at least one of this survey's responses.
- Name
statusFilters- Type
- null
- Description
Reserved for the response-status facet. This endpoint never populates it, so it is always
null. Treat the twoSurveyResponseStatusvalues (0Pending/Draft,1Submitted) as the fixed, known set instead of reading them from here.
- Name
iterationFilters- Type
- array of integer
- Description
The distinct survey iteration numbers that have at least one response. Each matches the
iterationNumberon a survey response.
- Name
projectFilters- Type
- array
- Description
The distinct projects that submitted a response. Empty for Individual surveys, which have no project link. Described under
projectFiltersarray items below.
- Name
userFilters- Type
- array
- Description
The distinct users that submitted a response. Described under
userFiltersarray items below.
projectFilters array items
- Name
id- Type
- integer
- Description
The ID of the project — the underlying project, not the community-project link.
- Name
name- Type
- string
- Description
The project name.
userFilters array items
- Name
id- Type
- integer
- Description
The ID of the responding user.
- Name
firstName- Type
- string
- Description
The user's first name.
- Name
lastName- Type
- string
- Description
The user's last name.
Possible errors
- Name
401 Unauthorized- Description
The request is missing valid authentication.
- Name
403 Forbidden- Description
You are neither an admin of the survey's community nor a designated response viewer of it.
- Name
500 Internal Server Error- Description
No survey definition with that ID exists, or the survey has no submitted responses yet.
Request
curl -X GET https://api.babele.co/api/Survey/survey-definition/10/survey-response-filters \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJleGFtcGxlIiwiZXhwIjoxNzQzODY1MjA3fQ.DEMO_SIGNATURE_NOT_A_REAL_TOKEN"
Response
{
"submissionDateMinimum": "2024-11-01T09:12:00Z",
"submissionDateMaximum": "2024-12-15T16:48:00Z",
"tagFilters": ["reviewed", "high-priority", "cohort-2024"],
"statusFilters": null,
"iterationFilters": [1, 2, 3],
"projectFilters": [
{ "id": 101, "name": "Clean Water Initiative" },
{ "id": 102, "name": "Solar Microgrid Pilot" }
],
"userFilters": [
{ "id": 15, "firstName": "Ana", "lastName": "Popescu" },
{ "id": 16, "firstName": "Mihai", "lastName": "Ionescu" }
]
}
Export survey responses (CSV)
This endpoint streams all responses for a survey as a CSV file download, with one row per response. The column set is a fixed prefix that depends on the survey's surveyType, followed by one column per question of the survey's form.
The response is a binary file (Content-Type: application/octet-stream,
Content-Disposition: attachment; filename=SurveyResponses.csv), not
JSON. Swagger advertises a JSON body for this endpoint, but the wire
format is a file — handle the response as a blob/file, not as parsed
JSON.
This endpoint takes no communityId. The community scope is taken from the survey itself: a Startup survey resolves its projects through the community-project links already attached to the responses, and an Individual survey resolves its respondents among the community users of the survey's own community.
Path parameters
- Name
surveyId- Type
- integer
- Description
The ID of the survey whose responses to export.
Startup survey columns
Emitted when the survey's surveyType is 1 (Startup). A response whose project cannot be resolved is skipped entirely, so it produces no row.
- Name
Iteration- Type
- integer
- Description
The survey iteration this response belongs to.
- Name
Startup Name- Type
- string
- Description
The project's name.
- Name
Startup Program- Type
- string
- Description
The name of the methodology (Program) that links the project to this survey. Empty when the project is not in one of the survey's methodologies.
- Name
Startup Tags- Type
- string
- Description
The project's tags, comma-joined. Empty when the project has none.
- Name
Respondent Name- Type
- string
- Description
The full name of the user who submitted the response.
- Name
Respondent Email- Type
- string
- Description
The respondent's e-mail address.
- Name
Iteration Frequency- Type
- string
- Description
The survey's
SurveyIterationTyperendered as its name —Weekly,Monthly,Quarterly,Semestral,Yearly,CustomorNonRecurrent— not the integer used in the JSON endpoints.
- Name
Submission Date- Type
- string
- Description
The submission timestamp. Empty for responses that were never submitted.
Individual survey columns
Emitted for every other surveyType.
- Name
Iteration- Type
- integer
- Description
The survey iteration this response belongs to.
- Name
Respondent Name- Type
- string
- Description
The full name of the user who submitted the response.
- Name
Respondent Email- Type
- string
- Description
The respondent's e-mail address.
- Name
User Circles- Type
- string
- Description
The name of the respondent's community circle. Empty when they are in none.
- Name
User Tags- Type
- string
- Description
The respondent's community-user tags, comma-joined. Empty when they have none.
- Name
Iteration Frequency- Type
- string
- Description
The survey's
SurveyIterationTyperendered as its name.
- Name
Submission Date- Type
- string
- Description
The submission timestamp. Empty for responses that were never submitted.
Per-question columns
One further column is appended per question of the survey's form, in the form's stored question order. Its header is the question's question text, falling back to its title when question is null. Its cell is the response's answer to that question, with multiple values joined by ||, rendered according to the question's answerType:
- Name
12 Table- Description
Every stored answer row,
||-joined.
- Name
11 Country- Description
The country name resolved from the stored option order.
- Name
0, 1, 2, 3 choice types- Description
The selected option labels,
||-joined.
- Name
10 Scale- Description
The numeric option order as text.
- Name
9 File- Description
The platform base URL concatenated with the stored path, giving an absolute file URL.
- Name
every other type- Description
The raw answer with HTML tags stripped,
replaced by a space and_replaced by-.
Possible errors
- Name
401 Unauthorized- Description
The request is missing valid authentication.
- Name
403 Forbidden- Description
You are neither an admin of the survey's community nor a designated response viewer of it.
- Name
500 Internal Server Error- Description
No survey with that
surveyIdexists. A missing survey surfaces as a500rather than a404.
Request
curl -X GET https://api.babele.co/api/Survey/ExportSurveyResponses/10 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJleGFtcGxlIiwiZXhwIjoxNzQzODY1MjA3fQ.DEMO_SIGNATURE_NOT_A_REAL_TOKEN" \
-o SurveyResponses.csv
Response
Iteration,Respondent Name,Respondent Email,User Circles,User Tags,Iteration Frequency,Submission Date,Tell me your hobbies,Radio button
1,Ana Popescu,ana.popescu@example.org,Mentors,"cohort-2024,reviewed",Monthly,2024-11-01 09:12:00,Cricket||Programming,Option 1
2,Mihai Ionescu,mihai.ionescu@example.org,Startups,cohort-2024,Monthly,2024-12-15 16:48:00,Programming,Option 2
The same export for a Startup survey uses the eight-column prefix instead:
Startup header row
Iteration,Startup Name,Startup Program,Startup Tags,Respondent Name,Respondent Email,Iteration Frequency,Submission Date,Tell me your hobbies,Radio button
Survey Forms
Survey Forms are the reusable question templates referenced by a survey definition's formId. A form holds an ordered set of questions (with options, conditional logic, privacy levels, and limits) and optional sections. These endpoints live under a separate route, /api/SurveyForm.
Every one of these endpoints returns a FormDetailDto. Only the list endpoint returns the survey variant of it, which adds one extra field, associatedSurveysCount (integer), counting how many survey definitions reference the form; it is not reflected in the swagger schema, and it is not present on the get-by-id, create, or update responses.
All enums on these endpoints serialize as integers:
answerType—FormQuestionAnswerType:0RadioChoice,1CheckBoxChoice,2DropDownChoice,3MultipleChoice,4AccountMoney,5Calendar,7ShortText,8LongText,9File,10Scale,11Country,12Table,13Numeric. Negative values map to project fields (-1ProjectLogo,-2ProjectCover,-4ProjectLinkedInUrl,-5ProjectFacebookUrl,-6ProjectWebsiteUrl,-7ProjectSDGs,-8ProjectDevelopmentStage,-9ProjectCategory,-10ProjectCountry,-11ProjectCity,-12ProjectDescription,-13ProjectName) and do not occur on survey forms.type—FormType:0Undefined,1ApplicationDefinition,2Tab,3Evaluation. Survey forms always return0(Undefined).privacyLevelandchangePermissionPrivacyLevel—PrivacyLevel:0Undefined,1Public,2Community,3Team,4Custom,5TeamAndMentors,6SetByTeam.conditionalLogicType—FormQuestionConditionalLogicType:0None,1AnyConditional,2AllConditionals.conditionLogic—FormQuestionConditionLogic:1Equal,2NotEqual,3GreaterThan,4LessThan,5Contains,6DoesNotContain,7IsEmpty,8NotEmpty. There is no0member.limitType—FormQuestionLimitType:1Characters,2Words.nullwhenhasLimitisfalse.questionType—FormQuestionType:0ProjectTemplate,1AfterProjectApproval. Always0on survey forms.
List survey forms
This endpoint allows you to retrieve all survey-form definitions belonging to a community, with their full question trees. The literal GetAll segment is part of the URL.
Supplying communityId returns every survey form whose owning community matches it. A missing or non-numeric value binds to 0, which matches no community, so the endpoint returns 200 with { "count": 0, "list": [], "filters": null } rather than an error or an unscoped list.
Two behaviours differ from Get a survey form below. questions come back
unsorted here rather than sorted by questionOrder (questionOptions
and sections are sorted). And every question's privacyCirclesIds is
always [] here — fetch the form by ID to read its real circle IDs.
Required query parameters
- Name
communityId- Type
- integer
- Description
The ID of the community whose survey forms to list. Required. A missing or invalid value binds to
0and yields an empty list.
Response attributes
- Name
count- Type
- integer
- Description
The number of survey forms returned.
- Name
list- Type
- array
- Description
The survey forms belonging to the community. Described under
listarray items below.
- Name
filters- Type
- null
- Description
The question-and-answer filter facets. This endpoint never populates it, so it is always
null. When another endpoint populates it, each element is{ "question": string, "answers": [string] }.
list array items
- Name
id- Type
- integer
- Description
The ID of the survey form.
- Name
name- Type
- string | null
- Description
The form title.
- Name
description- Type
- string | null
- Description
The form description. HTML allowed.
- Name
communityId- Type
- integer
- Description
The ID of the community that owns the form.
- Name
type- Type
- integer
- Description
The
FormTypeenum value. Survey forms always return0(Undefined).
- Name
creationDate- Type
- string | null
- Description
When the form was created (ISO 8601).
nullfor forms created before this field was tracked.
- Name
lastEditionDate- Type
- string | null
- Description
When the form was last saved (ISO 8601).
nullif it has never been updated since creation.
- Name
userCreatorId- Type
- integer
- Description
The ID of the user who created the form.
0when no creator was recorded.
- Name
questions- Type
- array
- Description
The form's questions. Described under
list[].questionsarray items below.
- Name
sections- Type
- array
- Description
The form's sections, sorted by
order. Empty when the form has no sections. Described underlist[].sectionsarray items below.
- Name
includeInLandingPage- Type
- boolean
- Description
Whether the form is shown on the community landing page.
- Name
isDefaultCommunityProjectForm- Type
- boolean
- Description
Whether this is the community's default project form. Always
falsefor survey forms.
- Name
associatedSurveysCount- Type
- integer
- Description
How many survey definitions reference this form. Present on this endpoint only.
list[].sections array items
- Name
id- Type
- integer
- Description
The ID of the section.
- Name
title- Type
- string
- Description
The section heading. A blank title is rejected on save, so this is always populated.
- Name
description- Type
- string | null
- Description
The section's description.
nullwhen not set.
- Name
order- Type
- integer
- Description
The zero-based position of the section within the form. Sections are returned sorted by this value.
list[].questions array items
- Name
id- Type
- integer
- Description
The ID of the question.
- Name
title- Type
- string | null
- Description
The question's internal title, used as a fallback label when
questionisnull.
- Name
description- Type
- string | null
- Description
Help text shown under the question. HTML allowed.
nullwhen never set,""when cleared.
- Name
question- Type
- string | null
- Description
The question text shown to respondents.
nullwhen the form only defines atitle.
- Name
questionOrder- Type
- integer
- Description
The zero-based position of the question within the form.
- Name
mandatoryAnswer- Type
- boolean
- Description
Whether an answer is required.
- Name
editableAnswer- Type
- boolean
- Description
Whether the respondent can change the answer after submitting.
- Name
answerType- Type
- integer
- Description
The
FormQuestionAnswerTypeenum value — see the mapping in the Survey Forms preamble above.
- Name
isProjectField- Type
- boolean
- Description
Computed and read-only:
truewhenanswerTypeis negative, meaning the question maps onto a project field rather than a stored answer. Alwaysfalseon survey forms.
- Name
allowMultipleAnswer- Type
- boolean
- Description
Whether more than one option may be selected.
- Name
questionLinks- Type
- array
- Description
Reference links attached to the question. Described under
list[].questions[].questionLinksarray items below.
- Name
questionOptions- Type
- array
- Description
The selectable options, sorted by
questionOptionOrder(alphabetically by label foranswerType11Country). Described underlist[].questions[].questionOptionsarray items below.
- Name
isFilterable- Type
- boolean | null
- Description
Whether answers to this question can be used as a filter facet.
nullwhen the flag was never set.
- Name
privacyLevel- Type
- integer
- Description
The
PrivacyLevelenum value controlling who can see the answers.
- Name
privacyCirclesIds- Type
- array of integer
- Description
The community-circle IDs allowed to see the answers when
privacyLevelis4(Custom). Always[]on this endpoint — see the note above.
- Name
conditionalLogicType- Type
- integer
- Description
The
FormQuestionConditionalLogicTypeenum value:0no conditions,1show when any condition matches,2show when all conditions match.
- Name
formQuestionConditionalLogicList- Type
- array
- Description
The conditions that make this question appear. Empty when
conditionalLogicTypeis0. Described underlist[].questions[].formQuestionConditionalLogicListarray items below.
- Name
fromApplication- Type
- boolean
- Description
Whether the question was copied from an application form. Always
falseon survey forms.
- Name
hasWeightedAverage- Type
- boolean
- Description
Computed and read-only:
truewhenweightedAveragehas a value. Alwaysfalseon survey forms.
- Name
weightedAverage- Type
- number | null
- Description
The question's weight, used only by evaluation forms. Always
nullon survey forms.
- Name
convertToKpi- Type
- boolean
- Description
Whether answers to this question are converted into KPI values.
- Name
changePermissionPrivacyLevel- Type
- integer
- Description
The
PrivacyLevelrequired to change the answer. Always0(Undefined) on survey forms.
- Name
questionType- Type
- integer
- Description
The
FormQuestionTypeenum value. Always0on survey forms.
- Name
includeInProjectProfile- Type
- boolean
- Description
Whether the answer is surfaced on the project profile. Always
falseon survey forms.
- Name
hasLimit- Type
- boolean
- Description
Whether a length limit applies to the answer.
- Name
limitType- Type
- integer | null
- Description
The
FormQuestionLimitTypeenum value:1characters,2words.nullwhenhasLimitisfalse.
- Name
limitValue- Type
- integer | null
- Description
The maximum number of characters or words.
nullwhenhasLimitisfalse.
- Name
defaultProjectFormQuestionId- Type
- integer | null
- Description
The default community project-form question this one mirrors. Always
nullon survey forms.
- Name
sectionId- Type
- integer | null
- Description
The ID of the section this question belongs to, or
nullwhen the question is not in a section.
list[].questions[].questionLinks array items
- Name
questionLink- Type
- string | null
- Description
A reference URL attached to the question. This is the element's only member — the link's own ID is not exposed.
list[].questions[].questionOptions array items
- Name
id- Type
- integer
- Description
The ID of the option.
- Name
questionOption- Type
- string | null
- Description
The option label shown to respondents.
- Name
questionOptionOrder- Type
- integer
- Description
The zero-based position of the option. Answers reference this order, not the option ID.
list[].questions[].formQuestionConditionalLogicList array items
- Name
id- Type
- integer
- Description
The ID of the condition row.
- Name
conditionFormQuestionId- Type
- integer
- Description
The ID of the question whose answer is tested. It is always another question on the same form.
- Name
formQuestionOptionId- Type
- integer | null
- Description
The ID of the option the answer is compared against, for choice questions.
nullwhencustomValueis used instead.
- Name
customValue- Type
- string | null
- Description
The literal value the answer is compared against, for free-text questions.
nullor""whenformQuestionOptionIdis used instead. The two are mutually exclusive.
- Name
conditionLogic- Type
- integer
- Description
The
FormQuestionConditionLogiccomparison — see the mapping in the Survey Forms preamble above.
Possible errors
- Name
401 Unauthorized- Description
The request is missing valid authentication.
Request
curl -X GET https://api.babele.co/api/SurveyForm/GetAll?communityId=999 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJleGFtcGxlIiwiZXhwIjoxNzQzODY1MjA3fQ.DEMO_SIGNATURE_NOT_A_REAL_TOKEN"
Response
{
"count": 1,
"list": [
{
"id": 1258,
"name": "Impact Baseline Survey",
"description": "<p>Test all questions</p>",
"communityId": 999,
"type": 0,
"creationDate": "2023-05-23T14:19:16.203812Z",
"lastEditionDate": "2024-12-16T23:56:29.628361Z",
"userCreatorId": 398964,
"questions": [
{
"id": 781,
"title": "Short question test",
"description": "<p>Short question description</p>",
"question": "Tell me your hobbies",
"questionOrder": 0,
"mandatoryAnswer": true,
"editableAnswer": false,
"answerType": 7,
"isProjectField": false,
"allowMultipleAnswer": false,
"questionLinks": [
{ "questionLink": "https://babele.co/help/hobbies" }
],
"questionOptions": [
{ "id": 1011, "questionOption": "Cricket", "questionOptionOrder": 0 },
{ "id": 1012, "questionOption": "Programming", "questionOptionOrder": 1 }
],
"isFilterable": false,
"privacyLevel": 1,
"privacyCirclesIds": [],
"conditionalLogicType": 0,
"formQuestionConditionalLogicList": [],
"fromApplication": false,
"hasWeightedAverage": false,
"weightedAverage": null,
"convertToKpi": false,
"changePermissionPrivacyLevel": 0,
"questionType": 0,
"includeInProjectProfile": false,
"hasLimit": true,
"limitType": 2,
"limitValue": 150,
"defaultProjectFormQuestionId": null,
"sectionId": 44
},
{
"id": 1996,
"title": "Account money test",
"description": "<p>Account money description</p>",
"question": null,
"questionOrder": 11,
"mandatoryAnswer": true,
"editableAnswer": false,
"answerType": 4,
"isProjectField": false,
"allowMultipleAnswer": false,
"questionLinks": [],
"questionOptions": [],
"isFilterable": null,
"privacyLevel": 1,
"privacyCirclesIds": [],
"conditionalLogicType": 1,
"formQuestionConditionalLogicList": [
{
"id": 949,
"conditionFormQuestionId": 1989,
"formQuestionOptionId": 3588,
"customValue": "",
"conditionLogic": 1
}
],
"fromApplication": false,
"hasWeightedAverage": false,
"weightedAverage": null,
"convertToKpi": true,
"changePermissionPrivacyLevel": 0,
"questionType": 0,
"includeInProjectProfile": false,
"hasLimit": false,
"limitType": null,
"limitValue": null,
"defaultProjectFormQuestionId": null,
"sectionId": 45
}
],
"sections": [
{ "id": 44, "title": "Baseline", "description": "<p>Questions about your starting point</p>", "order": 0 },
{ "id": 45, "title": "Impact", "description": null, "order": 1 }
],
"includeInLandingPage": false,
"isDefaultCommunityProjectForm": false,
"associatedSurveysCount": 3
}
],
"filters": null
}
Get a survey form
This endpoint allows you to fetch a single survey-form definition — its full question and section tree — by its ID.
This endpoint takes no communityId — a form is addressed by its ID alone. Requires an authenticated request.
Path parameters
- Name
id- Type
- integer
- Description
The ID of the survey form to retrieve.
Response attributes
The body is a plain FormDetailDto — the same shape as the list array items of List survey forms above, minus associatedSurveysCount, which that endpoint alone adds. sections, questions, and the three nested question collections have the same shapes documented there.
Two things differ from the list endpoint: questions come back sorted by questionOrder, and each question's privacyCirclesIds is populated with the community-circle IDs allowed to see that question's answers.
Possible errors
- Name
401 Unauthorized- Description
The request is missing valid authentication.
- Name
404 Not Found- Description
No survey form with that ID exists.
Request
curl -X GET https://api.babele.co/api/SurveyForm/1258 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJleGFtcGxlIiwiZXhwIjoxNzQzODY1MjA3fQ.DEMO_SIGNATURE_NOT_A_REAL_TOKEN"
Response
{
"id": 1258,
"name": "Impact Baseline Survey",
"description": "<p>Test all questions</p>",
"communityId": 999,
"type": 0,
"creationDate": "2023-05-23T14:19:16.203812Z",
"lastEditionDate": "2024-12-16T23:56:29.628361Z",
"userCreatorId": 398964,
"questions": [
{
"id": 15,
"title": "First question test?",
"description": "<p>Long question description</p>",
"question": null,
"questionOrder": 1,
"mandatoryAnswer": true,
"editableAnswer": false,
"answerType": 7,
"isProjectField": false,
"allowMultipleAnswer": false,
"questionLinks": [],
"questionOptions": [],
"isFilterable": null,
"privacyLevel": 1,
"privacyCirclesIds": [],
"conditionalLogicType": 0,
"formQuestionConditionalLogicList": [],
"fromApplication": false,
"hasWeightedAverage": false,
"weightedAverage": null,
"convertToKpi": false,
"changePermissionPrivacyLevel": 0,
"questionType": 0,
"includeInProjectProfile": false,
"hasLimit": false,
"limitType": null,
"limitValue": null,
"defaultProjectFormQuestionId": null,
"sectionId": 44
},
{
"id": 1963,
"title": "Radio button",
"description": "",
"question": "Radio button",
"questionOrder": 3,
"mandatoryAnswer": true,
"editableAnswer": false,
"answerType": 0,
"isProjectField": false,
"allowMultipleAnswer": false,
"questionLinks": [
{ "questionLink": "https://babele.co/help/radio-button" }
],
"questionOptions": [
{ "id": 3529, "questionOption": "Option 1", "questionOptionOrder": 0 },
{ "id": 3530, "questionOption": "Option 2", "questionOptionOrder": 1 }
],
"isFilterable": false,
"privacyLevel": 4,
"privacyCirclesIds": [11, 22],
"conditionalLogicType": 1,
"formQuestionConditionalLogicList": [
{
"id": 949,
"conditionFormQuestionId": 15,
"formQuestionOptionId": null,
"customValue": "Cricket",
"conditionLogic": 5
}
],
"fromApplication": false,
"hasWeightedAverage": false,
"weightedAverage": null,
"convertToKpi": true,
"changePermissionPrivacyLevel": 0,
"questionType": 0,
"includeInProjectProfile": false,
"hasLimit": true,
"limitType": 1,
"limitValue": 500,
"defaultProjectFormQuestionId": null,
"sectionId": 45
}
],
"sections": [
{ "id": 44, "title": "Baseline", "description": "<p>Questions about your starting point</p>", "order": 0 },
{ "id": 45, "title": "Impact", "description": null, "order": 1 }
],
"includeInLandingPage": false,
"isDefaultCommunityProjectForm": false
}
Create a survey form
This endpoint allows you to create a new survey form — its questions, options, and sections — in a community. The saved form is returned with server-assigned IDs as a FormDetailDto. Note this responds with 200 OK, not 201 Created.
Use id: 0 for new questions, options, and sections. The type field is a FormType enum; survey forms always read back as 0 (Undefined) whatever you send.
communityId names the community the form is created under. It must resolve to an existing community: an omitted value, a 0, or an unknown ID all come back as 500.
Conditional logic cannot be set in this call. Every
conditionFormQuestionId must already name a question that exists on the
form, and on the create path the form starts with no questions — so any
question carrying a non-empty formQuestionConditionalLogicList is
rejected, and the failure comes back as a 500. Create the questions
first and add their conditional logic in a follow-up PUT that targets
the already-persisted questions: that is the only path which honours
conditionalLogicType and stores the conditionLogic comparison.
Request body attributes
- Name
name- Type
- string
- Description
The form title.
- Name
description- Type
- string
- Description
A description of the form. HTML allowed.
- Name
communityId- Type
- integer
- Description
The owning community ID. Required, and it must be an existing community.
- Name
type- Type
- integer
- Description
The
FormTypeenum value. Required by the schema, but not round-tripped — survey forms always return0(Undefined).
- Name
questions- Type
- array
- Description
The full set of questions. Described under
questionsarray items below.
- Name
sections- Type
- array
- Description
The form sections. Described under
sectionsarray items below. Omitting the key entirely leaves existing sections untouched.
- Name
includeInLandingPage- Type
- boolean
- Description
Whether to show this form on the community landing page.
- Name
isDefaultCommunityProjectForm- Type
- boolean
- Description
Whether this is the default community project form.
questions array items
- Name
id- Type
- integer
- Description
The ID of the question. Use
0for a new question.
- Name
title- Type
- string | null
- Description
The question's internal title, used as the label when
questionis omitted.
- Name
description- Type
- string | null
- Description
Help text shown under the question. HTML allowed.
- Name
question- Type
- string | null
- Description
The question text shown to respondents.
- Name
questionOrder- Type
- integer
- Description
The zero-based position of the question within the form.
- Name
mandatoryAnswer- Type
- boolean
- Description
Whether an answer is required.
- Name
editableAnswer- Type
- boolean
- Description
Whether the respondent can change the answer after submitting.
- Name
answerType- Type
- integer
- Description
The
FormQuestionAnswerTypeenum value — see the mapping in the Survey Forms preamble above.
- Name
allowMultipleAnswer- Type
- boolean
- Description
Whether more than one option may be selected.
- Name
questionLinks- Type
- array
- Description
Reference links to attach to the question. Omit or send
[]for none. Described underquestions[].questionLinksarray items below.
- Name
questionOptions- Type
- array
- Description
The selectable options. Ignored for
answerType11(Country), whose options are managed by the platform. Described underquestions[].questionOptionsarray items below.
- Name
isFilterable- Type
- boolean | null
- Description
Whether answers to this question can be used as a filter facet.
- Name
privacyLevel- Type
- integer
- Description
The
PrivacyLevelenum value controlling who can see the answers.
- Name
privacyCirclesIds- Type
- array of integer
- Description
Community-circle IDs allowed to see the answers when
privacyLevelis4(Custom). Send[]for none. On a question being created, every ID must resolve to an existing community circle — a request that mixes valid and unknown IDs fails with a500. When none of the IDs resolves, the list is silently ignored.
- Name
conditionalLogicType- Type
- integer
- Description
The
FormQuestionConditionalLogicTypeenum value. For a question that already exists on the form, conditions are only persisted when itsconditionalLogicTypeis1or2. For a question created in the same call the conditions are mapped regardless ofconditionalLogicType— butconditionLogicis not carried through and everyconditionFormQuestionIdmust already exist on the form, so create the questions first and add their conditional logic in a follow-upPUT.
- Name
formQuestionConditionalLogicList- Type
- array
- Description
The conditions that make this question appear. Described under
questions[].formQuestionConditionalLogicListarray items below.
- Name
hasWeightedAverage- Type
- boolean
- Description
Whether the question carries an evaluation weight. Ignored on survey forms.
- Name
weightedAverage- Type
- number | null
- Description
The question's weight. Ignored on survey forms.
- Name
convertToKpi- Type
- boolean
- Description
Whether answers to this question are converted into KPI values.
- Name
changePermissionPrivacyLevel- Type
- integer
- Description
The
PrivacyLevelrequired to change the answer. Ignored on survey forms.
- Name
questionType- Type
- integer
- Description
The
FormQuestionTypeenum value. Ignored on survey forms.
- Name
includeInProjectProfile- Type
- boolean
- Description
Whether the answer is surfaced on the project profile. Ignored on survey forms.
- Name
hasLimit- Type
- boolean
- Description
Whether a length limit applies to the answer. Set
hasLimit,limitTypeandlimitValueconsistently — an inconsistent combination is stored as sent.
- Name
limitType- Type
- integer | null
- Description
The
FormQuestionLimitTypeenum value:1characters,2words. SendnullwhenhasLimitisfalse.
- Name
limitValue- Type
- integer | null
- Description
The maximum number of characters or words allowed. Send
nullwhenhasLimitisfalse.
- Name
defaultProjectFormQuestionId- Type
- integer | null
- Description
Links the question to a default community project-form question. Ignored on survey forms.
- Name
sectionId- Type
- integer | null
- Description
Places the question in a section. For a section that already exists, send its
id. For a section being created in the same request (sections[].idof0), send that section'sorderinstead — the server resolves it once the section has been created. A value matching neither is cleared tonull.
questions[].questionLinks array items
- Name
questionLink- Type
- string | null
- Description
A reference URL to show alongside the question. This is the element's only member; links are replaced wholesale on every save.
questions[].questionOptions array items
- Name
id- Type
- integer
- Description
Use
0to create a new option. On update, reusing an existing option's ID keeps its stored answers attached.
- Name
questionOption- Type
- string | null
- Description
The option label shown to respondents.
- Name
questionOptionOrder- Type
- integer
- Description
The zero-based position of the option. Existing answers are re-pointed when this order changes.
questions[].formQuestionConditionalLogicList array items
- Name
id- Type
- integer
- Description
Ignored on write — conditions are always re-created. Send
0.
- Name
conditionFormQuestionId- Type
- integer
- Description
The ID of the question whose answer is tested. It must already exist on this form, otherwise the request is rejected.
- Name
formQuestionOptionId- Type
- integer | null
- Description
The option ID the answer is compared against. Mutually exclusive with
customValue.
- Name
customValue- Type
- string | null
- Description
The literal value the answer is compared against. Mutually exclusive with
formQuestionOptionId.
- Name
conditionLogic- Type
- integer
- Description
The
FormQuestionConditionLogiccomparison (1–8). Values outside that range are rejected. Not carried through on the create path — see the note above.
sections array items
- Name
id- Type
- integer
- Description
Use
0to create a new section. On update, anidgreater than0must belong to this form.
- Name
title- Type
- string
- Description
The section heading. Required — a blank or whitespace title is rejected.
- Name
description- Type
- string | null
- Description
The section description. Optional.
- Name
order- Type
- integer
- Description
The zero-based position of the section. Must be unique within the form. It doubles as the handle a new question uses in
sectionIdbefore the section has an ID.
Response attributes
The body is a plain FormDetailDto — the same shape as the response attributes of Get a survey form above, including its sections, questions, and nested question collections. It does not carry associatedSurveysCount. lastEditionDate is null on a freshly created form.
Possible errors
- Name
400 Bad Request- Description
The request body could not be parsed.
- Name
401 Unauthorized- Description
The request is missing valid authentication.
- Name
500 Internal Server Error- Description
An unknown or zero
communityId, invalid conditional-logic data, a blank section title, a duplicate sectionorder, or an unknown section ID.
Request
curl -X POST https://api.babele.co/api/SurveyForm \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJleGFtcGxlIiwiZXhwIjoxNzQzODY1MjA3fQ.DEMO_SIGNATURE_NOT_A_REAL_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Impact Baseline Survey","description":"<p>Annual impact baseline</p>","communityId":999,"type":0,"includeInLandingPage":false,"isDefaultCommunityProjectForm":false,"sections":[{"id":0,"title":"Baseline","description":"<p>Questions about your starting point</p>","order":0}],"questions":[{"id":0,"title":"Tell me your hobbies","description":"<p>Short question description</p>","question":"Tell me your hobbies","questionOrder":0,"mandatoryAnswer":true,"editableAnswer":false,"answerType":7,"allowMultipleAnswer":false,"questionLinks":[{"questionLink":"https://babele.co/help/hobbies"}],"questionOptions":[{"id":0,"questionOption":"Cricket","questionOptionOrder":0},{"id":0,"questionOption":"Programming","questionOptionOrder":1}],"isFilterable":false,"privacyLevel":4,"privacyCirclesIds":[11,22],"conditionalLogicType":0,"formQuestionConditionalLogicList":[],"hasWeightedAverage":false,"weightedAverage":null,"convertToKpi":false,"changePermissionPrivacyLevel":0,"questionType":0,"includeInProjectProfile":false,"hasLimit":true,"limitType":2,"limitValue":150,"defaultProjectFormQuestionId":null,"sectionId":0}]}'
Response
{
"id": 1258,
"name": "Impact Baseline Survey",
"description": "<p>Annual impact baseline</p>",
"communityId": 999,
"type": 0,
"creationDate": "2024-12-16T23:56:29.628361Z",
"lastEditionDate": null,
"userCreatorId": 398964,
"questions": [
{
"id": 781,
"title": "Tell me your hobbies",
"description": "<p>Short question description</p>",
"question": "Tell me your hobbies",
"questionOrder": 0,
"mandatoryAnswer": true,
"editableAnswer": false,
"answerType": 7,
"isProjectField": false,
"allowMultipleAnswer": false,
"questionLinks": [
{ "questionLink": "https://babele.co/help/hobbies" }
],
"questionOptions": [
{ "id": 1011, "questionOption": "Cricket", "questionOptionOrder": 0 },
{ "id": 1012, "questionOption": "Programming", "questionOptionOrder": 1 }
],
"isFilterable": false,
"privacyLevel": 4,
"privacyCirclesIds": [11, 22],
"conditionalLogicType": 0,
"formQuestionConditionalLogicList": [],
"fromApplication": false,
"hasWeightedAverage": false,
"weightedAverage": null,
"convertToKpi": false,
"changePermissionPrivacyLevel": 0,
"questionType": 0,
"includeInProjectProfile": false,
"hasLimit": true,
"limitType": 2,
"limitValue": 150,
"defaultProjectFormQuestionId": null,
"sectionId": 44
}
],
"sections": [
{ "id": 44, "title": "Baseline", "description": "<p>Questions about your starting point</p>", "order": 0 }
],
"includeInLandingPage": false,
"isDefaultCommunityProjectForm": false
}
Update a survey form
This endpoint allows you to replace an existing survey form definition. It is a full replace of the form, not a patch, and responds with 200 OK returning the saved FormDetailDto. The body is the same FormDto as the create endpoint.
communityId is writable here. The body's value is written straight onto
the stored form, so sending a value different from the form's current
community moves the form into that community. Always echo the form's
existing communityId unless a move is intended. A value that does not
resolve to an existing community comes back as 500.
Replacement semantics to keep in mind: questions on the form but absent from questions are deleted; a body question whose id matches a persisted question is updated in place, while an id of 0 (or any ID not on the form) creates a new question; and omitting the questions key entirely preserves the existing questions. Sections behave the same way — sections absent from sections are removed and their questions' sectionId is cleared, while omitting the key leaves sections untouched.
Path parameters
- Name
id- Type
- integer
- Description
The ID of the survey form to update.
Request body attributes
- Name
name- Type
- string
- Description
The form title.
- Name
description- Type
- string
- Description
A description of the form. HTML allowed.
- Name
communityId- Type
- integer
- Description
The owning community ID. Required, and writable — see the note above.
- Name
type- Type
- integer
- Description
The
FormTypeenum value. Required by the schema, but not round-tripped — survey forms always return0(Undefined).
- Name
questions- Type
- array
- Description
The full set of questions. Same item shape as the
questionsarray items of Create a survey form above, including the nestedquestionLinks,questionOptionsandformQuestionConditionalLogicListcollections. Existing questions keep their IDs; new ones useid: 0.
- Name
sections- Type
- array
- Description
The form sections. Same item shape as the
sectionsarray items of Create a survey form above. Anidgreater than0that is not on this form is rejected.
- Name
includeInLandingPage- Type
- boolean
- Description
Whether to show this form on the community landing page.
- Name
isDefaultCommunityProjectForm- Type
- boolean
- Description
Whether this is the default community project form.
Three update-only behaviours are easy to trip over. Removing an option
from questionOptions deletes the answers recorded against its
questionOptionOrder, and changing an option's order rewrites existing
answers to the new order — reuse an option's id to keep its answers.
For a question that already exists, the whole condition set is deleted
and rebuilt from the body, and here conditionLogic is carried
through (unlike the create path). And privacyCirclesIds are reconciled
add/remove, with an unknown circle ID stored as-is.
Response attributes
The body is a plain FormDetailDto — the same shape as the response attributes of Get a survey form above, including its sections, questions, and nested question collections. It does not carry associatedSurveysCount.
Possible errors
- Name
400 Bad Request- Description
The request body could not be parsed.
- Name
401 Unauthorized- Description
The request is missing valid authentication.
- Name
404 Not Found- Description
No survey form with that ID exists.
- Name
500 Internal Server Error- Description
An unknown
communityId, invalid conditional-logic data, a blank section title, a duplicate sectionorder, or a section ID that does not belong to this form.
Request
curl -X PUT https://api.babele.co/api/SurveyForm/1258 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJleGFtcGxlIiwiZXhwIjoxNzQzODY1MjA3fQ.DEMO_SIGNATURE_NOT_A_REAL_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Impact Baseline Survey (rev 2)","description":"<p>Annual impact baseline</p>","communityId":999,"type":0,"includeInLandingPage":false,"isDefaultCommunityProjectForm":false,"sections":[{"id":44,"title":"Baseline","description":"<p>Questions about your starting point</p>","order":0},{"id":0,"title":"Impact","description":null,"order":1}],"questions":[{"id":781,"title":"Tell me your hobbies","description":"<p>Short question description</p>","question":"Tell me your hobbies","questionOrder":0,"mandatoryAnswer":true,"editableAnswer":false,"answerType":7,"allowMultipleAnswer":false,"questionLinks":[{"questionLink":"https://babele.co/help/hobbies"}],"questionOptions":[{"id":1011,"questionOption":"Cricket","questionOptionOrder":0}],"isFilterable":false,"privacyLevel":4,"privacyCirclesIds":[11,22],"conditionalLogicType":0,"formQuestionConditionalLogicList":[],"hasWeightedAverage":false,"weightedAverage":null,"convertToKpi":false,"changePermissionPrivacyLevel":0,"questionType":0,"includeInProjectProfile":false,"hasLimit":true,"limitType":2,"limitValue":150,"defaultProjectFormQuestionId":null,"sectionId":44}]}'
Response
{
"id": 1258,
"name": "Impact Baseline Survey (rev 2)",
"description": "<p>Annual impact baseline</p>",
"communityId": 999,
"type": 0,
"creationDate": "2023-05-23T14:19:16.203812Z",
"lastEditionDate": "2024-12-16T23:56:29.628361Z",
"userCreatorId": 398964,
"questions": [
{
"id": 781,
"title": "Tell me your hobbies",
"description": "<p>Short question description</p>",
"question": "Tell me your hobbies",
"questionOrder": 0,
"mandatoryAnswer": true,
"editableAnswer": false,
"answerType": 7,
"isProjectField": false,
"allowMultipleAnswer": false,
"questionLinks": [
{ "questionLink": "https://babele.co/help/hobbies" }
],
"questionOptions": [
{ "id": 1011, "questionOption": "Cricket", "questionOptionOrder": 0 }
],
"isFilterable": false,
"privacyLevel": 4,
"privacyCirclesIds": [11, 22],
"conditionalLogicType": 0,
"formQuestionConditionalLogicList": [],
"fromApplication": false,
"hasWeightedAverage": false,
"weightedAverage": null,
"convertToKpi": false,
"changePermissionPrivacyLevel": 0,
"questionType": 0,
"includeInProjectProfile": false,
"hasLimit": true,
"limitType": 2,
"limitValue": 150,
"defaultProjectFormQuestionId": null,
"sectionId": 44
}
],
"sections": [
{ "id": 44, "title": "Baseline", "description": "<p>Questions about your starting point</p>", "order": 0 },
{ "id": 46, "title": "Impact", "description": null, "order": 1 }
],
"includeInLandingPage": false,
"isDefaultCommunityProjectForm": false
}
Delete a survey form
This endpoint allows you to permanently remove a survey-form definition.
A form whose questions already have recorded answers cannot be deleted —
the request fails with a 500. The number of survey definitions
referencing the form (associatedSurveysCount) does not block deletion.
Path parameters
- Name
id- Type
- integer
- Description
The ID of the survey form to delete.
Possible errors
- Name
401 Unauthorized- Description
The request is missing valid authentication.
- Name
404 Not Found- Description
No survey form with that ID exists.
- Name
500 Internal Server Error- Description
The form has at least one recorded answer and cannot be deleted.
Request
curl -X DELETE https://api.babele.co/api/SurveyForm/1258 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJleGFtcGxlIiwiZXhwIjoxNzQzODY1MjA3fQ.DEMO_SIGNATURE_NOT_A_REAL_TOKEN"
Response
204 No Content
Delete a survey form question
This endpoint allows you to delete a single question from a survey form by its question ID. The literal RemoveQuestionById segment is part of the URL.
Path parameters
- Name
questionId- Type
- integer
- Description
The ID of the form question to delete.
Possible errors
- Name
401 Unauthorized- Description
The request is missing valid authentication.
- Name
404 Not Found- Description
No form question with that ID exists.
Request
curl -X DELETE https://api.babele.co/api/SurveyForm/RemoveQuestionById/781 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJleGFtcGxlIiwiZXhwIjoxNzQzODY1MjA3fQ.DEMO_SIGNATURE_NOT_A_REAL_TOKEN"
Response
204 No Content
