List Sessions
curl --request POST \
--url https://api.gurubase.io/api/v1/{guru_slug}/sessions/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"page_num": 123,
"search_query": "<string>",
"external_user_id": "<string>"
}
'import requests
url = "https://api.gurubase.io/api/v1/{guru_slug}/sessions/"
payload = {
"page_num": 123,
"search_query": "<string>",
"external_user_id": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({page_num: 123, search_query: '<string>', external_user_id: '<string>'})
};
fetch('https://api.gurubase.io/api/v1/{guru_slug}/sessions/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gurubase.io/api/v1/{guru_slug}/sessions/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'page_num' => 123,
'search_query' => '<string>',
'external_user_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gurubase.io/api/v1/{guru_slug}/sessions/"
payload := strings.NewReader("{\n \"page_num\": 123,\n \"search_query\": \"<string>\",\n \"external_user_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gurubase.io/api/v1/{guru_slug}/sessions/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"page_num\": 123,\n \"search_query\": \"<string>\",\n \"external_user_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gurubase.io/api/v1/{guru_slug}/sessions/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"page_num\": 123,\n \"search_query\": \"<string>\",\n \"external_user_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"today": [
{
"last_used": "2025-07-29T10:23:27.535170Z",
"id": "0389210e-720d-442c-8fd4-2c6ecda89627",
"guru_type_slug": "gurubase",
"guru_type_name": "Gurubase",
"root_question_name": "What is Gurubase?",
"root_question_slug": "what-is-gurubase-73d46ea7-12b5-49c7-ab5e-1dffdb8b71de-69e06b42-d549-4624-8400-768f7388361a",
"root_question_link": "<link_to_the_question>"
}
],
"last_week": [
{
"last_used": "2025-07-28T16:05:10.579616Z",
"id": "25dffa55-b947-41af-9bca-a2361afca8be",
"guru_type_slug": "gurubase",
"guru_type_name": "Gurubase",
"root_question_name": "Does Gurubase support Slack ?",
"root_question_slug": "does-gurubase-support-slack-64911f4a-03c7-4105-a477-80d68f030dfe",
"root_question_link": "<link_to_the_question>"
}
],
"older": [],
"has_more": false
}
{
"msg": "Page number must be an integer"
}
{
"msg": "Invalid API key"
}
{
"msg": "Forbidden"
}
{
"msg": "Guru type {guru_slug} not found"
}
{
"msg": "Request was throttled. Expected available in 56 seconds."
}
Endpoints
List Sessions
Retrieve conversation sessions for a Guru
POST
/
{guru_slug}
/
sessions
/
List Sessions
curl --request POST \
--url https://api.gurubase.io/api/v1/{guru_slug}/sessions/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"page_num": 123,
"search_query": "<string>",
"external_user_id": "<string>"
}
'import requests
url = "https://api.gurubase.io/api/v1/{guru_slug}/sessions/"
payload = {
"page_num": 123,
"search_query": "<string>",
"external_user_id": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({page_num: 123, search_query: '<string>', external_user_id: '<string>'})
};
fetch('https://api.gurubase.io/api/v1/{guru_slug}/sessions/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gurubase.io/api/v1/{guru_slug}/sessions/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'page_num' => 123,
'search_query' => '<string>',
'external_user_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gurubase.io/api/v1/{guru_slug}/sessions/"
payload := strings.NewReader("{\n \"page_num\": 123,\n \"search_query\": \"<string>\",\n \"external_user_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gurubase.io/api/v1/{guru_slug}/sessions/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"page_num\": 123,\n \"search_query\": \"<string>\",\n \"external_user_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gurubase.io/api/v1/{guru_slug}/sessions/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"page_num\": 123,\n \"search_query\": \"<string>\",\n \"external_user_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"today": [
{
"last_used": "2025-07-29T10:23:27.535170Z",
"id": "0389210e-720d-442c-8fd4-2c6ecda89627",
"guru_type_slug": "gurubase",
"guru_type_name": "Gurubase",
"root_question_name": "What is Gurubase?",
"root_question_slug": "what-is-gurubase-73d46ea7-12b5-49c7-ab5e-1dffdb8b71de-69e06b42-d549-4624-8400-768f7388361a",
"root_question_link": "<link_to_the_question>"
}
],
"last_week": [
{
"last_used": "2025-07-28T16:05:10.579616Z",
"id": "25dffa55-b947-41af-9bca-a2361afca8be",
"guru_type_slug": "gurubase",
"guru_type_name": "Gurubase",
"root_question_name": "Does Gurubase support Slack ?",
"root_question_slug": "does-gurubase-support-slack-64911f4a-03c7-4105-a477-80d68f030dfe",
"root_question_link": "<link_to_the_question>"
}
],
"older": [],
"has_more": false
}
{
"msg": "Page number must be an integer"
}
{
"msg": "Invalid API key"
}
{
"msg": "Forbidden"
}
{
"msg": "Guru type {guru_slug} not found"
}
{
"msg": "Request was throttled. Expected available in 56 seconds."
}
Retrieve conversation sessions for a specific Guru. This endpoint supports pagination and search functionality, returning sessions grouped by time periods.
Path Parameters
string
required
The slug of the Guru to retrieve sessions for
Headers
string
required
Your API key for authentication. You can obtain your API key from the Gurubase dashboard.
Body Parameters
integer
default:1
The page number for pagination. Must be a positive integer.
string
default:""
Search query to filter sessions. Searches across question text, user questions, and session slugs.
string
Filter sessions by external user ID. When provided, only returns sessions associated with this external user ID.
Response
array
Sessions from today
Show Session Object
Show Session Object
array
Sessions from the last 7 days (excluding today)
array
Sessions older than 7 days
boolean
Whether there are more sessions available beyond the current page
{
"today": [
{
"last_used": "2025-07-29T10:23:27.535170Z",
"id": "0389210e-720d-442c-8fd4-2c6ecda89627",
"guru_type_slug": "gurubase",
"guru_type_name": "Gurubase",
"root_question_name": "What is Gurubase?",
"root_question_slug": "what-is-gurubase-73d46ea7-12b5-49c7-ab5e-1dffdb8b71de-69e06b42-d549-4624-8400-768f7388361a",
"root_question_link": "<link_to_the_question>"
}
],
"last_week": [
{
"last_used": "2025-07-28T16:05:10.579616Z",
"id": "25dffa55-b947-41af-9bca-a2361afca8be",
"guru_type_slug": "gurubase",
"guru_type_name": "Gurubase",
"root_question_name": "Does Gurubase support Slack ?",
"root_question_slug": "does-gurubase-support-slack-64911f4a-03c7-4105-a477-80d68f030dfe",
"root_question_link": "<link_to_the_question>"
}
],
"older": [],
"has_more": false
}
{
"msg": "Page number must be an integer"
}
{
"msg": "Invalid API key"
}
{
"msg": "Forbidden"
}
{
"msg": "Guru type {guru_slug} not found"
}
{
"msg": "Request was throttled. Expected available in 56 seconds."
}
Was this page helpful?
⌘I