POST
/
v2
/
bot-requests
/
feedback
import requests
endpoint = "https://api-prod.usefini.com/v2/bot-requests/feedback"

answerId = <uuid> # Replace this with the retrieved answer_uuid from /answer endpoint
feedbackType = "thumbs_up" # or "thumbs_down"
data = {“answerId”: answerId, “feedbackType”: feedbackType}

token = "your_api_key_here"  # Best stored in secrets management
headers = {"Authorization": "Bearer " + token}

# Make sure your ‘content-type’ header is set to ‘application/json’
response = requests.post(endpoint, json=data, headers=headers)
print(response.json());
{
    "message": "Added feedback",
}

Body

answerId
string
required

This is the anwer_uuid retrieved from /answer response object

feedbackType
string
required

This is the feedback type from users. It can be set to [“thumbs_up”, “thumbs_down”]

Response

message
string

Indicates whether the feedback was added.