Documentation

Getting Started

  1. Create an account on our platform. Click here to create an account.
  2. Create a new project and note down your Client ID and Project ID.

Using Feedback API

feedback.io exposes an endpoint for submitting feedback. You will need to provide:

  • Client ID
  • Project ID

Include these in your request headers as x-client-id and x-project-id respectively. For security, do not hardcode these IDs in your code. Use environment variables to store them securely.

Submitting Feedback

Endpoint and Headers

To submit feedback, send a POST request to the following endpoint with mentioned request headers.

POST https://feedmo.vercel.app/api/v1/feedback
Header Type Description
x-client-id string Required. Your Account ID
x-project-id string Required. Your Project ID

Request Body and Parameters

Your request body should be a JSON object with the following structure:

{
    "email": "example@gmail.com",
    "type": "bug",
    "feedback": "Some message"
}
Parameter Type Description
email string Required. Email address of the feedback sender
type string Required. Type of feedback: bug or feature or suggestion
feedback string Required. Content of the feedback message

Successful Response

If your POST request is successful, you will receive a 200 status code along with the following JSON response:

{
    "success": true,
    "message": "Feedback sent successfully."
}

Error Response

If the POST request fails, you will receive an appropriate status code depending on the error type, along with a JSON response. Common error status codes:

  • 400: Bad Request (e.g., missing required fields)
  • 401: Unauthorized (invalid Account ID or Project ID)
  • 500: Internal Server Error
{
    "success": false,
    "message": "Some error message"
}

Best Practices

  • Always validate user input before sending it to the API.
  • Handle potential errors gracefully in your application.
  • Consider implementing rate limiting on your end to prevent abuse.

Code Example

index.js
1import axios from 'axios';
2
3axios.post(https://feedmo.vercel.app/api/v1/feedback, {
4    email: 'abc@gmail.com',
5    type: "bug",
6    feedback: "There is a bug in the login page."
7}, {
8    headers: {
9        'Content-Type': 'application/json',
10        'account': 'Your-Client-ID',
11        'project': 'Your-Project-ID'
12    },
13})