Admin
Decommission the current organization account
Requires explicit access_delete_account permission unless the caller has the platform lifecycle capability. Immediately closes the workspace, disables administrator access, revokes credentials and cancels active subscriptions; durable archival is queued separately. Repeating a decommission returns the existing snapshot and already_decommissioned true. This route always targets the caller organization. Platform administrator membership safety can prevent closure with 409.
POST
/
admin
/
account
/
decommission
Decommission the current organization account
curl --request POST \
--url https://api.gratona.com/v1/admin/account/decommission \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"confirmation_text": "DELETE",
"reason": "<string>"
}
'import requests
url = "https://api.gratona.com/v1/admin/account/decommission"
payload = {
"confirmation_text": "DELETE",
"reason": "<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({confirmation_text: 'DELETE', reason: '<string>'})
};
fetch('https://api.gratona.com/v1/admin/account/decommission', 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.gratona.com/v1/admin/account/decommission",
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([
'confirmation_text' => 'DELETE',
'reason' => '<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://api.gratona.com/v1/admin/account/decommission"
payload := strings.NewReader("{\n \"confirmation_text\": \"DELETE\",\n \"reason\": \"<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))
}HttpResponse<String> response = Unirest.post("https://api.gratona.com/v1/admin/account/decommission")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"confirmation_text\": \"DELETE\",\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/account/decommission")
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 \"confirmation_text\": \"DELETE\",\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"client_id": 123,
"already_decommissioned": true,
"snapshot_id": 123,
"archive_status": "<string>",
"restore_status": "<string>",
"snapshot": {
"client": {
"id": 123,
"organization": "<string>",
"email": "<string>",
"status": "<string>",
"custom_pricing_enabled": true,
"custom_pricing_frequency": 123,
"custom_pricing_amount": 123,
"credits": 123,
"discount_percentage": 123,
"archived": true,
"is_decommissioned": true
},
"counts": {
"donors_active": 123,
"donors_archived": 123,
"donors_total": 123,
"recipients_active": 123,
"recipients_archived": 123,
"recipients_total": 123,
"sponsorships_active": 123,
"sponsorships_archived": 123,
"sponsorships_total": 123,
"commitments_active": 123,
"commitments_archived": 123,
"commitments_total": 123,
"programs_active": 123,
"programs_archived": 123,
"programs_total": 123,
"users_active": 123,
"users_archived": 123,
"users_total": 123,
"donations_total_count": 123
},
"financials": {
"donations_total_amount": 123,
"client_payments_total_count": 123,
"client_payments_total_amount": 123,
"last_client_payment_at": "2023-11-07T05:31:56Z"
},
"archival_manifest": {
"strategy": "deleted_at_marker_v1",
"archive_marker": "<string>",
"user_ids": [
123
]
},
"captured_at": "2023-11-07T05:31:56Z"
},
"deletion_snapshot": {
"id": 123,
"client_id": 123,
"requested_by_user_id": 123,
"restored_by_user_id": 123,
"reason": "<string>",
"snapshot_version": 123,
"archive_status": "<string>",
"archive_started_at": "2023-11-07T05:31:56Z",
"archive_completed_at": "2023-11-07T05:31:56Z",
"archive_error": "<string>",
"restore_status": "<string>",
"restore_started_at": "2023-11-07T05:31:56Z",
"restore_completed_at": "2023-11-07T05:31:56Z",
"restore_error": "<string>",
"requested_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"snapshot_data": {
"client": {
"id": 123,
"organization": "<string>",
"email": "<string>",
"status": "<string>",
"custom_pricing_enabled": true,
"custom_pricing_frequency": 123,
"custom_pricing_amount": 123,
"credits": 123,
"discount_percentage": 123,
"archived": true,
"is_decommissioned": true
},
"counts": {
"donors_active": 123,
"donors_archived": 123,
"donors_total": 123,
"recipients_active": 123,
"recipients_archived": 123,
"recipients_total": 123,
"sponsorships_active": 123,
"sponsorships_archived": 123,
"sponsorships_total": 123,
"commitments_active": 123,
"commitments_archived": 123,
"commitments_total": 123,
"programs_active": 123,
"programs_archived": 123,
"programs_total": 123,
"users_active": 123,
"users_archived": 123,
"users_total": 123,
"donations_total_count": 123
},
"financials": {
"donations_total_amount": 123,
"client_payments_total_count": 123,
"client_payments_total_amount": 123,
"last_client_payment_at": "2023-11-07T05:31:56Z"
},
"archival_manifest": {
"strategy": "deleted_at_marker_v1",
"archive_marker": "<string>",
"user_ids": [
123
]
},
"captured_at": "2023-11-07T05:31:56Z"
}
}
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}Authorizations
bearerAuthapiKeyAuth
Passport bearer token authentication for legacy admin sessions.
Body
application/json
Request fields accepted by this operation. Omitted optional properties retain the behavior described above.
⌘I
Decommission the current organization account
curl --request POST \
--url https://api.gratona.com/v1/admin/account/decommission \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"confirmation_text": "DELETE",
"reason": "<string>"
}
'import requests
url = "https://api.gratona.com/v1/admin/account/decommission"
payload = {
"confirmation_text": "DELETE",
"reason": "<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({confirmation_text: 'DELETE', reason: '<string>'})
};
fetch('https://api.gratona.com/v1/admin/account/decommission', 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.gratona.com/v1/admin/account/decommission",
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([
'confirmation_text' => 'DELETE',
'reason' => '<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://api.gratona.com/v1/admin/account/decommission"
payload := strings.NewReader("{\n \"confirmation_text\": \"DELETE\",\n \"reason\": \"<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))
}HttpResponse<String> response = Unirest.post("https://api.gratona.com/v1/admin/account/decommission")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"confirmation_text\": \"DELETE\",\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/account/decommission")
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 \"confirmation_text\": \"DELETE\",\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"client_id": 123,
"already_decommissioned": true,
"snapshot_id": 123,
"archive_status": "<string>",
"restore_status": "<string>",
"snapshot": {
"client": {
"id": 123,
"organization": "<string>",
"email": "<string>",
"status": "<string>",
"custom_pricing_enabled": true,
"custom_pricing_frequency": 123,
"custom_pricing_amount": 123,
"credits": 123,
"discount_percentage": 123,
"archived": true,
"is_decommissioned": true
},
"counts": {
"donors_active": 123,
"donors_archived": 123,
"donors_total": 123,
"recipients_active": 123,
"recipients_archived": 123,
"recipients_total": 123,
"sponsorships_active": 123,
"sponsorships_archived": 123,
"sponsorships_total": 123,
"commitments_active": 123,
"commitments_archived": 123,
"commitments_total": 123,
"programs_active": 123,
"programs_archived": 123,
"programs_total": 123,
"users_active": 123,
"users_archived": 123,
"users_total": 123,
"donations_total_count": 123
},
"financials": {
"donations_total_amount": 123,
"client_payments_total_count": 123,
"client_payments_total_amount": 123,
"last_client_payment_at": "2023-11-07T05:31:56Z"
},
"archival_manifest": {
"strategy": "deleted_at_marker_v1",
"archive_marker": "<string>",
"user_ids": [
123
]
},
"captured_at": "2023-11-07T05:31:56Z"
},
"deletion_snapshot": {
"id": 123,
"client_id": 123,
"requested_by_user_id": 123,
"restored_by_user_id": 123,
"reason": "<string>",
"snapshot_version": 123,
"archive_status": "<string>",
"archive_started_at": "2023-11-07T05:31:56Z",
"archive_completed_at": "2023-11-07T05:31:56Z",
"archive_error": "<string>",
"restore_status": "<string>",
"restore_started_at": "2023-11-07T05:31:56Z",
"restore_completed_at": "2023-11-07T05:31:56Z",
"restore_error": "<string>",
"requested_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"snapshot_data": {
"client": {
"id": 123,
"organization": "<string>",
"email": "<string>",
"status": "<string>",
"custom_pricing_enabled": true,
"custom_pricing_frequency": 123,
"custom_pricing_amount": 123,
"credits": 123,
"discount_percentage": 123,
"archived": true,
"is_decommissioned": true
},
"counts": {
"donors_active": 123,
"donors_archived": 123,
"donors_total": 123,
"recipients_active": 123,
"recipients_archived": 123,
"recipients_total": 123,
"sponsorships_active": 123,
"sponsorships_archived": 123,
"sponsorships_total": 123,
"commitments_active": 123,
"commitments_archived": 123,
"commitments_total": 123,
"programs_active": 123,
"programs_archived": 123,
"programs_total": 123,
"users_active": 123,
"users_archived": 123,
"users_total": 123,
"donations_total_count": 123
},
"financials": {
"donations_total_amount": 123,
"client_payments_total_count": 123,
"client_payments_total_amount": 123,
"last_client_payment_at": "2023-11-07T05:31:56Z"
},
"archival_manifest": {
"strategy": "deleted_at_marker_v1",
"archive_marker": "<string>",
"user_ids": [
123
]
},
"captured_at": "2023-11-07T05:31:56Z"
}
}
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}