Soft-delete an assistant
curl --request DELETE \
--url https://pria.praxislxp.com/api/user/assistant/{id} \
--header 'x-access-token: <api-key>'import requests
url = "https://pria.praxislxp.com/api/user/assistant/{id}"
headers = {"x-access-token": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-access-token': '<api-key>'}};
fetch('https://pria.praxislxp.com/api/user/assistant/{id}', 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://pria.praxislxp.com/api/user/assistant/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-access-token: <api-key>"
],
]);
$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://pria.praxislxp.com/api/user/assistant/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-access-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://pria.praxislxp.com/api/user/assistant/{id}")
.header("x-access-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/user/assistant/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-access-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Assistant Deleted"
}{
"success": false,
"error": {},
"message": "Error deleting assistant <details>"
}{
"success": false,
"message": "Authentication Required"
}{
"success": false,
"message": "Assistants can only be deleted by admin and super admins"
}{
"success": false,
"message": "Assistant not found"
}Assistants
Soft-delete an assistant
Performs a soft delete on an assistant by setting its status to “deleted” and prepending a timestamp to the name (to free the unique index slot). Requires admin or super user privileges. System assistants (user=null) cannot be deleted through this endpoint and return a 403 error. Admin users can only delete assistants they own; attempting to delete another admin’s assistant returns a 403. Super users can delete any non-system assistant.
DELETE
/
api
/
user
/
assistant
/
{id}
Soft-delete an assistant
curl --request DELETE \
--url https://pria.praxislxp.com/api/user/assistant/{id} \
--header 'x-access-token: <api-key>'import requests
url = "https://pria.praxislxp.com/api/user/assistant/{id}"
headers = {"x-access-token": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-access-token': '<api-key>'}};
fetch('https://pria.praxislxp.com/api/user/assistant/{id}', 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://pria.praxislxp.com/api/user/assistant/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-access-token: <api-key>"
],
]);
$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://pria.praxislxp.com/api/user/assistant/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-access-token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://pria.praxislxp.com/api/user/assistant/{id}")
.header("x-access-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/user/assistant/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-access-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Assistant Deleted"
}{
"success": false,
"error": {},
"message": "Error deleting assistant <details>"
}{
"success": false,
"message": "Authentication Required"
}{
"success": false,
"message": "Assistants can only be deleted by admin and super admins"
}{
"success": false,
"message": "Assistant not found"
}Was this page helpful?
⌘I