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/api/Survey/survey-definition/{id}

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 SurveyType enum value: 0 Individual, 1 Startup.

  • 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, iterationDuration and the current date. It is always 1 or greater — non-recurrent surveys and surveys with an iterationDuration of 0 report 1.

  • Name
    iterationDuration
    Type
    integer
    Description

    The length of one iteration in days, derived from iterationType: 7 Weekly, 30 Monthly, 90 Quarterly, 180 Semestral, 365 Yearly, customIteration (or 30) for Custom, and 30 otherwise.

  • Name
    iterationType
    Type
    integer
    Description

    The SurveyIterationType enum value: 0 Weekly, 1 Monthly, 2 Quarterly, 3 Semestral, 4 Yearly, 5 Custom, 6 NonRecurrent.

  • 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). null on 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, iterationType and iterationDuration. For non-recurrent surveys it is the endDate.

  • Name
    surveyResponseViewers
    Type
    array
    Description

    The users granted read access to this survey's responses. Described under surveyResponseViewers array items below.

  • Name
    allowAccessToResponses
    Type
    boolean
    Description

    Whether the surveyResponseViewers grant is active. While it is false the listed viewers get no access.

  • Name
    currentUserIsResponseViewerOnly
    Type
    boolean
    Description

    true when 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 null on endpoints that return the viewer rows without the user record. Described under surveyResponseViewers[].user object 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 500 rather than a 404.

Request

GET
/api/Survey/survey-definition/{id}
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
}

POST/api/Survey/survey-definitions

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 statusFilters object below.

  • Name
    iterationFilters
    Type
    object
    Description

    Optional filter on the survey's current iteration index. Described under iterationFilters object below.

statusFilters object

  • Name
    type
    Type
    integer
    Description

    The DynamicFilterType enum value: 0 IsAnyOf (keep matches), 1 IsNoneOf (exclude matches).

  • Name
    values
    Type
    array of integer
    Description

    The SurveyStatus values to match: 0 Draft (the start date is in the future), 1 Active (started and not yet ended), 2 Expired (the end date has passed). The whole filter is ignored when this is null or empty, and values outside that range match nothing.

iterationFilters object

  • Name
    type
    Type
    integer
    Description

    The DynamicFilterType enum value: 0 IsAnyOf, 1 IsNoneOf.

  • Name
    values
    Type
    array of integer
    Description

    The iteration indexes to match. A survey's current index is the whole number of iterationDuration days elapsed since its startDate; surveys with an iterationDuration of 0 match the value 1. The whole filter is ignored when this is null or 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 list array 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). null when the definition has no end date.

  • Name
    iterationNumber
    Type
    integer
    Description

    The current iteration of the survey. Always 1 or 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

POST
/api/Survey/survey-definitions
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
    }
]
}

POST/api/Survey/survey-definition

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).

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 SurveyType enum 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 SurveyIterationType enum 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 surveyProjectTags when surveyType is 1 (Startup).

  • Name
    deadline
    Type
    string
    Description

    The response deadline (ISO 8601). Accepted but inert — it is never stored, and the deadline you read back is always computed from startDate, iterationType and iterationDuration.

  • 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 iterationType is 5 (Custom). Send null for every other iteration type — the value is ignored, and when iterationType is Custom a null falls back to 30 days.

  • Name
    surveyResponseViewers
    Type
    array
    Description

    The users to grant read access to this survey's responses. Only takes effect when allowAccessToResponses is true. Described under surveyResponseViewers array items below.

  • Name
    allowAccessToResponses
    Type
    boolean
    Description

    Whether the users listed in surveyResponseViewers may read this survey's responses. Defaults to false; while it is false the 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 userId values are collapsed, and sending null for 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 null here. The viewer rows returned on the create path carry only userId.

  • Name
    currentUserIsResponseViewerOnly
    Type
    boolean
    Description

    Always false here. 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, an endDate earlier than startDate, or a Startup survey with neither surveyMethodologies nor surveyProjectTags.

Request

POST
/api/Survey/survey-definition
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
}

