List feedback records with filters
client.feedbackRecords.list(FeedbackRecordListParams { tenant_id, created_since, created_until, 27 more } query, RequestOptionsoptions?): FeedbackRecordListResponse { data, limit, next_cursor }
GET/v1/feedback-records
Lists feedback records for a required tenant_id with optional additional filters and pagination
Parameters
Returns
List feedback records with filters
import FormbricksHub from '@formbricks/hub';
const client = new FormbricksHub({
apiKey: process.env['HUB_API_KEY'], // This is the default and can be omitted
});
const feedbackRecords = await client.feedbackRecords.list({ tenant_id: 'org-123' });
console.log(feedbackRecords.data);{
"data": [
{
"id": "018e1234-5678-9abc-def0-123456789abc",
"collected_at": "2024-01-15T10:30:00Z",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"source_type": "survey",
"field_id": "q1",
"field_type": "rating",
"field_label": "How satisfied are you?",
"value_number": 9,
"source_id": "survey-123",
"source_name": "Q1 NPS Survey",
"user_id": "user-abc-123",
"tenant_id": "org-123",
"submission_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"limit": 100
}{
"type": "https://hub.formbricks.com/problems/validation",
"title": "Validation Failed",
"status": 400,
"code": "validation",
"detail": "One or more request parameters are invalid",
"request_id": "0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"invalid_params": [
{
"name": "sentiment_score_min",
"reason": "must be less than or equal to sentiment_score_max"
}
]
}{
"type": "https://hub.formbricks.com/problems/validation",
"title": "Validation Error",
"status": 400,
"code": "validation",
"detail": "One or more request parameters are invalid",
"instance": "/v1/feedback-records",
"request_id": "0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"invalid_params": [
{
"name": "tenant_id",
"reason": "is required"
}
]
}Returns Examples
{
"data": [
{
"id": "018e1234-5678-9abc-def0-123456789abc",
"collected_at": "2024-01-15T10:30:00Z",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"source_type": "survey",
"field_id": "q1",
"field_type": "rating",
"field_label": "How satisfied are you?",
"value_number": 9,
"source_id": "survey-123",
"source_name": "Q1 NPS Survey",
"user_id": "user-abc-123",
"tenant_id": "org-123",
"submission_id": "550e8400-e29b-41d4-a716-446655440000"
}
],
"limit": 100
}{
"type": "https://hub.formbricks.com/problems/validation",
"title": "Validation Failed",
"status": 400,
"code": "validation",
"detail": "One or more request parameters are invalid",
"request_id": "0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"invalid_params": [
{
"name": "sentiment_score_min",
"reason": "must be less than or equal to sentiment_score_max"
}
]
}{
"type": "https://hub.formbricks.com/problems/validation",
"title": "Validation Error",
"status": 400,
"code": "validation",
"detail": "One or more request parameters are invalid",
"instance": "/v1/feedback-records",
"request_id": "0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"invalid_params": [
{
"name": "tenant_id",
"reason": "is required"
}
]
}