Forget Before a Moment
curl --request POST \
--url https://sonar.turtle.xyz/v1/organization/{organizationId}/data/forget \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"before": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://sonar.turtle.xyz/v1/organization/{organizationId}/data/forget"
payload = { "before": "2023-11-07T05:31:56Z" }
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({before: '2023-11-07T05:31:56Z'})
};
fetch('https://sonar.turtle.xyz/v1/organization/{organizationId}/data/forget', 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}/data/forget",
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([
'before' => '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://sonar.turtle.xyz/v1/organization/{organizationId}/data/forget"
payload := strings.NewReader("{\n \"before\": \"2023-11-07T05:31:56Z\"\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://sonar.turtle.xyz/v1/organization/{organizationId}/data/forget")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"before\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sonar.turtle.xyz/v1/organization/{organizationId}/data/forget")
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 \"before\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"counts": {}
}{
"code": 123,
"context": {},
"error": "<string>",
"status": "<string>"
}{
"code": 123,
"context": {},
"error": "<string>",
"status": "<string>"
}{
"code": 123,
"context": {},
"error": "<string>",
"status": "<string>"
}Data and retention
Forget Before a Moment
Deletes for good, with no change written about it, the events that happened before the moment, the changes and chat messages made before it, and the records deleted before it. Live records stay. No event from before it is read again. An owner or admin of the organization only, signed in or with their own API key. An organization’s API key acts as an agent, and is refused.
POST
/
organization
/
{organizationId}
/
data
/
forget
Forget Before a Moment
curl --request POST \
--url https://sonar.turtle.xyz/v1/organization/{organizationId}/data/forget \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"before": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://sonar.turtle.xyz/v1/organization/{organizationId}/data/forget"
payload = { "before": "2023-11-07T05:31:56Z" }
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({before: '2023-11-07T05:31:56Z'})
};
fetch('https://sonar.turtle.xyz/v1/organization/{organizationId}/data/forget', 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}/data/forget",
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([
'before' => '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://sonar.turtle.xyz/v1/organization/{organizationId}/data/forget"
payload := strings.NewReader("{\n \"before\": \"2023-11-07T05:31:56Z\"\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://sonar.turtle.xyz/v1/organization/{organizationId}/data/forget")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"before\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sonar.turtle.xyz/v1/organization/{organizationId}/data/forget")
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 \"before\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"counts": {}
}{
"code": 123,
"context": {},
"error": "<string>",
"status": "<string>"
}{
"code": 123,
"context": {},
"error": "<string>",
"status": "<string>"
}{
"code": 123,
"context": {},
"error": "<string>",
"status": "<string>"
}Authorizations
bearerAuthapiKeyAuth
Body
application/json