PUT/api/Survey/survey-definitions/{surveyId}

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.

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 SurveyType enum 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 iterationType and customIteration on 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 null or [] 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 null or [] 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 null or [] removes all of them.

  • Name
    surveyProjectTags
    Type
    array of string
    Description

    Project tag names the survey targets. Full replacement set; sending null or [] removes all of them.

  • Name
    iterationType
    Type
    integer
    Description

    The SurveyIterationType enum value.

  • Name
    customIteration
    Type
    integer | null
    Description

    The iteration length in days, used only when iterationType is 5 (Custom). Send null for every other iteration type — the value is ignored, and when iterationType is Custom a null falls back to 30 days.

  • 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 null revokes all of them. Described under surveyResponseViewers array items below.

  • Name
    allowAccessToResponses
    Type
    boolean
    Description

    Whether the users in surveyResponseViewers may read this survey's responses. It is written on every update, so omitting it sends false and 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 userId values 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 surveyId exists. A missing survey surfaces as a 500 rather than a 404.

Request

PUT
/api/Survey/survey-definitions/{surveyId}
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/api/Survey/survey-definition/{surveyId}

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 surveyId exists. A missing survey surfaces as a 500 rather than a 404.

Request

DELETE
/api/Survey/survey-definition/{surveyId}
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/api/Survey/survey-response/{id}

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.

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 SurveyResponseStatus enum value: 0 Pending (draft), 1 Submitted.

  • 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. null for surveys whose iterationType is 5 (Custom) or 6 (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. null on 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 answers array items below.

  • Name
    projectName
    Type
    string | null
    Description

    The name of the project in projectId. null when projectId is null.

  • 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 true for a non-recurrent survey with an iterationDuration of 0.

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). null on answers stored without a timestamp.

  • Name
    optionAnswerOrder
    Type
    integer
    Description

    The zero-based order of the selected option for choice questions. 0 for 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. 0 for 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 500 rather than a 404.

Request

GET
/api/Survey/survey-response/{id}
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
}

POST/api/Survey/survey-definition/{id}/survey-responses

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.

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 submissionDateFilters object below.

  • Name
    tagFilters
    Type
    object
    Description

    Optional filter on the response's tags. Described under tagFilters object below.

  • Name
    statusFilters
    Type
    object
    Description

    Optional filter on the response's status. Described under statusFilters object below.

  • Name
    iterationFilters
    Type
    object
    Description

    Optional filter on the response's iteration number. Described under iterationFilters object below.

  • Name
    projectFilters
    Type
    object
    Description

    Optional filter on the response's community-project link. Described under projectFilters object below.

  • Name
    userFilters
    Type
    object
    Description

    Optional filter on the response's author. Described under userFilters object 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 to false.

submissionDateFilters object

  • Name
    type
    Type
    integer
    Description

    The DynamicFilterType enum value: 0 IsAnyOf, 1 IsNoneOf.

  • 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 IsNoneOf the filter also keeps responses that were never submitted.

tagFilters object

  • Name
    type
    Type
    integer
    Description

    The DynamicFilterType enum value: 0 IsAnyOf, 1 IsNoneOf.

  • 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 DynamicFilterType enum value: 0 IsAnyOf, 1 IsNoneOf.

  • Name
    values
    Type
    array of integer
    Description

    The SurveyResponseStatus values to match: 0 Pending (draft), 1 Submitted. This is a different enum from the statusFilters on List survey definitions above, which uses SurveyStatus.

iterationFilters object

  • Name
    type
    Type
    integer
    Description

    The DynamicFilterType enum value: 0 IsAnyOf, 1 IsNoneOf.

  • 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 DynamicFilterType enum value: 0 IsAnyOf, 1 IsNoneOf.

  • 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 IsNoneOf the filter additionally drops every response with no project link.

userFilters object

  • Name
    type
    Type
    integer
    Description

    The DynamicFilterType enum value: 0 IsAnyOf, 1 IsNoneOf.

  • 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 list array items below.

  • Name
    surveyResponseFilters
    Type
    object
    Description

    The filter facets computed from the responses on this page. Described under surveyResponseFilters object 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 two SurveyResponseStatus values (0 Pending, 1 Submitted) 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.projectFilters array items below.

  • Name
    userFilters
    Type
    array
    Description

    The authors of the returned responses. Described under surveyResponseFilters.userFilters array items below.

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 500 rather than a 404.

