Skip to content
Support

Delete feedback records by user ID

client.feedbackRecords.bulkDelete(FeedbackRecordBulkDeleteParams { user_id, tenant_id } params, RequestOptionsoptions?): FeedbackRecordBulkDeleteResponse { deleted_count, message }
DELETE/v1/feedback-records

Permanently deletes feedback record data points for the specified user_id/data subject. Omit tenant_id to delete that user_id across all tenants for GDPR Article 17 (Right to Erasure) requests. Provide tenant_id to restrict deletion to that tenant only. Derived embeddings for deleted feedback records are removed by database cascade. The operation is idempotent; repeated calls return deleted_count 0 after matching records have already been deleted.

ParametersExpand Collapse
params: FeedbackRecordBulkDeleteParams { user_id, tenant_id }
user_id: string

Delete records matching this user ID (required). NULL bytes not allowed.

minLength1
maxLength255
tenant_id?: string

Optional tenant scope. Omit this parameter to delete all records matching user_id across tenants; provide it to delete only records for this tenant. Empty strings and NULL bytes are not allowed.

minLength1
maxLength255
ReturnsExpand Collapse
FeedbackRecordBulkDeleteResponse { deleted_count, message }
deleted_count: number

Number of records deleted

formatint64
message: string

Human-readable status message

Delete feedback records by user ID

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.bulkDelete({ user_id: 'user-abc-123' });

console.log(response.deleted_count);
{
  "deleted_count": 42,
  "message": "Successfully deleted 42 feedback records"
}
Returns Examples
{
  "deleted_count": 42,
  "message": "Successfully deleted 42 feedback records"
}