Update feedback status
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/feedbacks/{feedback_id}/"
payload = {
"feedback": "<string>",
"is_positive": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({feedback: '<string>', is_positive: true})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/feedbacks/{feedback_id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/feedbacks/{feedback_id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"feedback": "<string>",
"is_positive": true
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"given_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]"
},
"status": "to_review",
"feedback": "<string>",
"context": {
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"query_id": 123,
"source": "<string>",
"user_query": "<string>",
"additional_details": "<string>"
},
"is_positive": true,
"origin": "manual",
"user_message": "<string>",
"conversation_title": "<string>",
"suggested_action_type": "<string>",
"suggested_action_data": {},
"reviewed_at": "2023-11-07T05:31:56Z",
"reviewed_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]"
},
"query_id": 123,
"source": "<string>"
}{
"error": "User not found"
}{
"error": "Authentication credentials were not provided."
}{
"error": "User not found"
}{
"error": "Not found."
}Feedback
Update feedback status
Mark feedback as reviewed or update other fields.
Access Control:
- Admins can update any feedback
- Regular users can only update feedback they submitted
Impersonation:
- When using impersonation, the ownership check is performed against the impersonated user
- This allows updating feedback submitted by the impersonated user
PATCH
/
projects
/
{project_id}
/
feedbacks
/
{feedback_id}
/
Update feedback status
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/feedbacks/{feedback_id}/"
payload = {
"feedback": "<string>",
"is_positive": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({feedback: '<string>', is_positive: true})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/feedbacks/{feedback_id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/feedbacks/{feedback_id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"feedback": "<string>",
"is_positive": true
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"given_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]"
},
"status": "to_review",
"feedback": "<string>",
"context": {
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"query_id": 123,
"source": "<string>",
"user_query": "<string>",
"additional_details": "<string>"
},
"is_positive": true,
"origin": "manual",
"user_message": "<string>",
"conversation_title": "<string>",
"suggested_action_type": "<string>",
"suggested_action_data": {},
"reviewed_at": "2023-11-07T05:31:56Z",
"reviewed_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]"
},
"query_id": 123,
"source": "<string>"
}{
"error": "User not found"
}{
"error": "Authentication credentials were not provided."
}{
"error": "User not found"
}{
"error": "Not found."
}Authorizations
BearerAuthTokenAuth
Use Authorization: Bearer <token>. The token is either a user token / OAuth access
token, or a service-account API key (cfk_...). A key is valid on every endpoint and
acts as its service account, an organization member with per-store permissions.
Refused keys answer 403 with Invalid API key., API key revoked.,
API key expired. or API key disabled..
Headers
Path Parameters
Body
application/json
Response
Feedback updated successfully