Delete a project
curl --request DELETE \
--url https://api.tensorpro.ai/api/v1/projects/{project_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tensorpro.ai/api/v1/projects/{project_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tensorpro.ai/api/v1/projects/{project_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://api.tensorpro.ai/api/v1/projects/{project_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 => [
"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.tensorpro.ai/api/v1/projects/{project_id}"
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.tensorpro.ai/api/v1/projects/{project_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorpro.ai/api/v1/projects/{project_id}")
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{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>"
}Projects
Delete a project
Delete one of your projects. Its sessions keep their messages, and its memories and documents are NOT deleted: remove the project’s sources first if you want its documents gone. Returns 204 on success and 404 when the project does not exist or does not belong to you.
DELETE
/
api
/
v1
/
projects
/
{project_id}
Delete a project
curl --request DELETE \
--url https://api.tensorpro.ai/api/v1/projects/{project_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tensorpro.ai/api/v1/projects/{project_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tensorpro.ai/api/v1/projects/{project_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://api.tensorpro.ai/api/v1/projects/{project_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 => [
"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.tensorpro.ai/api/v1/projects/{project_id}"
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.tensorpro.ai/api/v1/projects/{project_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tensorpro.ai/api/v1/projects/{project_id}")
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{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>"
}Use this endpoint to remove a project you no longer need.
See Error handling.
What EDN does
- Removes the project from your project list.
- Stops it being used in requests:
project_idwith this ID returns404.
Required headers
| Header | Value | Description |
|---|---|---|
Authorization | Bearer YOUR_API_KEY | Your EDN API key. Create keys in the Console. See Authentication |
Request
| Parameter | Type | Description |
|---|---|---|
project_id | string | Identifier for the project to delete |
curl -X DELETE "https://api.tensorpro.ai/api/v1/projects/b4c8e2f6-1a3d-4e5f-9b7c-2d6e8f0a1b3c" \
-H "Authorization: Bearer $EDN_API_KEY"
import os
import requests
resp = requests.delete(
"https://api.tensorpro.ai/api/v1/projects/b4c8e2f6-1a3d-4e5f-9b7c-2d6e8f0a1b3c",
headers={"Authorization": f"Bearer {os.environ['EDN_API_KEY']}"},
)
resp.raise_for_status()
print(resp.status_code)
const resp = await fetch("https://api.tensorpro.ai/api/v1/projects/b4c8e2f6-1a3d-4e5f-9b7c-2d6e8f0a1b3c", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.EDN_API_KEY}`,
},
});
console.log(resp.status);
Response
Returns204 No Content with no body when the request succeeds.
Important behavior
- The project’s memories and documents are not deleted. To remove its documents and everything EDN saved from them, remove each document before deleting the project.
- Sessions keep their messages.
Errors
| Status | Code | When |
|---|---|---|
401 | UNAUTHORIZED | The API key is missing, invalid or revoked |
404 | NOT_FOUND | The project doesn’t exist or isn’t yours |
429 | RATE_LIMITED | Per-minute limit reached. Retry after Retry-After seconds |
500 | INTERNAL_ERROR | Something failed on EDN’s side. Retry later |
