Schedule the erasure of this organization and everything in it
curl --request POST \
--url https://app.trustivan.com/api/v1/orgs/current/deletion \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"confirm_name": "<string>"
}
'import requests
url = "https://app.trustivan.com/api/v1/orgs/current/deletion"
payload = { "confirm_name": "<string>" }
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({confirm_name: '<string>'})
};
fetch('https://app.trustivan.com/api/v1/orgs/current/deletion', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/orgs/current/deletion"
payload := strings.NewReader("{\n \"confirm_name\": \"<string>\"\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))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Schedule the erasure of this organization
Requires organization:delete: owner only, and not grantable to
an API key. An admin who could reach this could end the organization
that appointed them; a leaked CI credential that could reach it would
turn a key rotation into a recovery exercise with nothing to recover.
Three further guards, each refusing something a role cannot express:
- The caller’s personal organization is refused at every role. It is where an account acts when it has nowhere else, and deleting it would leave an account that can sign in and then act nowhere.
confirm_namemust be the organization’s name, typed back exactly. Case-sensitive, deliberately: the point of typing it is to make the person read what they are about to destroy.- Nothing is erased by this request. It writes a deadline seven days out; a job carries it out after that, and any owner may cancel until then.
Recorded as organization.deletion_requested in the tenant’s audit
trail, and, when the erasure completes, as a platform-level record
that outlives the tenant.
Take a copy of the data first: /orgs/current/export.
POST
/
orgs
/
current
/
deletion
Schedule the erasure of this organization and everything in it
curl --request POST \
--url https://app.trustivan.com/api/v1/orgs/current/deletion \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"confirm_name": "<string>"
}
'import requests
url = "https://app.trustivan.com/api/v1/orgs/current/deletion"
payload = { "confirm_name": "<string>" }
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({confirm_name: '<string>'})
};
fetch('https://app.trustivan.com/api/v1/orgs/current/deletion', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/orgs/current/deletion"
payload := strings.NewReader("{\n \"confirm_name\": \"<string>\"\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))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Authorizations
Response
Scheduled. The body carries the effective date.