Create a new feedback record
Creates a new feedback record data point
Body Parameters
Identifier for the question/field. NULL bytes not allowed.
Type of feedback source (e.g., survey, review, feedback_form). NULL bytes not allowed.
Identifier for the logical submission this record belongs to (tenant-scoped). Required. Enables grouping multi-field submissions and idempotent ingestion. Unique per (tenant_id, submission_id, field_id). If a record has no logical submission, use e.g. field_id.
Tenant/organization identifier for multi-tenancy. Required.
When the feedback was collected (defaults to now). Must be between 1970-01-01 and 2080-12-31.
Stable identifier grouping related fields (for ranking, matrix, grid questions). NULL bytes not allowed.
Human-readable question text for the group
The actual question text
ISO language code. NULL bytes not allowed.
User agent, device, location, referrer, tags, etc. NULL bytes (\x00 or \u0000) are not allowed in JSON keys or values.
Reference to survey/form/ticket ID
Human-readable name
Anonymous ID or email hash
For yes/no questions
For date responses. Must be between 1970-01-01 and 2080-12-31.
For ratings, NPS scores, numeric responses. Must be between -1e15 and +1e15.
For open-ended text responses. Omit or null if not applicable. NULL bytes not allowed when present.
Returns
Create a new feedback record
curl http://localhost:8080/v1/feedback-records \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $HUB_API_KEY" \
-d '{
"field_id": "q1",
"field_type": "rating",
"source_type": "survey",
"submission_id": "550e8400-e29b-41d4-a716-446655440000",
"tenant_id": "org-123"
}'{
"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_identifier": "user-abc-123",
"tenant_id": "org-123",
"submission_id": "550e8400-e29b-41d4-a716-446655440000",
"language": "en"
}Returns Examples
{
"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_identifier": "user-abc-123",
"tenant_id": "org-123",
"submission_id": "550e8400-e29b-41d4-a716-446655440000",
"language": "en"
}