Rename Session
curl --request POST \
--url https://api.example.com/sessions/{session_id}/rename \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session_name": "<string>"
}
'import requests
url = "https://api.example.com/sessions/{session_id}/rename"
payload = { "session_name": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({session_name: '<string>'})
};
fetch('https://api.example.com/sessions/{session_id}/rename', 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.example.com/sessions/{session_id}/rename",
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([
'session_name' => '<string>'
]),
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.example.com/sessions/{session_id}/rename"
payload := strings.NewReader("{\n \"session_name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/sessions/{session_id}/rename")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"session_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/sessions/{session_id}/rename")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"session_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"user_id": "123",
"agent_session_id": "6f6cfbfd-9643-479a-ae47-b8f32eb4d710",
"session_id": "6f6cfbfd-9643-479a-ae47-b8f32eb4d710",
"session_name": "What tools do you have?",
"session_summary": {
"summary": "The user and assistant engaged in a conversation about the tools the agent has available.",
"updated_at": "2025-09-05T18:02:12.269392"
},
"session_state": {},
"agent_id": "basic-agent",
"total_tokens": 160,
"agent_data": {
"name": "Basic Agent",
"agent_id": "basic-agent",
"model": {
"provider": "OpenAI",
"name": "OpenAIChat",
"id": "gpt-4o"
}
},
"metrics": {
"input_tokens": 134,
"output_tokens": 26,
"total_tokens": 160,
"audio_input_tokens": 0,
"audio_output_tokens": 0,
"audio_total_tokens": 0,
"cache_read_tokens": 0,
"cache_write_tokens": 0,
"reasoning_tokens": 0
},
"chat_history": [
{
"content": "<additional_information>\n- Use markdown to format your answers.\n- The current time is 2025-09-05 18:02:09.171627.\n</additional_information>\n\nYou have access to memories from previous interactions with the user that you can use:\n\n<memories_from_previous_interactions>\n- User really likes Digimon and Japan.\n- User really likes Japan.\n- User likes coffee.\n</memories_from_previous_interactions>\n\nNote: this information is from previous interactions and may be updated in this conversation. You should always prefer information from this conversation over the past memories.",
"from_history": false,
"stop_after_tool_call": false,
"role": "system",
"created_at": 1757088129
},
{
"content": "What tools do you have?",
"from_history": false,
"stop_after_tool_call": false,
"role": "user",
"created_at": 1757088129
},
{
"content": "I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!",
"from_history": false,
"stop_after_tool_call": false,
"role": "assistant",
"metrics": {
"input_tokens": 134,
"output_tokens": 26,
"total_tokens": 160
},
"created_at": 1757088129
}
],
"created_at": "2025-09-05T16:02:09Z",
"updated_at": "2025-09-05T16:02:09Z"
}{
"detail": "Bad request"
}{
"detail": "Unauthenticated access"
}{
"detail": "Not found"
}{
"detail": [
{
"loc": [
"body",
"endpoint"
],
"msg": "Value error, Endpoint must be a path, not a full URL",
"type": "value_error"
}
]
}{
"detail": "Internal server error"
}Sessions
Rename Session
Update the name of an existing session. Useful for organizing and categorizing sessions with meaningful names for better identification and management.
POST
/
sessions
/
{session_id}
/
rename
Rename Session
curl --request POST \
--url https://api.example.com/sessions/{session_id}/rename \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session_name": "<string>"
}
'import requests
url = "https://api.example.com/sessions/{session_id}/rename"
payload = { "session_name": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({session_name: '<string>'})
};
fetch('https://api.example.com/sessions/{session_id}/rename', 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.example.com/sessions/{session_id}/rename",
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([
'session_name' => '<string>'
]),
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.example.com/sessions/{session_id}/rename"
payload := strings.NewReader("{\n \"session_name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/sessions/{session_id}/rename")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"session_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/sessions/{session_id}/rename")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"session_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"user_id": "123",
"agent_session_id": "6f6cfbfd-9643-479a-ae47-b8f32eb4d710",
"session_id": "6f6cfbfd-9643-479a-ae47-b8f32eb4d710",
"session_name": "What tools do you have?",
"session_summary": {
"summary": "The user and assistant engaged in a conversation about the tools the agent has available.",
"updated_at": "2025-09-05T18:02:12.269392"
},
"session_state": {},
"agent_id": "basic-agent",
"total_tokens": 160,
"agent_data": {
"name": "Basic Agent",
"agent_id": "basic-agent",
"model": {
"provider": "OpenAI",
"name": "OpenAIChat",
"id": "gpt-4o"
}
},
"metrics": {
"input_tokens": 134,
"output_tokens": 26,
"total_tokens": 160,
"audio_input_tokens": 0,
"audio_output_tokens": 0,
"audio_total_tokens": 0,
"cache_read_tokens": 0,
"cache_write_tokens": 0,
"reasoning_tokens": 0
},
"chat_history": [
{
"content": "<additional_information>\n- Use markdown to format your answers.\n- The current time is 2025-09-05 18:02:09.171627.\n</additional_information>\n\nYou have access to memories from previous interactions with the user that you can use:\n\n<memories_from_previous_interactions>\n- User really likes Digimon and Japan.\n- User really likes Japan.\n- User likes coffee.\n</memories_from_previous_interactions>\n\nNote: this information is from previous interactions and may be updated in this conversation. You should always prefer information from this conversation over the past memories.",
"from_history": false,
"stop_after_tool_call": false,
"role": "system",
"created_at": 1757088129
},
{
"content": "What tools do you have?",
"from_history": false,
"stop_after_tool_call": false,
"role": "user",
"created_at": 1757088129
},
{
"content": "I don't have access to external tools or the internet. However, I can assist you with a wide range of topics by providing information, answering questions, and offering suggestions based on the knowledge I've been trained on. If there's anything specific you need help with, feel free to ask!",
"from_history": false,
"stop_after_tool_call": false,
"role": "assistant",
"metrics": {
"input_tokens": 134,
"output_tokens": 26,
"total_tokens": 160
},
"created_at": 1757088129
}
],
"created_at": "2025-09-05T16:02:09Z",
"updated_at": "2025-09-05T16:02:09Z"
}{
"detail": "Bad request"
}{
"detail": "Unauthenticated access"
}{
"detail": "Not found"
}{
"detail": [
{
"loc": [
"body",
"endpoint"
],
"msg": "Value error, Endpoint must be a path, not a full URL",
"type": "value_error"
}
]
}{
"detail": "Internal server error"
}Authorizations
Query Parameters
Response
Session renamed successfully
- AgentSessionDetailSchema
- TeamSessionDetailSchema
- WorkflowSessionDetailSchema
Was this page helpful?