API Documentation
Get chat history
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
}
Query
Allows you to fetch chat history for a particular source, or all sources. Valid values are “all”,“zendesk”,“slack”,“discord”,“widget”,“intercom”,“ui”,“api”
Epoch timestamp in milliseconds for the start date of history
Epoch timestamp in milliseconds for the end date of history
The number of records to fetch per request
Direction for pagination (e.g., “next” or “previous”)
Cursor for pagination
Filter by category
Feedback type filter (e.g., “thumbs_up”, “thumbs_down”, “no_feedback”)
Filter conversations based on escalation status
Filter conversations that contain knowledge
Filter by ticket ID (this is from your ticketing system)
Filter by question text
Response
A list of conversations containing chat history.
Unique ID for the conversation
External ID associated with the conversation (from your ticketing system)
Source used to ask the question
Channel through which the conversation occurred
Indicates if the conversation was escalated
Indicates if the conversation contains links
Feedback type associated with the conversation
Indicates if the system is expecting a follow-up from the user
URL associated with the conversation (if any)
Categories assigned to the conversation
Epoch timestamp of when the conversation was created
Epoch timestamp of when the conversation was last updated
A list of bot interactions within the conversation.
Question asked in the conversation
Answer provided by Fini
Categories assigned to the response
Indicates if the bot’s response led to escalation
Reasoning behind the bot’s response (if any)
Feedback type given on the bot’s response
Indicates if the bot expects a follow-up from the user
Epoch timestamp when the response was generated
Knowledge sources used for generating the response
Indicates if there are more conversations to fetch
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
}
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
}