curl --request GET \
--url https://api.spreadjam.com/v1/actions/{actionId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spreadjam.com/v1/actions/{actionId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.spreadjam.com/v1/actions/{actionId}', 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.spreadjam.com/v1/actions/{actionId}",
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.spreadjam.com/v1/actions/{actionId}"
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.spreadjam.com/v1/actions/{actionId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spreadjam.com/v1/actions/{actionId}")
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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "page_edit",
"problem": "list_absent",
"title": "<string>",
"why": "<string>",
"impact": "high",
"rank": 123,
"targetUrl": "<string>",
"status": "suggested",
"opportunityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lastSeenAt": "2023-11-07T05:31:56Z",
"kindLabel": "<string>",
"source": "research",
"details": [
"<string>"
],
"sources": [
"<string>"
],
"questions": [
{
"promptId": "<string>",
"text": "<string>"
}
],
"history": [
{
"id": "<string>",
"type": "suggested",
"actor": "system",
"at": "2023-11-07T05:31:56Z",
"url": "<string>",
"evidence": "<string>",
"note": "<string>"
}
],
"check": {
"passed": true,
"evidence": "<string>",
"url": "<string>",
"at": "2023-11-07T05:31:56Z"
},
"agentPrompt": "<string>",
"change": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "preparing",
"repository": "<string>",
"baseBranch": "<string>",
"filePath": "<string>",
"createsFile": true,
"summary": "<string>",
"prUrl": "<string>",
"prNumber": 123,
"failureMessage": "<string>",
"fallback": "copy_prompt",
"hunks": [
{
"oldStart": 123,
"oldLines": 123,
"newStart": 123,
"newLines": 123,
"lines": [
{
"kind": "context",
"text": "<string>"
}
]
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"firstSeenAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}Read an action
Everything needed to do one action: its evidence (details, sources), the tracked prompts it should move (questions), the target page, its history and latest check, the code change Jam prepared for it (if any), and agentPrompt: executable instructions for your agent ending with how to report the work done.
curl --request GET \
--url https://api.spreadjam.com/v1/actions/{actionId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spreadjam.com/v1/actions/{actionId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.spreadjam.com/v1/actions/{actionId}', 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.spreadjam.com/v1/actions/{actionId}",
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.spreadjam.com/v1/actions/{actionId}"
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.spreadjam.com/v1/actions/{actionId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spreadjam.com/v1/actions/{actionId}")
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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "page_edit",
"problem": "list_absent",
"title": "<string>",
"why": "<string>",
"impact": "high",
"rank": 123,
"targetUrl": "<string>",
"status": "suggested",
"opportunityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lastSeenAt": "2023-11-07T05:31:56Z",
"kindLabel": "<string>",
"source": "research",
"details": [
"<string>"
],
"sources": [
"<string>"
],
"questions": [
{
"promptId": "<string>",
"text": "<string>"
}
],
"history": [
{
"id": "<string>",
"type": "suggested",
"actor": "system",
"at": "2023-11-07T05:31:56Z",
"url": "<string>",
"evidence": "<string>",
"note": "<string>"
}
],
"check": {
"passed": true,
"evidence": "<string>",
"url": "<string>",
"at": "2023-11-07T05:31:56Z"
},
"agentPrompt": "<string>",
"change": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "preparing",
"repository": "<string>",
"baseBranch": "<string>",
"filePath": "<string>",
"createsFile": true,
"summary": "<string>",
"prUrl": "<string>",
"prNumber": 123,
"failureMessage": "<string>",
"fallback": "copy_prompt",
"hunks": [
{
"oldStart": 123,
"oldLines": 123,
"newStart": 123,
"newLines": 123,
"lines": [
{
"kind": "context",
"text": "<string>"
}
]
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"firstSeenAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"docs": "<string>",
"resolveUrl": "<string>",
"details": [
{}
]
}Authorizations
Response
The action.
What the work is: new_page (publish a page; Jam can draft it), page_edit (change a page on your site; Jam can prepare the code change), technical (a technical fix on your site; Jam can prepare the code change), outreach (pitch a third-party list or page; your agent does it from agentPrompt), community (take part in a community thread; your agent does it).
page_edit, new_page, outreach, technical, community The action's status, derived from its history: suggested: Research recommends it and nobody has acted on it yet. in_progress: Someone started it (POST .../start), or Jam is doing it (a draft or a code change is being prepared). sent: Outreach only: the pitch went out (reported by the customer or their agent, never sent by Jam). Waiting for the third party to act. done: Reported done, or Jam shipped it. Jam checks the page once; until that check passes the action stays done. verified: Jam's check found the change on the page (or the brand on the list). unverified: Jam's check did not find the change on the page. Fix it and POST .../checks to check again, or POST .../completion with the right URL. dismissed: Taken off the Plan by the customer. DELETE .../dismissal puts it back. superseded: A later research run no longer proposes it (the gap closed or another action replaced it). Hidden from the list unless includeSuperseded=true.
suggested, in_progress, sent, done, verified, unverified, dismissed, superseded