Delete app
Permanently deletes an app you registered via this API and ALL of its data — runs, findings, mappings, and stored credentials. Irreversible. Only apps registered through this API can be deleted here; an app created in the console (or predating API source tracking) returns 409 — delete it in the console instead. Rate limit 5 requests / 60 s per IP.
curl --request DELETE \
--url https://api.perfai.ai/v1/apps/{appId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.perfai.ai/v1/apps/{appId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.perfai.ai/v1/apps/{appId}', 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.perfai.ai/v1/apps/{appId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.perfai.ai/v1/apps/{appId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.perfai.ai/v1/apps/{appId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.perfai.ai/v1/apps/{appId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"appId": "<string>",
"status": "DELETED",
"previousRegistrationStatus": "PENDING"
}{
"type": "<string>",
"title": "<string>"
}{
"type": "<string>",
"title": "<string>"
}{
"type": "<string>",
"title": "<string>"
}Authorizations
JWT login token tied to your Perfai user (not a separate API key). Obtain it via POST /api/v1/auth/token with your username and password (use the returned id_token) — the same login the web console performs. Carries org, user, and role; short-lived.
Path Parameters
MongoDB ObjectId of the app (from GET /apps or POST /apps).
Response
App and all of its data deleted.
Confirmation that an app and all of its data were deleted.
The deleted app's id.
Always DELETED on success.
DELETED The app's registrationStatus at the moment it was deleted.
PENDING, IN_PROGRESS, NEEDS_INPUT, COMPLETED, COMPLETED_PARTIAL, INTERRUPTED, CANCELLED curl --request DELETE \
--url https://api.perfai.ai/v1/apps/{appId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.perfai.ai/v1/apps/{appId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.perfai.ai/v1/apps/{appId}', 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.perfai.ai/v1/apps/{appId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.perfai.ai/v1/apps/{appId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.perfai.ai/v1/apps/{appId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.perfai.ai/v1/apps/{appId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"appId": "<string>",
"status": "DELETED",
"previousRegistrationStatus": "PENDING"
}{
"type": "<string>",
"title": "<string>"
}{
"type": "<string>",
"title": "<string>"
}{
"type": "<string>",
"title": "<string>"
}
