curl --request POST \
--url https://app.harmonica.chat/api/v1/sessions/{id}/scratchpad \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"mode": "seed"
}'import requests
url = "https://app.harmonica.chat/api/v1/sessions/{id}/scratchpad"
payload = { "mode": "seed" }
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({mode: 'seed'})
};
fetch('https://app.harmonica.chat/api/v1/sessions/{id}/scratchpad', 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://app.harmonica.chat/api/v1/sessions/{id}/scratchpad",
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([
'mode' => 'seed'
]),
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://app.harmonica.chat/api/v1/sessions/{id}/scratchpad"
payload := strings.NewReader("{\n \"mode\": \"seed\"\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://app.harmonica.chat/api/v1/sessions/{id}/scratchpad")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"seed\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.harmonica.chat/api/v1/sessions/{id}/scratchpad")
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 \"mode\": \"seed\"\n}"
response = http.request(request)
puts response.read_body{
"status": "completed",
"themes": 123,
"participants": 123,
"batches_processed": 123,
"batches_total": 123
}{
"error": {
"code": "validation_error",
"message": "Cross-pollination is not enabled for this session"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key"
}
}{
"error": {
"code": "forbidden",
"message": "You don't have access to this session"
}
}{
"error": {
"code": "not_found",
"message": "Session not found"
}
}Seed or update scratchpad
Trigger cross-pollination scratchpad seeding or update for a session. The scratchpad tracks themes, emerging consensus, open tensions, and well-covered questions across all participant conversations.
Modes:
seed(default): Process all user messages from scratch. Resumes from existing progress if the session was partially seeded.update: Process only new messages since the last update.status: Return current scratchpad state without processing.
Cross-pollination must be enabled on the session. Requires editor role.
For large sessions, seeding may take multiple calls (up to 5 minutes per call). Each batch is persisted to the database, so partial progress survives timeouts. Re-call the endpoint to continue.
curl --request POST \
--url https://app.harmonica.chat/api/v1/sessions/{id}/scratchpad \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"mode": "seed"
}'import requests
url = "https://app.harmonica.chat/api/v1/sessions/{id}/scratchpad"
payload = { "mode": "seed" }
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({mode: 'seed'})
};
fetch('https://app.harmonica.chat/api/v1/sessions/{id}/scratchpad', 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://app.harmonica.chat/api/v1/sessions/{id}/scratchpad",
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([
'mode' => 'seed'
]),
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://app.harmonica.chat/api/v1/sessions/{id}/scratchpad"
payload := strings.NewReader("{\n \"mode\": \"seed\"\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://app.harmonica.chat/api/v1/sessions/{id}/scratchpad")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"seed\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.harmonica.chat/api/v1/sessions/{id}/scratchpad")
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 \"mode\": \"seed\"\n}"
response = http.request(request)
puts response.read_body{
"status": "completed",
"themes": 123,
"participants": 123,
"batches_processed": 123,
"batches_total": 123
}{
"error": {
"code": "validation_error",
"message": "Cross-pollination is not enabled for this session"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key"
}
}{
"error": {
"code": "forbidden",
"message": "You don't have access to this session"
}
}{
"error": {
"code": "not_found",
"message": "Session not found"
}
}Authorizations
API key authentication. Pass your key as a Bearer token.
Keys use the format hm_live_<32 hex chars>.
Generate keys from your Harmonica dashboard settings.
Path Parameters
Session ID
Body
Processing mode
seed, update, status Response
Scratchpad result
completed — all messages processed.
partial — timed out, call again to continue.
no_data — no user messages in session.
exists/empty — status mode response.
completed, partial, no_data, exists, empty Number of themes identified
Number of participants tracked
Batches completed in this call
Total batches needed for remaining messages