Delete User Account
User
Allows a logged-in user to delete their account by providing their alias in the request body. The alias in the request body must match the alias of the authenticated user. All associated user data, including active API keys, will be permanently removed.
Authorization<token>
Bearer token for authentication. Type "Bearer" followed by a space and JWT token. Example: "Bearer YOUR_JWT_TOKEN"
In: header
User deletion request
aliasstring
Length
3 <= length <= 50Response Body
curl -X POST "https://andamio-api-preprod-308006323670.us-central1.run.app/api/v1/user/delete" \
-H "Content-Type: application/json" \
-d '{
"alias": "johndoe"
}'const body = JSON.stringify({
"alias": "johndoe"
})
fetch("https://andamio-api-preprod-308006323670.us-central1.run.app/api/v1/user/delete", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://andamio-api-preprod-308006323670.us-central1.run.app/api/v1/user/delete"
body := strings.NewReader(`{
"alias": "johndoe"
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://andamio-api-preprod-308006323670.us-central1.run.app/api/v1/user/delete"
body = {
"alias": "johndoe"
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
import java.net.http.HttpRequest.BodyPublishers;
var body = BodyPublishers.ofString("""{
"alias": "johndoe"
}""");
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
.uri(URI.create("https://andamio-api-preprod-308006323670.us-central1.run.app/api/v1/user/delete"))
.header("Content-Type", "application/json")
.POST(body)
.build();
try {
HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
System.out.println("Status code: " + response.statusCode());
System.out.println("Response body: " + response.body());
} catch (Exception e) {
e.printStackTrace();
}using System;
using System.Net.Http;
using System.Text;
var body = new StringContent("""
{
"alias": "johndoe"
}
""", Encoding.UTF8, "application/json");
var client = new HttpClient();
var response = await client.PostAsync("https://andamio-api-preprod-308006323670.us-central1.run.app/api/v1/user/delete", body);
var responseBody = await response.Content.ReadAsStringAsync();{
"message": "User deleted successfully."
}{
"details": "string",
"message": "Bad Request: Invalid input.",
"status_code": 400
}{
"details": "string",
"message": "Unauthorized: Invalid or missing credentials.",
"status_code": 401
}{
"details": "string",
"message": "Forbidden: Insufficient permissions or tier access.",
"status_code": 403
}{
"details": "string",
"message": "Not Found: The requested resource could not be found.",
"status_code": 404
}{
"details": "string",
"message": "Unprocessable Entity: Invalid request structure or data.",
"status_code": 422
}{
"details": "string",
"message": "Too Many Requests: Rate limit or quota exceeded.",
"status_code": 429
}{
"details": "string",
"message": "Internal Server Error: An unexpected error occurred.",
"status_code": 500
}