# Get a survey by ID 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 Endpoint: GET /v2/surveys/{id} Version: 2026-01-01.nova Security: bearerAuth ## Header parameters: - `Featurebase-Version` (string) API version for this request. Defaults to your organization's configured API version if not specified. Example: "2026-01-01.nova" ## Path parameters: - `id` (string, required) Survey unique identifier Example: "6743752ca81ae59d25cf834b" ## Response 200 fields (application/json): - `object` (string, required) Object type identifier Enum: "survey" - `id` (string, required) Unique identifier Example: "6743752ca81ae59d25cf834b" - `title` (string, required) Survey title Example: "Get feedback for Feedback module" - `description` (string) Survey description Example: "Measure what we can improve" - `isActive` (boolean, required) Whether the survey is active Example: true - `organization` (string, required) Organization ID Example: "5febde12dc56d60012d47db6" - `responseCount` (number, required) Number of responses Example: 85 - `targeting` (object) Targeting configuration - `targeting.segmentIds` (array) Segment IDs to target Example: ["6636438b7fcdc515999042eb"] - `targeting.url` (array) URL targeting rules - `targeting.url.value` (string, required) URL pattern to match Example: "/dashboard/posts" - `targeting.url.matchType` (string, required) Type of URL matching Enum: "exact", "contains", "regex" - `targeting.url.id` (string) Rule ID Example: "674375cfd8bf964ec2562cdc" - `targeting.css` (array) CSS selector targeting rules - `targeting.css.value` (string, required) CSS selector Example: ".feedback-button" - `targeting.loginRequired` (boolean) Whether login is required - `pages` (array, required) Survey pages Example: [] - `pages.id` (string, required) Page ID Example: "6743752ca81ae59d25cf834c" - `pages.type` (string, required) Page type Enum: "text", "link", "rating", "multiple-choice" - `pages.title` (string, required) Page title Example: "How happy are you with our product?" - `pages.description` (string) Page description Example: "We really want to hear from you." - `pages.placeholder` (string) Placeholder for text input Example: "Type your answer here" - `pages.linkButtonText` (string) Button text for link Example: "Visit our website" - `pages.linkRedirectUrl` (string) URL to redirect to Example: "https://example.com" - `pages.linkTarget` (string) Link target Enum: "_blank", "_self", "_parent", "_top" - `pages.subType` (string) Sub-type for rating/multiple-choice Enum: "number", "emoji", "generic", "featurebase-posts", "nps" - `pages.scale` (number) Rating scale Example: 5 - `pages.lowLabel` (string) Label for low rating Example: "Could be improved" - `pages.highLabel` (string) Label for high rating Example: "It's awesome!" - `pages.allowSelectMultiple` (boolean) Allow multiple selections - `pages.choices` (array) Available choices - `pages.choices.id` (string, required) Choice ID Example: "66dc54128b989696d050008b" - `pages.choices.choice` (string) Choice text Example: "Very satisfied" - `pages.logic` (array) Conditional logic rules - `pages.logic.id` (string) Logic rule ID Example: "6743755fd8bf964ec2562cdb" - `pages.logic.comparator` (string, required) Comparison operator Example: "less than" - `pages.logic.value` (any, required) Value to compare against Example: 4 - `pages.logic.next` (object, required) Action to take if condition matches - `pages.logic.next.type` (string, required) Type of next action Enum: "page", "end", "next" - `pages.logic.next.pageId` (string) Page ID to navigate to Example: "6743754dd8bf964ec2562cda" - `pages.defaultAction` (object) Action to take if condition matches - `createdAt` (string, required) ISO 8601 timestamp when created Example: "2024-11-24T18:49:16.755Z" - `updatedAt` (string, required) ISO 8601 timestamp when last updated Example: "2025-04-10T08:58:51.148Z" ## Response 400 fields (application/json): - `error` (object, required) - `error.type` (string, required) The type of error returned Enum: "invalid_request_error" - `error.code` (string, required) Machine-readable error code Enum: "invalid_id" - `error.message` (string, required) Human-readable error message Example: "An error occurred" - `error.param` (string) The parameter that caused the error (if applicable) Example: "id" - `error.status` (number, required) HTTP status code Enum: 400 ## Response 404 fields (application/json): - `error` (object, required) - `error.type` (string, required) The type of error returned Enum: "invalid_request_error" - `error.code` (string, required) Machine-readable error code Enum: "survey_not_found" - `error.message` (string, required) Human-readable error message Example: "An error occurred" - `error.param` (string) The parameter that caused the error (if applicable) Example: "id" - `error.status` (number, required) HTTP status code Enum: 404