Request

POST
/api/Survey/survey-definition/{id}/survey-responses
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" }
    ]
}
}

POST/api/Survey/survey-response

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.

Request body attributes

  • Name
    surveyId
    Type
    integer
    Description

    The ID of the survey being answered. Required.

  • Name
    status
    Type
    integer
    Description

    The SurveyResponseStatus enum value (0 Pending/Draft, 1 Submitted). 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 communityProjectId takes 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 answers array 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 0 for question types that carry no option — 0 is 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 0 for 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 surveyId exists, or a response for this iteration already exists.

Request

POST
/api/Survey/survey-response
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

PATCH/api/Survey/survey-response/{surveyResponseId}

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.

Path parameters

  • Name
    surveyResponseId
    Type
    integer
    Description

    The ID of the survey response to update.

Request body attributes

  • Name
    status
    Type
    integer
    Description

    The SurveyResponseStatus enum 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 answers array 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 surveyResponseId exists. A missing response surfaces as a 500 rather than a 404.

Request

PATCH
/api/Survey/survey-response/{surveyResponseId}
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

PUT/api/Survey/survey-response/tags

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.

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 0 and 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 surveyResponseId does not exist.

Request

PUT
/api/Survey/survey-response/tags
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/api/Survey/survey-definition/{id}/survey-response-filters

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.

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 two SurveyResponseStatus values (0 Pending/Draft, 1 Submitted) 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 iterationNumber on 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 projectFilters array items below.

  • Name
    userFilters
    Type
    array
    Description

    The distinct users that submitted a response. Described under userFilters array 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

GET
/api/Survey/survey-definition/{id}/survey-response-filters
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" }
]
}

GET/api/Survey/ExportSurveyResponses/{surveyId}

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.

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 SurveyIterationType rendered as its nameWeekly, Monthly, Quarterly, Semestral, Yearly, Custom or NonRecurrent — 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 SurveyIterationType rendered 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 surveyId exists. A missing survey surfaces as a 500 rather than a 404.

Request

GET
/api/Survey/ExportSurveyResponses/{surveyId}
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:

  • answerTypeFormQuestionAnswerType: 0 RadioChoice, 1 CheckBoxChoice, 2 DropDownChoice, 3 MultipleChoice, 4 AccountMoney, 5 Calendar, 7 ShortText, 8 LongText, 9 File, 10 Scale, 11 Country, 12 Table, 13 Numeric. Negative values map to project fields (-1 ProjectLogo, -2 ProjectCover, -4 ProjectLinkedInUrl, -5 ProjectFacebookUrl, -6 ProjectWebsiteUrl, -7 ProjectSDGs, -8 ProjectDevelopmentStage, -9 ProjectCategory, -10 ProjectCountry, -11 ProjectCity, -12 ProjectDescription, -13 ProjectName) and do not occur on survey forms.
  • typeFormType: 0 Undefined, 1 ApplicationDefinition, 2 Tab, 3 Evaluation. Survey forms always return 0 (Undefined).
  • privacyLevel and changePermissionPrivacyLevelPrivacyLevel: 0 Undefined, 1 Public, 2 Community, 3 Team, 4 Custom, 5 TeamAndMentors, 6 SetByTeam.
  • conditionalLogicTypeFormQuestionConditionalLogicType: 0 None, 1 AnyConditional, 2 AllConditionals.
  • conditionLogicFormQuestionConditionLogic: 1 Equal, 2 NotEqual, 3 GreaterThan, 4 LessThan, 5 Contains, 6 DoesNotContain, 7 IsEmpty, 8 NotEmpty. There is no 0 member.
  • limitTypeFormQuestionLimitType: 1 Characters, 2 Words. null when hasLimit is false.
  • questionTypeFormQuestionType: 0 ProjectTemplate, 1 AfterProjectApproval. Always 0 on survey forms.

