Confirm Account Deletion
curl --request POST \
--url https://api.sublay.io/api/v6/:projectId/api/v7/auth/confirm-account-deletion \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>"
}
'import requests
url = "https://api.sublay.io/api/v6/:projectId/api/v7/auth/confirm-account-deletion"
payload = { "code": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({code: '<string>'})
};
fetch('https://api.sublay.io/api/v6/:projectId/api/v7/auth/confirm-account-deletion', 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.sublay.io/api/v6/:projectId/api/v7/auth/confirm-account-deletion",
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([
'code' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.sublay.io/api/v6/:projectId/api/v7/auth/confirm-account-deletion"
payload := strings.NewReader("{\n \"code\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.sublay.io/api/v6/:projectId/api/v7/auth/confirm-account-deletion")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/api/v6/:projectId/api/v7/auth/confirm-account-deletion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuth Endpoints
Confirm Account Deletion
Verify the emailed code and permanently delete the authenticated user’s account
POST
/
:projectId
/
api
/
v7
/
auth
/
confirm-account-deletion
Confirm Account Deletion
curl --request POST \
--url https://api.sublay.io/api/v6/:projectId/api/v7/auth/confirm-account-deletion \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>"
}
'import requests
url = "https://api.sublay.io/api/v6/:projectId/api/v7/auth/confirm-account-deletion"
payload = { "code": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({code: '<string>'})
};
fetch('https://api.sublay.io/api/v6/:projectId/api/v7/auth/confirm-account-deletion', 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.sublay.io/api/v6/:projectId/api/v7/auth/confirm-account-deletion",
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([
'code' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.sublay.io/api/v6/:projectId/api/v7/auth/confirm-account-deletion"
payload := strings.NewReader("{\n \"code\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.sublay.io/api/v6/:projectId/api/v7/auth/confirm-account-deletion")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/api/v6/:projectId/api/v7/auth/confirm-account-deletion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyCompletes the self-service account-deletion flow. Verifies the one-time code sent by the Request Account Deletion endpoint and, on a match, permanently deletes the authenticated user’s account.
Requires a valid user access token. The cascade is identical to the service-key Delete User endpoint: reactions, files, follows, connections, collections, reports, mentions, notifications, and embeddings are removed, while the user’s entities and comments are preserved as hollow shells (their
userId, content, and attachments cleared) to keep threads intact.
Deletion is immediate and irreversible. There is no grace period and no
recovery once this endpoint returns
204.Body Parameters
string
required
The one-time confirmation code from the deletion email. Must match the most recently issued code exactly.
Response
Returns204 No Content on success. The user and their session tokens no longer exist after this call.
Error Codes
| Code | Status | Description |
|---|---|---|
auth/invalid-or-expired-code | 400 | The code does not match, was never issued, or has expired (10-minute TTL). |
user/not-found | 404 | The authenticated user no longer exists. |
user/delete-failed | 404 | The user could not be deleted (not found or already deleted). |
The confirmation code is single-use — it is consumed once deletion succeeds,
so it cannot be replayed. If deletion fails with a server error, the code is
left in place so you can retry until it expires (10-minute TTL).

