cURL
curl 'https://api.gumloop.com/api/v1/sessions/sess_xYz789AbCd' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
from gumloop import Gumloop
client = Gumloop(access_token="YOUR_ACCESS_TOKEN")
response = client.sessions.retrieve("sess_xYz789AbCd")
print(response.session.state)
for message in response.session.messages:
print(message.role, message.content)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gumloop.com/api/v1/sessions/{session_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.gumloop.com/api/v1/sessions/{session_id}",
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.gumloop.com/api/v1/sessions/{session_id}"
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.gumloop.com/api/v1/sessions/{session_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gumloop.com/api/v1/sessions/{session_id}")
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{
"session": {
"id": "sess_xYz789AbCd",
"agent_id": "abc123DEFghiJKL",
"messages": [
{
"id": "msg_a1b2c3",
"role": "user",
"content": "Research Acme Corp and draft a brief.",
"created_at": "2026-05-15T14:32:00Z",
"creator_id": "user_2b9d71f0",
"parts": null
},
{
"id": "msg_d4e5f6",
"role": "assistant",
"content": "Here is what I found about Acme Corp...",
"created_at": "2026-05-15T14:32:09Z",
"creator_id": null,
"parts": null
}
],
"created_at": "2026-05-15T14:32:00Z",
"state": "completed",
"agent_name": "Sales research agent",
"agent_team_id": "team_4f8c92ab",
"agent_creator_user_id": "user_2b9d71f0",
"agent_icon_url": null,
"agent_tools": [],
"participants": {
"user_2b9d71f0": {
"first_name": "Ada",
"last_name": "Lovelace"
}
},
"creator": {
"id": "user_2b9d71f0",
"first_name": "Ada",
"last_name": "Lovelace",
"email": "ada@example.com",
"profile_picture": null
}
},
"queue_position": null
}Retrieve session
Retrieve a session by ID, including its messages, current state, agent metadata, and participants.
GET
/
sessions
/
{session_id}
cURL
curl 'https://api.gumloop.com/api/v1/sessions/sess_xYz789AbCd' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
from gumloop import Gumloop
client = Gumloop(access_token="YOUR_ACCESS_TOKEN")
response = client.sessions.retrieve("sess_xYz789AbCd")
print(response.session.state)
for message in response.session.messages:
print(message.role, message.content)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gumloop.com/api/v1/sessions/{session_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.gumloop.com/api/v1/sessions/{session_id}",
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.gumloop.com/api/v1/sessions/{session_id}"
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.gumloop.com/api/v1/sessions/{session_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gumloop.com/api/v1/sessions/{session_id}")
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{
"session": {
"id": "sess_xYz789AbCd",
"agent_id": "abc123DEFghiJKL",
"messages": [
{
"id": "msg_a1b2c3",
"role": "user",
"content": "Research Acme Corp and draft a brief.",
"created_at": "2026-05-15T14:32:00Z",
"creator_id": "user_2b9d71f0",
"parts": null
},
{
"id": "msg_d4e5f6",
"role": "assistant",
"content": "Here is what I found about Acme Corp...",
"created_at": "2026-05-15T14:32:09Z",
"creator_id": null,
"parts": null
}
],
"created_at": "2026-05-15T14:32:00Z",
"state": "completed",
"agent_name": "Sales research agent",
"agent_team_id": "team_4f8c92ab",
"agent_creator_user_id": "user_2b9d71f0",
"agent_icon_url": null,
"agent_tools": [],
"participants": {
"user_2b9d71f0": {
"first_name": "Ada",
"last_name": "Lovelace"
}
},
"creator": {
"id": "user_2b9d71f0",
"first_name": "Ada",
"last_name": "Lovelace",
"email": "ada@example.com",
"profile_picture": null
}
},
"queue_position": null
}Authorizations
Path Parameters
ID of the session to retrieve.
Was this page helpful?
⌘I
