# Surveys Surveys allow you to collect targeted feedback from your users within your product. Surveys can be targeted to specific user segments or pages and can contain multiple questions with conditional logic. ## List surveys - [GET /v2/surveys](https://docs.featurebase.app/rest-api/surveys/listsurveys.md): Returns all surveys configured in your Featurebase organization. ### Query Parameters - limit - Number of items to return (1-100, default 10) - cursor - Cursor for pagination - type - Filter by survey page type (text, link, rating, multiple-choice) - isActive - Filter by active status ### Response Format Returns a list object with: - object - Always "list" - data - Array of survey objects - nextCursor - Cursor for next page (null if no more results) ### Survey Object Each survey includes: - id - Unique identifier - title - Survey title - description - Survey description - isActive - Whether the survey is active - responseCount - Number of responses received - targeting - Targeting configuration (segments, URLs, CSS selectors) - pages - Array of survey pages/questions - createdAt - ISO 8601 timestamp when created - updatedAt - ISO 8601 timestamp when last updated ## Get a survey by ID - [GET /v2/surveys/{id}](https://docs.featurebase.app/rest-api/surveys/getsurvey.md): Retrieves a single survey by its unique identifier. Returns the survey object if found in your organization. ### Response Returns a survey object with: - id - Unique identifier - title - Survey title - description - Survey description - isActive - Whether the survey is active - responseCount - Number of responses received - targeting - Targeting configuration - pages - Array of survey pages/questions - createdAt - ISO 8601 timestamp when created - updatedAt - ISO 8601 timestamp when last updated ### Survey Pages Each page represents a question or screen in the survey: - type - Page type (text, link, rating, multiple-choice) - title - Question title - description - Optional description - logic - Conditional logic rules - defaultAction - Default action when no logic matches ### Errors - 404 - Survey not found in your organization ## Get survey responses - [GET /v2/surveys/{id}/responses](https://docs.featurebase.app/rest-api/surveys/getsurveyresponses.md): Retrieves all user responses for a specific survey. ### Query Parameters - pageId - Filter responses to a specific survey page - limit - Number of items to return (1-100, default 10) - cursor - Cursor for pagination ### Response Format Returns a list object with: - object - Always "list" - data - Array of survey response objects - nextCursor - Cursor for next page (null if no more results) ### Survey Response Object Each response includes: - id - Unique response identifier - user - User who submitted the response (may be null for anonymous) - responses - Array of individual answers - createdAt - ISO 8601 timestamp when submitted ### Individual Response Each item in the responses array: - pageId - The survey page this response is for - type - Response type (text, rating, multiple-choice) - value - The response value ### Errors - 404 - Survey not found in your organization