import requests
url = "https://api-prod.usefini.com/v2/bots/requests/public"
token = "your_api_key" # Replace with your actual API key
headers = {"Authorization": f"Bearer {token}"}
params = {
"startEpoch": 1633046400000, # Optional
"endEpoch": 1635638400000, # Optional
"limit": 50, # Optional
"direction": "", # Optional (e.g., 'next' or 'previous')
"cursor": "your_cursor_value", # Optional
"source": "zendesk", # Optional
"category": "support", # Optional
"feedbackType": "", # Optional ('thumbs_up', 'thumbs_down', 'no_feedback')
"escalation": True, # Optional
"hasLinks": False, # Optional
"userId": "", # Optional
"ticketId": "ticket456", # Optional
"question": "Example question?" # Optional
}
response = requests.get(url, params=params, headers=headers)
if response.status_code == 200:
print(response.json())
else:
print(f"Failed to fetch data: {response.status_code}")
{
"conversations": [
{
"id": "a35607bc-8008-44fd-9991-1d7c2c5c3f22",
"externalId": null,
"source": "widget",
"channel": null,
"escalation": false,
"hasLinks": true,
"feedbackType": null,
"expectingUserFollowup": false,
"url": null,
"categories": [
"fini-other"
],
"createdAt": 1740407169191,
"updatedAt": 1740407178879,
"botRequests": [
{
"question": "Hello",
"answer": "Hello, how can I help you?",
"categories": [
"fini-other"
],
"escalation": false,
"reasoning": null,
"feedbackType": null,
"expectingUserFollowup": false,
"createdAt": 1740407178963,
"basedOn": []
},
]
},
],
"hasMore": false
}
This endpoint allows you to fetch chat history
import requests
url = "https://api-prod.usefini.com/v2/bots/requests/public"
token = "your_api_key" # Replace with your actual API key
headers = {"Authorization": f"Bearer {token}"}
params = {
"startEpoch": 1633046400000, # Optional
"endEpoch": 1635638400000, # Optional
"limit": 50, # Optional
"direction": "", # Optional (e.g., 'next' or 'previous')
"cursor": "your_cursor_value", # Optional
"source": "zendesk", # Optional
"category": "support", # Optional
"feedbackType": "", # Optional ('thumbs_up', 'thumbs_down', 'no_feedback')
"escalation": True, # Optional
"hasLinks": False, # Optional
"userId": "", # Optional
"ticketId": "ticket456", # Optional
"question": "Example question?" # Optional
}
response = requests.get(url, params=params, headers=headers)
if response.status_code == 200:
print(response.json())
else:
print(f"Failed to fetch data: {response.status_code}")
{
"conversations": [
{
"id": "a35607bc-8008-44fd-9991-1d7c2c5c3f22",
"externalId": null,
"source": "widget",
"channel": null,
"escalation": false,
"hasLinks": true,
"feedbackType": null,
"expectingUserFollowup": false,
"url": null,
"categories": [
"fini-other"
],
"createdAt": 1740407169191,
"updatedAt": 1740407178879,
"botRequests": [
{
"question": "Hello",
"answer": "Hello, how can I help you?",
"categories": [
"fini-other"
],
"escalation": false,
"reasoning": null,
"feedbackType": null,
"expectingUserFollowup": false,
"createdAt": 1740407178963,
"basedOn": []
},
]
},
],
"hasMore": false
}
Show Toggle object
Show Toggle object
import requests
url = "https://api-prod.usefini.com/v2/bots/requests/public"
token = "your_api_key" # Replace with your actual API key
headers = {"Authorization": f"Bearer {token}"}
params = {
"startEpoch": 1633046400000, # Optional
"endEpoch": 1635638400000, # Optional
"limit": 50, # Optional
"direction": "", # Optional (e.g., 'next' or 'previous')
"cursor": "your_cursor_value", # Optional
"source": "zendesk", # Optional
"category": "support", # Optional
"feedbackType": "", # Optional ('thumbs_up', 'thumbs_down', 'no_feedback')
"escalation": True, # Optional
"hasLinks": False, # Optional
"userId": "", # Optional
"ticketId": "ticket456", # Optional
"question": "Example question?" # Optional
}
response = requests.get(url, params=params, headers=headers)
if response.status_code == 200:
print(response.json())
else:
print(f"Failed to fetch data: {response.status_code}")
{
"conversations": [
{
"id": "a35607bc-8008-44fd-9991-1d7c2c5c3f22",
"externalId": null,
"source": "widget",
"channel": null,
"escalation": false,
"hasLinks": true,
"feedbackType": null,
"expectingUserFollowup": false,
"url": null,
"categories": [
"fini-other"
],
"createdAt": 1740407169191,
"updatedAt": 1740407178879,
"botRequests": [
{
"question": "Hello",
"answer": "Hello, how can I help you?",
"categories": [
"fini-other"
],
"escalation": false,
"reasoning": null,
"feedbackType": null,
"expectingUserFollowup": false,
"createdAt": 1740407178963,
"basedOn": []
},
]
},
],
"hasMore": false
}