Skip to content
Dashboard

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
client.surveys.list(SurveyListParams { cursor, isActive, limit, 2 more } params?, RequestOptionsoptions?): CursorPage<Survey { id, createdAt, isActive, 8 more } >
GET/v2/surveys
Get a survey by ID
client.surveys.retrieve(stringid, SurveyRetrieveParams { featurebaseVersion } params?, RequestOptionsoptions?): Survey { id, createdAt, isActive, 8 more }
GET/v2/surveys/{id}
Get survey responses
client.surveys.listResponses(stringid, SurveyListResponsesParams { cursor, limit, pageId, featurebaseVersion } params?, RequestOptionsoptions?): CursorPage<SurveyListResponsesResponse { id, createdAt, object, 2 more } >
GET/v2/surveys/{id}/responses
ModelsExpand Collapse
Survey { id, createdAt, isActive, 8 more }
id: string

Unique identifier

createdAt: string

ISO 8601 timestamp when created

isActive: boolean

Whether the survey is active

object: "survey"

Object type identifier

organization: string

Organization ID

pages: Array<Page>

Survey pages

id: string

Page ID

title: string

Page title

type: "text" | "link" | "rating" | "multiple-choice"

Page type

One of the following:
"text"
"link"
"rating"
"multiple-choice"
allowSelectMultiple?: boolean

Allow multiple selections

choices?: Array<Choice>

Available choices

id: string

Choice ID

choice?: string

Choice text

defaultAction?: SurveyNextAction { type, pageId }

Action to take if condition matches

type: "page" | "end" | "next"

Type of next action

One of the following:
"page"
"end"
"next"
pageId?: string

Page ID to navigate to

description?: string

Page description

highLabel?: string

Label for high rating

linkButtonText?: string

Button text for link

linkRedirectUrl?: string

URL to redirect to

linkTarget?: "_blank" | "_self" | "_parent" | "_top"

Link target

One of the following:
"_blank"
"_self"
"_parent"
"_top"
logic?: Array<Logic>

Conditional logic rules

comparator: string

Comparison operator

One of the following:
value: string | number | Array<string>

Value to compare against

One of the following:
string
number
Array<string>
id?: string

Logic rule ID

lowLabel?: string

Label for low rating

placeholder?: string

Placeholder for text input

scale?: number

Rating scale

subType?: "number" | "emoji" | "generic" | 2 more

Sub-type for rating/multiple-choice

One of the following:
"number"
"emoji"
"generic"
"featurebase-posts"
"nps"
responseCount: number

Number of responses

title: string

Survey title

updatedAt: string

ISO 8601 timestamp when last updated

description?: string

Survey description

targeting?: Targeting { css, loginRequired, segmentIds, url }

Targeting configuration

css?: Array<Css>

CSS selector targeting rules

value: string

CSS selector

loginRequired?: boolean

Whether login is required

segmentIds?: Array<string>

Segment IDs to target

url?: Array<URL>

URL targeting rules

matchType: "exact" | "contains" | "regex"

Type of URL matching

One of the following:
"exact"
"contains"
"regex"
value: string

URL pattern to match

id?: string

Rule ID

SurveyNextAction { type, pageId }

Action to take if condition matches

type: "page" | "end" | "next"

Type of next action

One of the following:
"page"
"end"
"next"
pageId?: string

Page ID to navigate to

SurveyListResponsesResponse { id, createdAt, object, 2 more }
id: string

Unique identifier

createdAt: string

ISO 8601 timestamp when created

object: "survey_response"

Object type identifier

responses: Array<Response>

Individual responses to questions

pageId: string

Page ID this response is for

type: "text" | "link" | "rating" | "multiple-choice"

Response type

One of the following:
"text"
"link"
"rating"
"multiple-choice"
value: string | number | boolean | Array<string>

Response value

One of the following:
string
number
boolean
Array<string>
id?: string

Response ID

createdAt?: string

ISO 8601 timestamp when created

updatedAt?: string

ISO 8601 timestamp when updated

user: Contact { id, name, object, 16 more } | null

User who submitted the response

id: string

Unique identifier

name: string

Contact display name

object: "contact"

Object type identifier

type: "customer" | "lead"

Type of contact

One of the following:
"customer"
"lead"
commentsCreated?: number

Number of comments created

companies?: Array<Company { id, companyId, companySize, 11 more } >

Companies the contact belongs to

id: string

Featurebase internal ID

companyId: string

External company ID from your system

companySize: number | null

Company employee headcount

createdAt: string | null

ISO date when company was created

industry: string | null

Industry

lastActivity: string | null

ISO date of last activity

linkedUsers: number | null

Number of users linked to this company

monthlySpend: number | null

Monthly spend

name: string

Company name

object: "company"

Object type identifier

plan: string | null

Plan or tier name

updatedAt: string | null

ISO date when company was last updated

website: string | null

Company website URL

customFields?: Record<string, unknown>

Custom field values

customFields?: Record<string, unknown>

Custom field values on the contact

description?: string

Contact description/bio

email?: string | null

Contact email

lastActivity?: string

Last activity ISO timestamp

locale?: string

Contact locale

manuallyOptedOutFromChangelog?: boolean

Whether manually opted out from changelog

organizationId?: string

Organization ID the contact belongs to

postsCreated?: number

Number of posts created

profilePicture?: string | null

Profile picture URL

roles?: Array<string>

Contact roles

subscribedToChangelog?: boolean

Whether subscribed to changelog

userId?: string

External user ID from SSO

verified?: boolean

Whether email is verified