Feedback
December 15, 2025 ยท View on GitHub
Overview
Use to provide positive or negative feedback along with details.
Available Operations
- submit - Log Feedback
- list - Get All Feedback
- getFeedbackById - Get Feedback by ID
- deleteFeedbackById - Delete Feedback by ID
submit
Logs new feedback or updates an existing one.
API Key Types: WEB, API
Example Usage
import { InkeepAnalytics } from "@inkeep/inkeep-analytics";
const inkeepAnalytics = new InkeepAnalytics({
apiIntegrationKey: process.env["INKEEPANALYTICS_API_INTEGRATION_KEY"] ?? "",
});
async function run() {
const result = await inkeepAnalytics.feedback.submit({
type: "positive",
messageId: "<id>",
userProperties: {
identificationType: "COOKIED",
},
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { InkeepAnalyticsCore } from "@inkeep/inkeep-analytics/core.js";
import { feedbackSubmit } from "@inkeep/inkeep-analytics/funcs/feedbackSubmit.js";
// Use `InkeepAnalyticsCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const inkeepAnalytics = new InkeepAnalyticsCore({
apiIntegrationKey: process.env["INKEEPANALYTICS_API_INTEGRATION_KEY"] ?? "",
});
async function run() {
const res = await feedbackSubmit(inkeepAnalytics, {
type: "positive",
messageId: "<id>",
userProperties: {
identificationType: "COOKIED",
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("feedbackSubmit failed:", res.error);
}
}
run();
React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useFeedbackSubmitMutation
} from "@inkeep/inkeep-analytics/react-query/feedbackSubmit.js";
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.LogFeedbackRequestBody | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.LogFeedbackResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequest | 400 | application/problem+json |
| errors.Unauthorized | 401 | application/problem+json |
| errors.Forbidden | 403 | application/problem+json |
| errors.UnprocessableEntity | 422 | application/problem+json |
| errors.InternalServerError | 500 | application/problem+json |
| errors.APIError | 4XX, 5XX | */* |
list
Get All Feedback
Example Usage
import { InkeepAnalytics } from "@inkeep/inkeep-analytics";
const inkeepAnalytics = new InkeepAnalytics({
apiIntegrationKey: process.env["INKEEPANALYTICS_API_INTEGRATION_KEY"] ?? "",
});
async function run() {
const result = await inkeepAnalytics.feedback.list({});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { InkeepAnalyticsCore } from "@inkeep/inkeep-analytics/core.js";
import { feedbackList } from "@inkeep/inkeep-analytics/funcs/feedbackList.js";
// Use `InkeepAnalyticsCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const inkeepAnalytics = new InkeepAnalyticsCore({
apiIntegrationKey: process.env["INKEEPANALYTICS_API_INTEGRATION_KEY"] ?? "",
});
async function run() {
const res = await feedbackList(inkeepAnalytics, {});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("feedbackList failed:", res.error);
}
}
run();
React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Query hooks for fetching data.
useFeedbackList,
useFeedbackListSuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchFeedbackList,
// Utilities to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateFeedbackList,
invalidateAllFeedbackList,
} from "@inkeep/inkeep-analytics/react-query/feedbackList.js";
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.GetAllFeedbackRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<components.GetAllFeedbackResponse>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequest | 400 | application/problem+json |
| errors.Unauthorized | 401 | application/problem+json |
| errors.Forbidden | 403 | application/problem+json |
| errors.NotFound | 404 | application/problem+json |
| errors.UnprocessableEntity | 422 | application/problem+json |
| errors.InternalServerError | 500 | application/problem+json |
| errors.APIError | 4XX, 5XX | */* |
getFeedbackById
Get Feedback by ID
Example Usage
import { InkeepAnalytics } from "@inkeep/inkeep-analytics";
const inkeepAnalytics = new InkeepAnalytics({
apiIntegrationKey: process.env["INKEEPANALYTICS_API_INTEGRATION_KEY"] ?? "",
});
async function run() {
const result = await inkeepAnalytics.feedback.getFeedbackById({
id: "feedback-id-123",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { InkeepAnalyticsCore } from "@inkeep/inkeep-analytics/core.js";
import { feedbackGetFeedbackById } from "@inkeep/inkeep-analytics/funcs/feedbackGetFeedbackById.js";
// Use `InkeepAnalyticsCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const inkeepAnalytics = new InkeepAnalyticsCore({
apiIntegrationKey: process.env["INKEEPANALYTICS_API_INTEGRATION_KEY"] ?? "",
});
async function run() {
const res = await feedbackGetFeedbackById(inkeepAnalytics, {
id: "feedback-id-123",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("feedbackGetFeedbackById failed:", res.error);
}
}
run();
React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Query hooks for fetching data.
useFeedbackGetFeedbackById,
useFeedbackGetFeedbackByIdSuspense,
// Utility for prefetching data during server-side rendering and in React
// Server Components that will be immediately available to client components
// using the hooks.
prefetchFeedbackGetFeedbackById,
// Utilities to invalidate the query cache for this query in response to
// mutations and other user actions.
invalidateFeedbackGetFeedbackById,
invalidateAllFeedbackGetFeedbackById,
} from "@inkeep/inkeep-analytics/react-query/feedbackGetFeedbackById.js";
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.GetFeedbackByIdRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.GetFeedbackByIdResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequest | 400 | application/problem+json |
| errors.Unauthorized | 401 | application/problem+json |
| errors.Forbidden | 403 | application/problem+json |
| errors.NotFound | 404 | application/problem+json |
| errors.UnprocessableEntity | 422 | application/problem+json |
| errors.InternalServerError | 500 | application/problem+json |
| errors.APIError | 4XX, 5XX | */* |
deleteFeedbackById
Delete Feedback by ID
Example Usage
import { InkeepAnalytics } from "@inkeep/inkeep-analytics";
const inkeepAnalytics = new InkeepAnalytics({
apiIntegrationKey: process.env["INKEEPANALYTICS_API_INTEGRATION_KEY"] ?? "",
});
async function run() {
const result = await inkeepAnalytics.feedback.deleteFeedbackById({
id: "<id>",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { InkeepAnalyticsCore } from "@inkeep/inkeep-analytics/core.js";
import { feedbackDeleteFeedbackById } from "@inkeep/inkeep-analytics/funcs/feedbackDeleteFeedbackById.js";
// Use `InkeepAnalyticsCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const inkeepAnalytics = new InkeepAnalyticsCore({
apiIntegrationKey: process.env["INKEEPANALYTICS_API_INTEGRATION_KEY"] ?? "",
});
async function run() {
const res = await feedbackDeleteFeedbackById(inkeepAnalytics, {
id: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("feedbackDeleteFeedbackById failed:", res.error);
}
}
run();
React hooks and utilities
This method can be used in React components through the following hooks and associated utilities.
Check out this guide for information about each of the utilities below and how to get started using React hooks.
import {
// Mutation hook for triggering the API call.
useFeedbackDeleteFeedbackByIdMutation
} from "@inkeep/inkeep-analytics/react-query/feedbackDeleteFeedbackById.js";
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.DeleteFeedbackByIdRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.DeleteFeedbackByIdResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequest | 400 | application/problem+json |
| errors.Unauthorized | 401 | application/problem+json |
| errors.Forbidden | 403 | application/problem+json |
| errors.NotFound | 404 | application/problem+json |
| errors.UnprocessableEntity | 422 | application/problem+json |
| errors.InternalServerError | 500 | application/problem+json |
| errors.APIError | 4XX, 5XX | */* |