Get similar feedback records
client.feedbackRecords.retrieveSimilar(stringid, FeedbackRecordRetrieveSimilarParams { cursor, limit, min_score } query?, RequestOptionsoptions?): FeedbackRecordRetrieveSimilarResponse { data, limit, next_cursor }
GET/v1/feedback-records/{id}/similar
Returns feedback record IDs and similarity scores for records similar to the given one (by embedding). Only available when embeddings are configured (EMBEDDING_PROVIDER and EMBEDDING_MODEL set). Supported providers: openai, google (Gemini Developer API / Google AI Studio), google-gemini (Gemini Enterprise Agent Platform API). When embeddings are disabled, this endpoint returns 503 Service Unavailable. Hub derives the tenant from the source feedback record and scopes the nearest-neighbor search to that tenant.
Parameters
id: string
formatuuid
Returns
Get similar feedback records
import FormbricksHub from '@formbricks/hub';
const client = new FormbricksHub({
apiKey: process.env['HUB_API_KEY'], // This is the default and can be omitted
});
const response = await client.feedbackRecords.retrieveSimilar(
'018e1234-5678-9abc-def0-123456789abc',
);
console.log(response.data);{
"data": [
{
"feedback_record_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"field_label": "field_label",
"score": 0,
"value_text": "value_text"
}
],
"limit": 0,
"next_cursor": "eyJkIjowLjEsImkiOiIwMThlMTIzNC01Njc4LTlhYmMtZGVmMC0xMTExMTExMTExMTEifQ=="
}Returns Examples
{
"data": [
{
"feedback_record_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"field_label": "field_label",
"score": 0,
"value_text": "value_text"
}
],
"limit": 0,
"next_cursor": "eyJkIjowLjEsImkiOiIwMThlMTIzNC01Njc4LTlhYmMtZGVmMC0xMTExMTExMTExMTEifQ=="
}