GET/api/SurveyForm/GetAll?communityId={communityId}

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.

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 0 and 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 list array 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 FormType enum value. Survey forms always return 0 (Undefined).

  • Name
    creationDate
    Type
    string | null
    Description

    When the form was created (ISO 8601). null for forms created before this field was tracked.

  • Name
    lastEditionDate
    Type
    string | null
    Description

    When the form was last saved (ISO 8601). null if it has never been updated since creation.

  • Name
    userCreatorId
    Type
    integer
    Description

    The ID of the user who created the form. 0 when no creator was recorded.

  • Name
    questions
    Type
    array
    Description

    The form's questions. Described under list[].questions array items below.

  • Name
    sections
    Type
    array
    Description

    The form's sections, sorted by order. Empty when the form has no sections. Described under list[].sections array 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 false for 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. null when 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 question is null.

  • Name
    description
    Type
    string | null
    Description

    Help text shown under the question. HTML allowed. null when never set, "" when cleared.

  • Name
    question
    Type
    string | null
    Description

    The question text shown to respondents. null when the form only defines a title.

  • 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 FormQuestionAnswerType enum value — see the mapping in the Survey Forms preamble above.

  • Name
    isProjectField
    Type
    boolean
    Description

    Computed and read-only: true when answerType is negative, meaning the question maps onto a project field rather than a stored answer. Always false on 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[].questionLinks array items below.

  • Name
    questionOptions
    Type
    array
    Description

    The selectable options, sorted by questionOptionOrder (alphabetically by label for answerType 11 Country). Described under list[].questions[].questionOptions array items below.

  • Name
    isFilterable
    Type
    boolean | null
    Description

    Whether answers to this question can be used as a filter facet. null when the flag was never set.

  • Name
    privacyLevel
    Type
    integer
    Description

    The PrivacyLevel enum value controlling who can see the answers.

  • Name
    privacyCirclesIds
    Type
    array of integer
    Description

    The community-circle IDs allowed to see the answers when privacyLevel is 4 (Custom). Always [] on this endpoint — see the note above.

  • Name
    conditionalLogicType
    Type
    integer
    Description

    The FormQuestionConditionalLogicType enum value: 0 no conditions, 1 show when any condition matches, 2 show when all conditions match.

  • Name
    formQuestionConditionalLogicList
    Type
    array
    Description

    The conditions that make this question appear. Empty when conditionalLogicType is 0. Described under list[].questions[].formQuestionConditionalLogicList array items below.

  • Name
    fromApplication
    Type
    boolean
    Description

    Whether the question was copied from an application form. Always false on survey forms.

  • Name
    hasWeightedAverage
    Type
    boolean
    Description

    Computed and read-only: true when weightedAverage has a value. Always false on survey forms.

  • Name
    weightedAverage
    Type
    number | null
    Description

    The question's weight, used only by evaluation forms. Always null on survey forms.

  • Name
    convertToKpi
    Type
    boolean
    Description

    Whether answers to this question are converted into KPI values.

  • Name
    changePermissionPrivacyLevel
    Type
    integer
    Description

    The PrivacyLevel required to change the answer. Always 0 (Undefined) on survey forms.

  • Name
    questionType
    Type
    integer
    Description

    The FormQuestionType enum value. Always 0 on survey forms.

  • Name
    includeInProjectProfile
    Type
    boolean
    Description

    Whether the answer is surfaced on the project profile. Always false on survey forms.

  • Name
    hasLimit
    Type
    boolean
    Description

    Whether a length limit applies to the answer.

  • Name
    limitType
    Type
    integer | null
    Description

    The FormQuestionLimitType enum value: 1 characters, 2 words. null when hasLimit is false.

  • Name
    limitValue
    Type
    integer | null
    Description

    The maximum number of characters or words. null when hasLimit is false.

  • Name
    defaultProjectFormQuestionId
    Type
    integer | null
    Description

    The default community project-form question this one mirrors. Always null on survey forms.

  • Name
    sectionId
    Type
    integer | null
    Description

    The ID of the section this question belongs to, or null when 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. null when customValue is used instead.

  • Name
    customValue
    Type
    string | null
    Description

    The literal value the answer is compared against, for free-text questions. null or "" when formQuestionOptionId is used instead. The two are mutually exclusive.

  • Name
    conditionLogic
    Type
    integer
    Description

    The FormQuestionConditionLogic comparison — see the mapping in the Survey Forms preamble above.

