Update Thread
curl --request PUT \
--url https://sonar.turtle.xyz/v1/organization/{organizationId}/threads/{threadId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"draft": true,
"evidence": [
{
"eventId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"messageId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"quotes": [
"<string>"
]
}
],
"rationale": "<string>",
"source": "ai",
"summary": "<string>",
"title": "<string>"
}
'import requests
url = "https://sonar.turtle.xyz/v1/organization/{organizationId}/threads/{threadId}"
payload = {
"draft": True,
"evidence": [
{
"eventId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"messageId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"quotes": ["<string>"]
}
],
"rationale": "<string>",
"source": "ai",
"summary": "<string>",
"title": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
draft: true,
evidence: [
{
eventId: '248df4b7-aa70-47b8-a036-33ac447e668d',
messageId: '248df4b7-aa70-47b8-a036-33ac447e668d',
quotes: ['<string>']
}
],
rationale: '<string>',
source: 'ai',
summary: '<string>',
title: '<string>'
})
};
fetch('https://sonar.turtle.xyz/v1/organization/{organizationId}/threads/{threadId}', 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://sonar.turtle.xyz/v1/organization/{organizationId}/threads/{threadId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'draft' => true,
'evidence' => [
[
'eventId' => '248df4b7-aa70-47b8-a036-33ac447e668d',
'messageId' => '248df4b7-aa70-47b8-a036-33ac447e668d',
'quotes' => [
'<string>'
]
]
],
'rationale' => '<string>',
'source' => 'ai',
'summary' => '<string>',
'title' => '<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://sonar.turtle.xyz/v1/organization/{organizationId}/threads/{threadId}"
payload := strings.NewReader("{\n \"draft\": true,\n \"evidence\": [\n {\n \"eventId\": \"248df4b7-aa70-47b8-a036-33ac447e668d\",\n \"messageId\": \"248df4b7-aa70-47b8-a036-33ac447e668d\",\n \"quotes\": [\n \"<string>\"\n ]\n }\n ],\n \"rationale\": \"<string>\",\n \"source\": \"ai\",\n \"summary\": \"<string>\",\n \"title\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://sonar.turtle.xyz/v1/organization/{organizationId}/threads/{threadId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"draft\": true,\n \"evidence\": [\n {\n \"eventId\": \"248df4b7-aa70-47b8-a036-33ac447e668d\",\n \"messageId\": \"248df4b7-aa70-47b8-a036-33ac447e668d\",\n \"quotes\": [\n \"<string>\"\n ]\n }\n ],\n \"rationale\": \"<string>\",\n \"source\": \"ai\",\n \"summary\": \"<string>\",\n \"title\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sonar.turtle.xyz/v1/organization/{organizationId}/threads/{threadId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"draft\": true,\n \"evidence\": [\n {\n \"eventId\": \"248df4b7-aa70-47b8-a036-33ac447e668d\",\n \"messageId\": \"248df4b7-aa70-47b8-a036-33ac447e668d\",\n \"quotes\": [\n \"<string>\"\n ]\n }\n ],\n \"rationale\": \"<string>\",\n \"source\": \"ai\",\n \"summary\": \"<string>\",\n \"title\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"applied": true,
"budgets": [
{
"budget": 123,
"chars": 123,
"field": "<string>"
}
],
"draft": {
"allowance": "<string>",
"allowedBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"allower": {
"name": "<string>"
},
"amended": [
"<string>"
],
"causedBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"changedAt": "2023-11-07T05:31:56Z",
"changes": {},
"createdAt": "2023-11-07T05:31:56Z",
"decidedAt": "2023-11-07T05:31:56Z",
"decidedBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"decider": {
"name": "<string>"
},
"entity": {
"name": "<string>"
},
"entityId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"entityType": "<string>",
"evidence": [
{
"eventId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"messageId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"quotes": [
"<string>"
],
"sealed": "<string>",
"stance": "<string>"
}
],
"heldByAgent": true,
"id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"mine": true,
"op": "<string>",
"owner": {
"id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"name": "<string>"
},
"proposal": {},
"rationale": "<string>",
"reason": "<string>",
"refs": {},
"related": {
"name": "<string>"
},
"relatedId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"revertedBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"reverts": "248df4b7-aa70-47b8-a036-33ac447e668d",
"rule": {
"name": "<string>"
},
"ruleId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"source": "<string>",
"status": "<string>",
"supersededBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"user": {
"name": "<string>"
},
"userId": "248df4b7-aa70-47b8-a036-33ac447e668d"
},
"entityId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"migrated": 123,
"mutation": {
"allowance": "<string>",
"allowedBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"allower": {
"name": "<string>"
},
"amended": [
"<string>"
],
"causedBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"changedAt": "2023-11-07T05:31:56Z",
"changes": {},
"createdAt": "2023-11-07T05:31:56Z",
"decidedAt": "2023-11-07T05:31:56Z",
"decidedBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"decider": {
"name": "<string>"
},
"entity": {
"name": "<string>"
},
"entityId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"entityType": "<string>",
"evidence": [
{
"eventId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"messageId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"quotes": [
"<string>"
],
"sealed": "<string>",
"stance": "<string>"
}
],
"heldByAgent": true,
"id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"mine": true,
"op": "<string>",
"owner": {
"id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"name": "<string>"
},
"proposal": {},
"rationale": "<string>",
"reason": "<string>",
"refs": {},
"related": {
"name": "<string>"
},
"relatedId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"revertedBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"reverts": "248df4b7-aa70-47b8-a036-33ac447e668d",
"rule": {
"name": "<string>"
},
"ruleId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"source": "<string>",
"status": "<string>",
"supersededBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"user": {
"name": "<string>"
},
"userId": "248df4b7-aa70-47b8-a036-33ac447e668d"
}
}{
"code": 123,
"context": {},
"error": "<string>",
"status": "<string>"
}{
"code": 123,
"context": {},
"error": "<string>",
"status": "<string>"
}{
"code": 123,
"context": {},
"error": "<string>",
"status": "<string>"
}Threads (storylines)
Update Thread
Retitles the storyline or rewrites its summary. The events cited (stance supports) join the thread, and those cited with stance retracts leave it; a write that changes neither field is a no-op and cites nothing. A thread has no status: one that is over is one nobody adds to.
PUT
/
organization
/
{organizationId}
/
threads
/
{threadId}
Update Thread
curl --request PUT \
--url https://sonar.turtle.xyz/v1/organization/{organizationId}/threads/{threadId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"draft": true,
"evidence": [
{
"eventId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"messageId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"quotes": [
"<string>"
]
}
],
"rationale": "<string>",
"source": "ai",
"summary": "<string>",
"title": "<string>"
}
'import requests
url = "https://sonar.turtle.xyz/v1/organization/{organizationId}/threads/{threadId}"
payload = {
"draft": True,
"evidence": [
{
"eventId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"messageId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"quotes": ["<string>"]
}
],
"rationale": "<string>",
"source": "ai",
"summary": "<string>",
"title": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
draft: true,
evidence: [
{
eventId: '248df4b7-aa70-47b8-a036-33ac447e668d',
messageId: '248df4b7-aa70-47b8-a036-33ac447e668d',
quotes: ['<string>']
}
],
rationale: '<string>',
source: 'ai',
summary: '<string>',
title: '<string>'
})
};
fetch('https://sonar.turtle.xyz/v1/organization/{organizationId}/threads/{threadId}', 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://sonar.turtle.xyz/v1/organization/{organizationId}/threads/{threadId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'draft' => true,
'evidence' => [
[
'eventId' => '248df4b7-aa70-47b8-a036-33ac447e668d',
'messageId' => '248df4b7-aa70-47b8-a036-33ac447e668d',
'quotes' => [
'<string>'
]
]
],
'rationale' => '<string>',
'source' => 'ai',
'summary' => '<string>',
'title' => '<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://sonar.turtle.xyz/v1/organization/{organizationId}/threads/{threadId}"
payload := strings.NewReader("{\n \"draft\": true,\n \"evidence\": [\n {\n \"eventId\": \"248df4b7-aa70-47b8-a036-33ac447e668d\",\n \"messageId\": \"248df4b7-aa70-47b8-a036-33ac447e668d\",\n \"quotes\": [\n \"<string>\"\n ]\n }\n ],\n \"rationale\": \"<string>\",\n \"source\": \"ai\",\n \"summary\": \"<string>\",\n \"title\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://sonar.turtle.xyz/v1/organization/{organizationId}/threads/{threadId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"draft\": true,\n \"evidence\": [\n {\n \"eventId\": \"248df4b7-aa70-47b8-a036-33ac447e668d\",\n \"messageId\": \"248df4b7-aa70-47b8-a036-33ac447e668d\",\n \"quotes\": [\n \"<string>\"\n ]\n }\n ],\n \"rationale\": \"<string>\",\n \"source\": \"ai\",\n \"summary\": \"<string>\",\n \"title\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sonar.turtle.xyz/v1/organization/{organizationId}/threads/{threadId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"draft\": true,\n \"evidence\": [\n {\n \"eventId\": \"248df4b7-aa70-47b8-a036-33ac447e668d\",\n \"messageId\": \"248df4b7-aa70-47b8-a036-33ac447e668d\",\n \"quotes\": [\n \"<string>\"\n ]\n }\n ],\n \"rationale\": \"<string>\",\n \"source\": \"ai\",\n \"summary\": \"<string>\",\n \"title\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"applied": true,
"budgets": [
{
"budget": 123,
"chars": 123,
"field": "<string>"
}
],
"draft": {
"allowance": "<string>",
"allowedBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"allower": {
"name": "<string>"
},
"amended": [
"<string>"
],
"causedBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"changedAt": "2023-11-07T05:31:56Z",
"changes": {},
"createdAt": "2023-11-07T05:31:56Z",
"decidedAt": "2023-11-07T05:31:56Z",
"decidedBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"decider": {
"name": "<string>"
},
"entity": {
"name": "<string>"
},
"entityId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"entityType": "<string>",
"evidence": [
{
"eventId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"messageId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"quotes": [
"<string>"
],
"sealed": "<string>",
"stance": "<string>"
}
],
"heldByAgent": true,
"id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"mine": true,
"op": "<string>",
"owner": {
"id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"name": "<string>"
},
"proposal": {},
"rationale": "<string>",
"reason": "<string>",
"refs": {},
"related": {
"name": "<string>"
},
"relatedId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"revertedBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"reverts": "248df4b7-aa70-47b8-a036-33ac447e668d",
"rule": {
"name": "<string>"
},
"ruleId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"source": "<string>",
"status": "<string>",
"supersededBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"user": {
"name": "<string>"
},
"userId": "248df4b7-aa70-47b8-a036-33ac447e668d"
},
"entityId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"migrated": 123,
"mutation": {
"allowance": "<string>",
"allowedBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"allower": {
"name": "<string>"
},
"amended": [
"<string>"
],
"causedBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"changedAt": "2023-11-07T05:31:56Z",
"changes": {},
"createdAt": "2023-11-07T05:31:56Z",
"decidedAt": "2023-11-07T05:31:56Z",
"decidedBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"decider": {
"name": "<string>"
},
"entity": {
"name": "<string>"
},
"entityId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"entityType": "<string>",
"evidence": [
{
"eventId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"messageId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"quotes": [
"<string>"
],
"sealed": "<string>",
"stance": "<string>"
}
],
"heldByAgent": true,
"id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"mine": true,
"op": "<string>",
"owner": {
"id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"name": "<string>"
},
"proposal": {},
"rationale": "<string>",
"reason": "<string>",
"refs": {},
"related": {
"name": "<string>"
},
"relatedId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"revertedBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"reverts": "248df4b7-aa70-47b8-a036-33ac447e668d",
"rule": {
"name": "<string>"
},
"ruleId": "248df4b7-aa70-47b8-a036-33ac447e668d",
"source": "<string>",
"status": "<string>",
"supersededBy": "248df4b7-aa70-47b8-a036-33ac447e668d",
"user": {
"name": "<string>"
},
"userId": "248df4b7-aa70-47b8-a036-33ac447e668d"
}
}{
"code": 123,
"context": {},
"error": "<string>",
"status": "<string>"
}{
"code": 123,
"context": {},
"error": "<string>",
"status": "<string>"
}{
"code": 123,
"context": {},
"error": "<string>",
"status": "<string>"
}Authorizations
bearerAuthapiKeyAuth
Path Parameters
Body
application/json
Response
OK

