cURL
curl -X POST 'https://api.gumloop.com/api/v1/sessions/sess_xYz789AbCd/queue' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"input": "Also check their latest funding round."}'import requests
url = "https://api.gumloop.com/api/v1/sessions/{session_id}/queue"
payload = { "input": "Also check their latest funding round." }
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({input: 'Also check their latest funding round.'})
};
fetch('https://api.gumloop.com/api/v1/sessions/{session_id}/queue', 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}/queue",
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([
'input' => 'Also check their latest funding round.'
]),
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.gumloop.com/api/v1/sessions/{session_id}/queue"
payload := strings.NewReader("{\n \"input\": \"Also check their latest funding round.\"\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.gumloop.com/api/v1/sessions/{session_id}/queue")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": \"Also check their latest funding round.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gumloop.com/api/v1/sessions/{session_id}/queue")
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 \"input\": \"Also check their latest funding round.\"\n}"
response = http.request(request)
puts response.read_body{
"queued_message": {
"id": "qmsg_1a2b3c",
"input": "Also check their latest funding round.",
"state": "queued",
"position": 1,
"created_at": "2026-05-15T14:36:00Z",
"updated_at": "2026-05-15T14:36:00Z"
},
"queue": []
}Queue message
Add a message to a session’s queue instead of interrupting the agent. Queued messages are sent automatically, in order, when the agent finishes its current turn. A session’s queue holds at most 20 messages.
To interrupt the current turn and send a queued message immediately, use Send queued message now.
POST
/
sessions
/
{session_id}
/
queue
cURL
curl -X POST 'https://api.gumloop.com/api/v1/sessions/sess_xYz789AbCd/queue' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"input": "Also check their latest funding round."}'import requests
url = "https://api.gumloop.com/api/v1/sessions/{session_id}/queue"
payload = { "input": "Also check their latest funding round." }
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({input: 'Also check their latest funding round.'})
};
fetch('https://api.gumloop.com/api/v1/sessions/{session_id}/queue', 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}/queue",
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([
'input' => 'Also check their latest funding round.'
]),
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.gumloop.com/api/v1/sessions/{session_id}/queue"
payload := strings.NewReader("{\n \"input\": \"Also check their latest funding round.\"\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.gumloop.com/api/v1/sessions/{session_id}/queue")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": \"Also check their latest funding round.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gumloop.com/api/v1/sessions/{session_id}/queue")
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 \"input\": \"Also check their latest funding round.\"\n}"
response = http.request(request)
puts response.read_body{
"queued_message": {
"id": "qmsg_1a2b3c",
"input": "Also check their latest funding round.",
"state": "queued",
"position": 1,
"created_at": "2026-05-15T14:36:00Z",
"updated_at": "2026-05-15T14:36:00Z"
},
"queue": []
}Authorizations
Path Parameters
ID of the session to queue the message on.
Body
application/json
The message to queue. Cannot be empty. Also accepted as message for backwards compatibility.
Example:
"Also check their latest funding round."
Was this page helpful?
⌘I
