List opportunities
curl --request GET \
--url https://api.spreadjam.com/v1/opportunities \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spreadjam.com/v1/opportunities"
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/opportunities', 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/opportunities",
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/opportunities"
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/opportunities")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spreadjam.com/v1/opportunities")
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{
"opportunities": [
{
"id": "<string>",
"projectId": "<string>",
"kind": "create_page",
"changeKind": "<string>",
"targetPageId": "<string>",
"title": "<string>",
"rationale": "<string>",
"topic": "<string>",
"persona": "<string>",
"intent": "<string>",
"score": 123,
"createdAt": "<string>",
"state": "planned",
"dismissedAt": "<string>",
"creationFailure": {
"code": "insufficient_credits",
"message": "<string>",
"at": "<string>"
},
"contentId": "<string>",
"claim": {
"kind": "pipeline",
"claimedAt": "<string>",
"expiresAt": "<string>"
}
}
],
"pageInfo": {
"limit": 100,
"hasNextPage": true,
"totalCount": 123,
"nextCursor": "<string>"
}
}{
"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": [
{}
]
}Opportunities
List opportunities
The active GEO project’s article opportunities with their states, highest score first. Opportunities are the article pipeline behind the Plan’s new_page actions (GET /v1/actions), not a second plan: an action that Jam drafts gets an opportunity, and the action carries its opportunityId. Work from actions; read an opportunity to write its article yourself from the brief. Paged: limit (default 100, at most 100) and cursor; pageInfo says whether more pages follow.
GET
/
v1
/
opportunities
List opportunities
curl --request GET \
--url https://api.spreadjam.com/v1/opportunities \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spreadjam.com/v1/opportunities"
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/opportunities', 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/opportunities",
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/opportunities"
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/opportunities")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spreadjam.com/v1/opportunities")
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{
"opportunities": [
{
"id": "<string>",
"projectId": "<string>",
"kind": "create_page",
"changeKind": "<string>",
"targetPageId": "<string>",
"title": "<string>",
"rationale": "<string>",
"topic": "<string>",
"persona": "<string>",
"intent": "<string>",
"score": 123,
"createdAt": "<string>",
"state": "planned",
"dismissedAt": "<string>",
"creationFailure": {
"code": "insufficient_credits",
"message": "<string>",
"at": "<string>"
},
"contentId": "<string>",
"claim": {
"kind": "pipeline",
"claimedAt": "<string>",
"expiresAt": "<string>"
}
}
],
"pageInfo": {
"limit": 100,
"hasNextPage": true,
"totalCount": 123,
"nextCursor": "<string>"
}
}{
"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
A workspace API key issued in Settings → Developer, sent as Bearer sk_….
Query Parameters
Only opportunities in these states.
Available options:
planned, dismissed, writing, claimed, creation_failed, open Maximum number of items to return (1–100).
Required range:
1 <= x <= 100Example:
20
The pageInfo.nextCursor of the previous page. Omit for the first page; send the same filters with it.
Required string length:
1 - 512