To interact with our APIs, you must include your API key in the Authorization header as a Bearer token. Your API key can be found in your Feedlytic dashboard.
Authorization: Bearer your_api_keyCreate a new project to start collecting feedback.
const fetch = require('node-fetch');
const apiKey = 'your_api_key';
const url = 'https://feedlytic.ai/api/public/projects';
const body = JSON.strin3gify({
name: 'My First Project',
description: 'Description of the project',
url: 'https://www.example.com'
});
const headers = {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
};
fetch(url, { method: 'POST', headers, body })
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));Submit customer feedback for your project, including a rating and optional message.
const fetch = require('node-fetch');
const apiKey = 'your_api_key';
const url = 'https://feedlytic.ai/api/public/feedbacks';
const body = JSON.stringify({
projectId: '12345',
rating: 5,
message: 'Great experience!'
});
const headers = {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
};
fetch(url, { method: 'POST', headers, body })
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));Retrieve a list of all projects associated with your account.
const fetch = require('node-fetch');
const apiKey = 'your_api_key';
const url = 'https://feedlytic.ai/api/public/projects';
const headers = {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
};
fetch(url, { method: 'GET', headers })
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));Retrieve feedbacks for a specific project.
const fetch = require('node-fetch');
const apiKey = 'your_api_key';
const projectId = '12345';
const url = `https://feedlytic.ai/api/public/feedbacks?projectId=${projectId}`;
const headers = {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
};
fetch(url, { method: 'GET', headers })
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));Retrieve the AI-generated insights from the feedbacks collected for a specific project.
const fetch = require('node-fetch');
const apiKey = 'your_api_key';
const projectId = '12345';
const url = `https://feedlytic.ai/api/public/feedbacks/result?projectId=${projectId}`;
const headers = {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
};
fetch(url, { method: 'GET', headers })
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));Note: Your usage and results may be limited based on your subscription. Please refer to our Terms of Service for more details.