curl --request PUT \
--url https://api.quiva.ai/hub/coworker/corrections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"corrections": [
{
"id": "c_2f5a1e14-9a2b-4f0e-8f3a-1d2c3b4a5e6f",
"situation": "when I ask for a quote",
"instead": "check the schedule before pricing",
"created_at": "2023-11-07T05:31:56Z"
}
]
}
'import requests
url = "https://api.quiva.ai/hub/coworker/corrections"
payload = { "corrections": [
{
"id": "c_2f5a1e14-9a2b-4f0e-8f3a-1d2c3b4a5e6f",
"situation": "when I ask for a quote",
"instead": "check the schedule before pricing",
"created_at": "2023-11-07T05:31:56Z"
}
] }
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({
corrections: [
{
id: 'c_2f5a1e14-9a2b-4f0e-8f3a-1d2c3b4a5e6f',
situation: 'when I ask for a quote',
instead: 'check the schedule before pricing',
created_at: '2023-11-07T05:31:56Z'
}
]
})
};
fetch('https://api.quiva.ai/hub/coworker/corrections', 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.quiva.ai/hub/coworker/corrections",
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([
'corrections' => [
[
'id' => 'c_2f5a1e14-9a2b-4f0e-8f3a-1d2c3b4a5e6f',
'situation' => 'when I ask for a quote',
'instead' => 'check the schedule before pricing',
'created_at' => '2023-11-07T05:31:56Z'
]
]
]),
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://api.quiva.ai/hub/coworker/corrections"
payload := strings.NewReader("{\n \"corrections\": [\n {\n \"id\": \"c_2f5a1e14-9a2b-4f0e-8f3a-1d2c3b4a5e6f\",\n \"situation\": \"when I ask for a quote\",\n \"instead\": \"check the schedule before pricing\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\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://api.quiva.ai/hub/coworker/corrections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"corrections\": [\n {\n \"id\": \"c_2f5a1e14-9a2b-4f0e-8f3a-1d2c3b4a5e6f\",\n \"situation\": \"when I ask for a quote\",\n \"instead\": \"check the schedule before pricing\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quiva.ai/hub/coworker/corrections")
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 \"corrections\": [\n {\n \"id\": \"c_2f5a1e14-9a2b-4f0e-8f3a-1d2c3b4a5e6f\",\n \"situation\": \"when I ask for a quote\",\n \"instead\": \"check the schedule before pricing\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"corrections": [
{
"id": "c_2f5a1e14-9a2b-4f0e-8f3a-1d2c3b4a5e6f",
"situation": "when I ask for a quote",
"instead": "check the schedule before pricing",
"source": "analyser",
"created_at": "2023-11-07T05:31:56Z"
}
],
"max_entries": 6
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Replace your own corrections list
Writes the caller’s own list and nothing else — the storage subject is derived from the bearer token, so no body field can redirect the write at another person. There is no role gate: these are rules about this person’s own work.
The body carries the whole list as the panel holds it, so this is the edit and remove path. corrections is required — an omitted key is a 400, never a silent clear of every rule in force. id, source and created_at are stamped where the caller leaves them blank; [] clears the list and removes the key entirely.
situation is capped at 150 characters and instead at 200, counted in runes, and at most 6 entries may be in force. A cap is refused by name at the write, never truncated, and a full list is refused, never evicted — silently dropping the oldest would leave someone believing a rule is in force that is not.
The write is a compare-and-swap: the document is also written by the approve endpoint, so a list composed against a version that has since moved answers 409 and the panel reloads. A failed mesh write is 502, never 400. Subject: microstrate.hub.put.coworker-corrections.
curl --request PUT \
--url https://api.quiva.ai/hub/coworker/corrections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"corrections": [
{
"id": "c_2f5a1e14-9a2b-4f0e-8f3a-1d2c3b4a5e6f",
"situation": "when I ask for a quote",
"instead": "check the schedule before pricing",
"created_at": "2023-11-07T05:31:56Z"
}
]
}
'import requests
url = "https://api.quiva.ai/hub/coworker/corrections"
payload = { "corrections": [
{
"id": "c_2f5a1e14-9a2b-4f0e-8f3a-1d2c3b4a5e6f",
"situation": "when I ask for a quote",
"instead": "check the schedule before pricing",
"created_at": "2023-11-07T05:31:56Z"
}
] }
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({
corrections: [
{
id: 'c_2f5a1e14-9a2b-4f0e-8f3a-1d2c3b4a5e6f',
situation: 'when I ask for a quote',
instead: 'check the schedule before pricing',
created_at: '2023-11-07T05:31:56Z'
}
]
})
};
fetch('https://api.quiva.ai/hub/coworker/corrections', 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.quiva.ai/hub/coworker/corrections",
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([
'corrections' => [
[
'id' => 'c_2f5a1e14-9a2b-4f0e-8f3a-1d2c3b4a5e6f',
'situation' => 'when I ask for a quote',
'instead' => 'check the schedule before pricing',
'created_at' => '2023-11-07T05:31:56Z'
]
]
]),
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://api.quiva.ai/hub/coworker/corrections"
payload := strings.NewReader("{\n \"corrections\": [\n {\n \"id\": \"c_2f5a1e14-9a2b-4f0e-8f3a-1d2c3b4a5e6f\",\n \"situation\": \"when I ask for a quote\",\n \"instead\": \"check the schedule before pricing\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\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://api.quiva.ai/hub/coworker/corrections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"corrections\": [\n {\n \"id\": \"c_2f5a1e14-9a2b-4f0e-8f3a-1d2c3b4a5e6f\",\n \"situation\": \"when I ask for a quote\",\n \"instead\": \"check the schedule before pricing\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quiva.ai/hub/coworker/corrections")
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 \"corrections\": [\n {\n \"id\": \"c_2f5a1e14-9a2b-4f0e-8f3a-1d2c3b4a5e6f\",\n \"situation\": \"when I ask for a quote\",\n \"instead\": \"check the schedule before pricing\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"corrections": [
{
"id": "c_2f5a1e14-9a2b-4f0e-8f3a-1d2c3b4a5e6f",
"situation": "when I ask for a quote",
"instead": "check the schedule before pricing",
"source": "analyser",
"created_at": "2023-11-07T05:31:56Z"
}
],
"max_entries": 6
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}