Skip to main content
GET
/
sessions
Get sessions
curl --request GET \
  --url https://api.galtea.ai/sessions \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.galtea.ai/sessions"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.galtea.ai/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.galtea.ai/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.galtea.ai/sessions"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.galtea.ai/sessions")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.galtea.ai/sessions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
[
  {
    "id": "session_123",
    "customId": "custom_session_123",
    "versionId": "ver_123",
    "userId": "user_123",
    "testCaseId": "tc_123",
    "context": {
      "value": "Session context information"
    },
    "stoppingReason": "GOAL_ACHIEVED",
    "recordingUri": "s3://galtea-bucket/audio/org_123/session_abc-recording.mp3",
    "error": "External API responded with HTTP 422: Unprocessable Entity — {\"detail\":\"model not found\"}",
    "status": "PENDING",
    "isProduction": false,
    "metadata": {
      "key": "value"
    },
    "createdAt": "2023-11-07T05:31:56Z",
    "deletedAt": "2023-11-07T05:31:56Z"
  }
]
{
"error": "Error type",
"message": "Error message description"
}
{
"error": "Error type",
"message": "Error message description"
}

Authorizations

Authorization
string
header
required

API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....

Query Parameters

ids
string[]

Filter by session IDs

customIds
string[]

Filter by session custom IDs

productIds
string[]

Filter by product IDs

testIds
string[]

Filter by test IDs (include only). Use an empty string ("") to select sessions without a test

excludeTestIds
string[]

Omit sessions linked to the specified test IDs. Use an empty string ("") to omit sessions without a test

versionIds
string[]

Filter by version IDs

testCaseIds
string[]

Filter by test case IDs

isProduction
boolean

Filter by the session's isProduction flag. Prefer this over the legacy testIds/excludeTestIds empty-string trick.

statuses
enum<string>[]

Filter by session statuses. Multiple values combine as OR.

Available options:
PENDING,
COMPLETED,
FAILED
sort
string[]

Sort instructions (field and direction pairs)

limit
integer

Maximum number of results

offset
integer

Number of results to skip

fromCreatedAt
string<date-time>

Filter sessions created at or after this timestamp (ISO 8601 format)

toCreatedAt
string<date-time>

Filter sessions created at or before this timestamp (ISO 8601 format)

Response

Sessions retrieved successfully

id
string
Example:

"session_123"

customId
string | null
Example:

"custom_session_123"

versionId
string
Example:

"ver_123"

userId
string | null
Example:

"user_123"

testCaseId
string | null
Example:

"tc_123"

context
object | null

Structured context data. For plain text context, format is { value: "..." }

Example:
{ "value": "Session context information" }
stoppingReason
string | null
Example:

"GOAL_ACHIEVED"

recordingUri
string | null

Canonical storage URI of the full-call recording for a telephony-evaluation session. Null for non-telephony sessions or before the recording is processed. Resolve to a playable URL via GET /storage?uri=.

Example:

"s3://galtea-bucket/audio/org_123/session_abc-recording.mp3"

error
string | null
Example:

"External API responded with HTTP 422: Unprocessable Entity — {\"detail\":\"model not found\"}"

status
enum<string>
Available options:
PENDING,
COMPLETED,
FAILED
Example:

"PENDING"

isProduction
boolean

True when the session represents real production traffic (no associated test case).

Example:

false

metadata
object | null
Example:
{ "key": "value" }
createdAt
string<date-time>
deletedAt
string<date-time> | null