While we provide a simple feedback widget that can be embedded on your website, we understand some users might want a custom flow. If you decide to go ahead and build out a custom flow, you need to send the feedback data to Fotion manually. This can be done via an API call.
The API endpoint to hit is https://api.usefotion.app/ingest/{YOUR_WIDGET_ID}
where YOUR_WIDGET_ID
can be gotten from your dashboard.
{
"base64_image" : "image in base64 format",
"content" : "Whatever custom feedback content",
"feedback_type" : "issue | others | idea",
"email" : "optional"
}
If you are building a custom flow and want to use a url instead, please email
[email protected]
const submit = (reference: string, email: string) => {
axios.post<{ message: string, status: boolean }>(
`https://api.usefotion.app/ingest/${reference}`, {
content: stateFeedbackContent.value,
feedback_type: stateFeedbackType.value,
email,
base64_image: stateScreenshotImg.value
}, {
headers: {
"Content-Type": "application/json"
}
}).then((res: AxiosResponse<{ message: string, status: boolean }>) => {
if (!res.data.status) {
toast.error(res.data.message)
return
}
// succcess
}).finally(() => {
}).catch(() => {
})
}