Update session
curl --request PATCH \
--url https://app.harmonica.chat/api/v1/sessions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"topic": "<string>",
"goal": "<string>",
"context": "<string>",
"critical": "<string>",
"prompt": "<string>",
"project_id": "<string>"
}
'import requests
url = "https://app.harmonica.chat/api/v1/sessions/{id}"
payload = {
"topic": "<string>",
"goal": "<string>",
"context": "<string>",
"critical": "<string>",
"prompt": "<string>",
"project_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
topic: '<string>',
goal: '<string>',
context: '<string>',
critical: '<string>',
prompt: '<string>',
project_id: '<string>'
})
};
fetch('https://app.harmonica.chat/api/v1/sessions/{id}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'topic' => '<string>',
'goal' => '<string>',
'context' => '<string>',
'critical' => '<string>',
'prompt' => '<string>',
'project_id' => '<string>'
]),
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}"
payload := strings.NewReader("{\n \"topic\": \"<string>\",\n \"goal\": \"<string>\",\n \"context\": \"<string>\",\n \"critical\": \"<string>\",\n \"prompt\": \"<string>\",\n \"project_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.harmonica.chat/api/v1/sessions/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"topic\": \"<string>\",\n \"goal\": \"<string>\",\n \"context\": \"<string>\",\n \"critical\": \"<string>\",\n \"prompt\": \"<string>\",\n \"project_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.harmonica.chat/api/v1/sessions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"topic\": \"<string>\",\n \"goal\": \"<string>\",\n \"context\": \"<string>\",\n \"critical\": \"<string>\",\n \"prompt\": \"<string>\",\n \"project_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"topic": "<string>",
"goal": "<string>",
"participant_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"critical": "<string>",
"context": "<string>",
"prompt": "<string>",
"summary": "<string>",
"session_md": "<string>"
}{
"error": {
"code": "validation_error",
"message": "No valid fields provided. Allowed fields: topic, goal, context, critical, prompt, project_id"
}
}{
"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"
}
}Endpoints
Update session
Update session metadata. At least one field must be provided. Requires editor role or higher on the session.
PATCH
/
sessions
/
{id}
Update session
curl --request PATCH \
--url https://app.harmonica.chat/api/v1/sessions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"topic": "<string>",
"goal": "<string>",
"context": "<string>",
"critical": "<string>",
"prompt": "<string>",
"project_id": "<string>"
}
'import requests
url = "https://app.harmonica.chat/api/v1/sessions/{id}"
payload = {
"topic": "<string>",
"goal": "<string>",
"context": "<string>",
"critical": "<string>",
"prompt": "<string>",
"project_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
topic: '<string>',
goal: '<string>',
context: '<string>',
critical: '<string>',
prompt: '<string>',
project_id: '<string>'
})
};
fetch('https://app.harmonica.chat/api/v1/sessions/{id}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'topic' => '<string>',
'goal' => '<string>',
'context' => '<string>',
'critical' => '<string>',
'prompt' => '<string>',
'project_id' => '<string>'
]),
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}"
payload := strings.NewReader("{\n \"topic\": \"<string>\",\n \"goal\": \"<string>\",\n \"context\": \"<string>\",\n \"critical\": \"<string>\",\n \"prompt\": \"<string>\",\n \"project_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.harmonica.chat/api/v1/sessions/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"topic\": \"<string>\",\n \"goal\": \"<string>\",\n \"context\": \"<string>\",\n \"critical\": \"<string>\",\n \"prompt\": \"<string>\",\n \"project_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.harmonica.chat/api/v1/sessions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"topic\": \"<string>\",\n \"goal\": \"<string>\",\n \"context\": \"<string>\",\n \"critical\": \"<string>\",\n \"prompt\": \"<string>\",\n \"project_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"topic": "<string>",
"goal": "<string>",
"participant_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"critical": "<string>",
"context": "<string>",
"prompt": "<string>",
"summary": "<string>",
"session_md": "<string>"
}{
"error": {
"code": "validation_error",
"message": "No valid fields provided. Allowed fields: topic, goal, context, critical, prompt, project_id"
}
}{
"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
application/json
Response
Updated session
Available options:
active, completed Custom facilitation prompt for the session's AI facilitator
Structured SESSION.md brief (auto-generated after summary)
⌘I