curl --location --request GET 'https://app.gpt-trainer.com/api/v1/chatbot/{uuid}/sessions?start_timestamp={start_timestamp}&end_timestamp={end_timestamp}' \
--header 'Authorization: Bearer <token>'
import requests
uuid = '<chatbot-uuid>'
start_timestamp = '<timestamp>'
end_timestamp = '<timestamp>'
url = f'https://app.gpt-trainer.com/api/v1/chatbot/{uuid}/sessions?start_timestamp={start_timestamp}&end_timestamp={end_timestamp}'
headers = {
'Authorization': 'Bearer <token>'
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
print("Request successful!")
print(response.json())
else:
print("Request failed with status code:", response.status_code)
print(response.text)
const axios = require("axios");
const uuid = "<chatbot-uuid>";
const start_timestamp = '<timestamp>'
const end_timestamp = '<timestamp>'
const url = `https://app.gpt-trainer.com/api/v1/chatbot/${uuid}/sessions?start_timestamp=${start_timestamp}&end_timestamp=${end_timestamp}`;
const headers = {
Authorization: "Bearer <token>",
};
axios
.get(url, { headers })
.then((response) => {
console.log("Request successful!");
console.log(response.data);
})
.catch((error) => {
console.error("Request failed:", error);
});
[
{
"created_at": "string",
"modified_at": "string",
"uuid": "string"
}
]
Chatbot Sessions
Fetch All Sessions
Fetch the list of sessions for a chatbot specified by chatbot uuid
GET
/
api
/
v1
/
chatbot
/
{uuid}
/
sessions
curl --location --request GET 'https://app.gpt-trainer.com/api/v1/chatbot/{uuid}/sessions?start_timestamp={start_timestamp}&end_timestamp={end_timestamp}' \
--header 'Authorization: Bearer <token>'
import requests
uuid = '<chatbot-uuid>'
start_timestamp = '<timestamp>'
end_timestamp = '<timestamp>'
url = f'https://app.gpt-trainer.com/api/v1/chatbot/{uuid}/sessions?start_timestamp={start_timestamp}&end_timestamp={end_timestamp}'
headers = {
'Authorization': 'Bearer <token>'
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
print("Request successful!")
print(response.json())
else:
print("Request failed with status code:", response.status_code)
print(response.text)
const axios = require("axios");
const uuid = "<chatbot-uuid>";
const start_timestamp = '<timestamp>'
const end_timestamp = '<timestamp>'
const url = `https://app.gpt-trainer.com/api/v1/chatbot/${uuid}/sessions?start_timestamp=${start_timestamp}&end_timestamp=${end_timestamp}`;
const headers = {
Authorization: "Bearer <token>",
};
axios
.get(url, { headers })
.then((response) => {
console.log("Request successful!");
console.log(response.data);
})
.catch((error) => {
console.error("Request failed:", error);
});
[
{
"created_at": "string",
"modified_at": "string",
"uuid": "string"
}
]
Path
string
required
Chatbot uuid
Query Parameters
string
Filter sessions created after this timestamp (inclusive).
Format: ISO 8601 —
Format: ISO 8601 —
YYYY-MM-DDTHH:mm:ss.sssZstring
Filter sessions created before this timestamp (inclusive).
Format: ISO 8601 —
Format: ISO 8601 —
YYYY-MM-DDTHH:mm:ss.sssZTimestamp Format
The API uses ISO 8601 format for timestamps:- Format:
YYYY-MM-DDTHH:mm:ss.sssZ - Example:
start_timestamp=2025-07-16T07:00:00.000Zmeans July 16, 2025 at 7:00 AM UTCend_timestamp=2025-07-24T06:59:59.000Zmeans July 24, 2025 at 6:59:59 AM UTC
Usage Tips
- Always use UTC timezone (
Zat the end) - Include milliseconds (
.000) even if zero - Use 24-hour time format
- Don’t forget the
Tseparator between date and time - URL-encode the entire value if passing in a URL manually
Response
object[]
curl --location --request GET 'https://app.gpt-trainer.com/api/v1/chatbot/{uuid}/sessions?start_timestamp={start_timestamp}&end_timestamp={end_timestamp}' \
--header 'Authorization: Bearer <token>'
import requests
uuid = '<chatbot-uuid>'
start_timestamp = '<timestamp>'
end_timestamp = '<timestamp>'
url = f'https://app.gpt-trainer.com/api/v1/chatbot/{uuid}/sessions?start_timestamp={start_timestamp}&end_timestamp={end_timestamp}'
headers = {
'Authorization': 'Bearer <token>'
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
print("Request successful!")
print(response.json())
else:
print("Request failed with status code:", response.status_code)
print(response.text)
const axios = require("axios");
const uuid = "<chatbot-uuid>";
const start_timestamp = '<timestamp>'
const end_timestamp = '<timestamp>'
const url = `https://app.gpt-trainer.com/api/v1/chatbot/${uuid}/sessions?start_timestamp=${start_timestamp}&end_timestamp=${end_timestamp}`;
const headers = {
Authorization: "Bearer <token>",
};
axios
.get(url, { headers })
.then((response) => {
console.log("Request successful!");
console.log(response.data);
})
.catch((error) => {
console.error("Request failed:", error);
});
[
{
"created_at": "string",
"modified_at": "string",
"uuid": "string"
}
]