Possible errors

  • Name
    401 Unauthorized
    Description

    The request is missing valid authentication.

Request

GET
/api/SurveyForm/GetAll?communityId={communityId}
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/api/SurveyForm/{id}

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

GET
/api/SurveyForm/{id}
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
}

POST/api/SurveyForm

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.

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 FormType enum value. Required by the schema, but not round-tripped — survey forms always return 0 (Undefined).

  • Name
    questions
    Type
    array
    Description

    The full set of questions. Described under questions array items below.

  • Name
    sections
    Type
    array
    Description

    The form sections. Described under sections array 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 0 for a new question.

  • Name
    title
    Type
    string | null
    Description

    The question's internal title, used as the label when question is 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 FormQuestionAnswerType enum 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 under questions[].questionLinks array items below.

  • Name
    questionOptions
    Type
    array
    Description

    The selectable options. Ignored for answerType 11 (Country), whose options are managed by the platform. Described under questions[].questionOptions array 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 PrivacyLevel enum value controlling who can see the answers.

  • Name
    privacyCirclesIds
    Type
    array of integer
    Description

    Community-circle IDs allowed to see the answers when privacyLevel is 4 (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 a 500. When none of the IDs resolves, the list is silently ignored.

  • Name
    conditionalLogicType
    Type
    integer
    Description

    The FormQuestionConditionalLogicType enum value. For a question that already exists on the form, conditions are only persisted when its conditionalLogicType is 1 or 2. For a question created in the same call the conditions are mapped regardless of conditionalLogicType — but conditionLogic is not carried through and every conditionFormQuestionId must already exist on the form, so create the questions first and add their conditional logic in a follow-up PUT.

  • Name
    formQuestionConditionalLogicList
    Type
    array
    Description

    The conditions that make this question appear. Described under questions[].formQuestionConditionalLogicList array 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 PrivacyLevel required to change the answer. Ignored on survey forms.

  • Name
    questionType
    Type
    integer
    Description

    The FormQuestionType enum 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, limitType and limitValue consistently — an inconsistent combination is stored as sent.

  • Name
    limitType
    Type
    integer | null
    Description

    The FormQuestionLimitType enum value: 1 characters, 2 words. Send null when hasLimit is false.

  • Name
    limitValue
    Type
    integer | null
    Description

    The maximum number of characters or words allowed. Send null when hasLimit is false.

  • 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[].id of 0), send that section's order instead — the server resolves it once the section has been created. A value matching neither is cleared to null.

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 0 to 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 FormQuestionConditionLogic comparison (18). 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 0 to create a new section. On update, an id greater than 0 must 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 sectionId before 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 section order, or an unknown section ID.

Request

POST
/api/SurveyForm
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
}

PUT/api/SurveyForm/{id}

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.

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 FormType enum value. Required by the schema, but not round-tripped — survey forms always return 0 (Undefined).

  • Name
    questions
    Type
    array
    Description

    The full set of questions. Same item shape as the questions array items of Create a survey form above, including the nested questionLinks, questionOptions and formQuestionConditionalLogicList collections. Existing questions keep their IDs; new ones use id: 0.

  • Name
    sections
    Type
    array
    Description

    The form sections. Same item shape as the sections array items of Create a survey form above. An id greater than 0 that 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.

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 section order, or a section ID that does not belong to this form.

Request

PUT
/api/SurveyForm/{id}
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/api/SurveyForm/{id}

Delete a survey form

This endpoint allows you to permanently remove a survey-form definition.

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

DELETE
/api/SurveyForm/{id}
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/api/SurveyForm/RemoveQuestionById/{questionId}

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

DELETE
/api/SurveyForm/RemoveQuestionById/{questionId}
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