curl --request GET \
--url https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages/stream \
--header 'Authorization: Bearer <token>' \
--header 'X-API-KEY: <api-key>'import requests
url = "https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages/stream"
headers = {
"X-API-KEY": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-API-KEY': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages/stream', 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://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages/stream",
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>",
"X-API-KEY: <api-key>"
],
]);
$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://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages/stream"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
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://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages/stream")
.header("X-API-KEY", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages/stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}Stream Agent Checkout Messages
Server-sent events for one checkout: message.upsert carries a message, run.updated a run update, and each event’s id is the cursor to resume from. Resume with last-event-id or after; omit both to stream from the start.
The checkout is read before the stream opens, so an unknown or inaccessible one returns a normal error status. A stale resume cursor, or one from another checkout, closes the stream instead: re-read the message history and reconnect from the cursor it reports.
API scope required: agent-checkouts.read
curl --request GET \
--url https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages/stream \
--header 'Authorization: Bearer <token>' \
--header 'X-API-KEY: <api-key>'import requests
url = "https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages/stream"
headers = {
"X-API-KEY": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-API-KEY': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages/stream', 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://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages/stream",
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>",
"X-API-KEY: <api-key>"
],
]);
$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://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages/stream"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
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://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages/stream")
.header("X-API-KEY", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/unstable/agent-checkouts/{id}/messages/stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}{
"error": true,
"message": "<string>",
"code": "<string>",
"parameters": {}
}Authorizations
API key required for authentication
The end user's JWT, sent as Authorization: Bearer <JWT> together with a client-side API key. Validated against the project's external JWT configuration.
Headers
Server-side subject to act on behalf of. Ignored for client-side user auth.
Resume cursor from the last delivered event. Takes precedence over after.
Path Parameters
1Query Parameters
1Response
Invalid arguments. Make sure you are following the API specification.
true
Human-readable error message describing what went wrong
Machine-readable error code for programmatic handling
Values that explain a coded error, such as the limit that was exceeded, the amount that remains, or the list of supported currencies.
Show child attributes
Show child attributes
Was this page helpful?

