Update session
curl --request PATCH \
--url https://api.galtea.ai/sessions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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": "https://files.galtea.ai/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"
},
"runId": "run_123",
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.galtea.ai/sessions/{id}"
payload = {
"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": "https://files.galtea.ai/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" },
"runId": "run_123",
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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: 'https://files.galtea.ai/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'},
runId: 'run_123',
createdAt: '2023-11-07T05:31:56Z',
deletedAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.galtea.ai/sessions/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'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' => 'https://files.galtea.ai/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'
],
'runId' => 'run_123',
'createdAt' => '2023-11-07T05:31:56Z',
'deletedAt' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.galtea.ai/sessions/{id}"
payload := strings.NewReader("{\n \"id\": \"session_123\",\n \"customId\": \"custom_session_123\",\n \"versionId\": \"ver_123\",\n \"userId\": \"user_123\",\n \"testCaseId\": \"tc_123\",\n \"context\": {\n \"value\": \"Session context information\"\n },\n \"stoppingReason\": \"GOAL_ACHIEVED\",\n \"recordingUri\": \"https://files.galtea.ai/audio/org_123/session_abc-recording.mp3\",\n \"error\": \"External API responded with HTTP 422: Unprocessable Entity — {\\\"detail\\\":\\\"model not found\\\"}\",\n \"status\": \"PENDING\",\n \"isProduction\": false,\n \"metadata\": {\n \"key\": \"value\"\n },\n \"runId\": \"run_123\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"deletedAt\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.galtea.ai/sessions/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"session_123\",\n \"customId\": \"custom_session_123\",\n \"versionId\": \"ver_123\",\n \"userId\": \"user_123\",\n \"testCaseId\": \"tc_123\",\n \"context\": {\n \"value\": \"Session context information\"\n },\n \"stoppingReason\": \"GOAL_ACHIEVED\",\n \"recordingUri\": \"https://files.galtea.ai/audio/org_123/session_abc-recording.mp3\",\n \"error\": \"External API responded with HTTP 422: Unprocessable Entity — {\\\"detail\\\":\\\"model not found\\\"}\",\n \"status\": \"PENDING\",\n \"isProduction\": false,\n \"metadata\": {\n \"key\": \"value\"\n },\n \"runId\": \"run_123\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"deletedAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galtea.ai/sessions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"session_123\",\n \"customId\": \"custom_session_123\",\n \"versionId\": \"ver_123\",\n \"userId\": \"user_123\",\n \"testCaseId\": \"tc_123\",\n \"context\": {\n \"value\": \"Session context information\"\n },\n \"stoppingReason\": \"GOAL_ACHIEVED\",\n \"recordingUri\": \"https://files.galtea.ai/audio/org_123/session_abc-recording.mp3\",\n \"error\": \"External API responded with HTTP 422: Unprocessable Entity — {\\\"detail\\\":\\\"model not found\\\"}\",\n \"status\": \"PENDING\",\n \"isProduction\": false,\n \"metadata\": {\n \"key\": \"value\"\n },\n \"runId\": \"run_123\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"deletedAt\": \"2023-11-07T05:31:56Z\"\n}"
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": "https://files.galtea.ai/audio/org_123/session_abc-recording.mp3",
"error": "External API responded with HTTP 422: Unprocessable Entity — {\"detail\":\"model not found\"}",
"status": "PENDING",
"isProduction": false,
"isSeed": false,
"runId": "run_123",
"deletedAt": "2023-11-07T05:31:56Z",
"metadata": {
"key": "value"
},
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}Update session
Update an existing session. See Sessions.
PATCH
/
sessions
/
{id}
Update session
curl --request PATCH \
--url https://api.galtea.ai/sessions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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": "https://files.galtea.ai/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"
},
"runId": "run_123",
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.galtea.ai/sessions/{id}"
payload = {
"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": "https://files.galtea.ai/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" },
"runId": "run_123",
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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: 'https://files.galtea.ai/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'},
runId: 'run_123',
createdAt: '2023-11-07T05:31:56Z',
deletedAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.galtea.ai/sessions/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'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' => 'https://files.galtea.ai/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'
],
'runId' => 'run_123',
'createdAt' => '2023-11-07T05:31:56Z',
'deletedAt' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.galtea.ai/sessions/{id}"
payload := strings.NewReader("{\n \"id\": \"session_123\",\n \"customId\": \"custom_session_123\",\n \"versionId\": \"ver_123\",\n \"userId\": \"user_123\",\n \"testCaseId\": \"tc_123\",\n \"context\": {\n \"value\": \"Session context information\"\n },\n \"stoppingReason\": \"GOAL_ACHIEVED\",\n \"recordingUri\": \"https://files.galtea.ai/audio/org_123/session_abc-recording.mp3\",\n \"error\": \"External API responded with HTTP 422: Unprocessable Entity — {\\\"detail\\\":\\\"model not found\\\"}\",\n \"status\": \"PENDING\",\n \"isProduction\": false,\n \"metadata\": {\n \"key\": \"value\"\n },\n \"runId\": \"run_123\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"deletedAt\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.galtea.ai/sessions/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"session_123\",\n \"customId\": \"custom_session_123\",\n \"versionId\": \"ver_123\",\n \"userId\": \"user_123\",\n \"testCaseId\": \"tc_123\",\n \"context\": {\n \"value\": \"Session context information\"\n },\n \"stoppingReason\": \"GOAL_ACHIEVED\",\n \"recordingUri\": \"https://files.galtea.ai/audio/org_123/session_abc-recording.mp3\",\n \"error\": \"External API responded with HTTP 422: Unprocessable Entity — {\\\"detail\\\":\\\"model not found\\\"}\",\n \"status\": \"PENDING\",\n \"isProduction\": false,\n \"metadata\": {\n \"key\": \"value\"\n },\n \"runId\": \"run_123\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"deletedAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galtea.ai/sessions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"session_123\",\n \"customId\": \"custom_session_123\",\n \"versionId\": \"ver_123\",\n \"userId\": \"user_123\",\n \"testCaseId\": \"tc_123\",\n \"context\": {\n \"value\": \"Session context information\"\n },\n \"stoppingReason\": \"GOAL_ACHIEVED\",\n \"recordingUri\": \"https://files.galtea.ai/audio/org_123/session_abc-recording.mp3\",\n \"error\": \"External API responded with HTTP 422: Unprocessable Entity — {\\\"detail\\\":\\\"model not found\\\"}\",\n \"status\": \"PENDING\",\n \"isProduction\": false,\n \"metadata\": {\n \"key\": \"value\"\n },\n \"runId\": \"run_123\",\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"deletedAt\": \"2023-11-07T05:31:56Z\"\n}"
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": "https://files.galtea.ai/audio/org_123/session_abc-recording.mp3",
"error": "External API responded with HTTP 422: Unprocessable Entity — {\"detail\":\"model not found\"}",
"status": "PENDING",
"isProduction": false,
"isSeed": false,
"runId": "run_123",
"deletedAt": "2023-11-07T05:31:56Z",
"metadata": {
"key": "value"
},
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}You are reading the docs of Galtea 5.11. Read this page in the latest version.
Authorizations
Body
application/json
Storage URI of the full-call recording for a telephony-evaluation session, returned under STORAGE_PUBLIC_BASE_URL when the deployment configures one. Null for non-telephony sessions or before the recording is processed. Resolve to a playable URL via GET /storage?uri=.
Example:
"https://files.galtea.ai/audio/org_123/session_abc-recording.mp3"
Response
Session updated successfully
Storage URI of the full-call recording for a telephony-evaluation session, returned under STORAGE_PUBLIC_BASE_URL when the deployment configures one. Null for non-telephony sessions or before the recording is processed. Resolve to a playable URL via GET /storage?uri=.
Example:
"https://files.galtea.ai/audio/org_123/session_abc-recording.mp3"