List replayable sandbox events
curl --request GET \
--url https://sparkles.dev/api/public/v1/sandboxes/{sandboxId}/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://sparkles.dev/api/public/v1/sandboxes/{sandboxId}/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sparkles.dev/api/public/v1/sandboxes/{sandboxId}/events', 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://sparkles.dev/api/public/v1/sandboxes/{sandboxId}/events",
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://sparkles.dev/api/public/v1/sandboxes/{sandboxId}/events"
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://sparkles.dev/api/public/v1/sandboxes/{sandboxId}/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sparkles.dev/api/public/v1/sandboxes/{sandboxId}/events")
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{
"data": [
{
"object": "sandbox.event",
"version": "v1",
"ts": "<string>",
"sandbox_id": "<string>",
"type": "snapshot",
"data": {
"sandbox": {
"id": "<string>",
"worktreeId": "<string>",
"object": "sandbox",
"status": "queued",
"title": "<string>",
"repos": [
{
"fullName": "<string>",
"ref": "<string>"
}
],
"model": "<string>",
"agentRuntime": "opencode",
"turn": {
"active": true
},
"usage": {
"llmRequestCount": 4503599627370495,
"costMicroUsd": 4503599627370495,
"creditsChargedMicros": 4503599627370495
},
"metadata": {},
"error": "<string>",
"createdAt": "<string>",
"startedAt": "<string>",
"completedAt": "<string>",
"links": {
"self": "<string>",
"events": "<string>",
"messages": "<string>"
}
},
"turn": {
"id": "<string>",
"state": "pending"
},
"resume_cursor": "<string>"
},
"turn_id": "<string>"
}
],
"nextCursor": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}List replayable sandbox events
Returns curated durable conversation events after the supplied sequence cursor. Use this endpoint to recover gaps before resuming the live stream.
GET
/
api
/
public
/
v1
/
sandboxes
/
{sandboxId}
/
events
List replayable sandbox events
curl --request GET \
--url https://sparkles.dev/api/public/v1/sandboxes/{sandboxId}/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://sparkles.dev/api/public/v1/sandboxes/{sandboxId}/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sparkles.dev/api/public/v1/sandboxes/{sandboxId}/events', 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://sparkles.dev/api/public/v1/sandboxes/{sandboxId}/events",
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://sparkles.dev/api/public/v1/sandboxes/{sandboxId}/events"
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://sparkles.dev/api/public/v1/sandboxes/{sandboxId}/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sparkles.dev/api/public/v1/sandboxes/{sandboxId}/events")
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{
"data": [
{
"object": "sandbox.event",
"version": "v1",
"ts": "<string>",
"sandbox_id": "<string>",
"type": "snapshot",
"data": {
"sandbox": {
"id": "<string>",
"worktreeId": "<string>",
"object": "sandbox",
"status": "queued",
"title": "<string>",
"repos": [
{
"fullName": "<string>",
"ref": "<string>"
}
],
"model": "<string>",
"agentRuntime": "opencode",
"turn": {
"active": true
},
"usage": {
"llmRequestCount": 4503599627370495,
"costMicroUsd": 4503599627370495,
"creditsChargedMicros": 4503599627370495
},
"metadata": {},
"error": "<string>",
"createdAt": "<string>",
"startedAt": "<string>",
"completedAt": "<string>",
"links": {
"self": "<string>",
"events": "<string>",
"messages": "<string>"
}
},
"turn": {
"id": "<string>",
"state": "pending"
},
"resume_cursor": "<string>"
},
"turn_id": "<string>"
}
],
"nextCursor": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Long-lived opaque API key minted by an approved user at /api. The secret is shown once, stored only as a SHA-256 digest, and disabled immediately when either the key or its API access grant is revoked.
Path Parameters
Pattern:
^c_[a-z2-9]{12}$Query Parameters
Required range:
0 <= x <= 9007199254740991Required range:
1 <= x <= 100