Delete a search
curl --request DELETE \
--url https://app.pipecorn.com/api/v2/searches/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://app.pipecorn.com/api/v2/searches/{id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://app.pipecorn.com/api/v2/searches/{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://app.pipecorn.com/api/v2/searches/{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-API-KEY: <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://app.pipecorn.com/api/v2/searches/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-KEY", "<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://app.pipecorn.com/api/v2/searches/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pipecorn.com/api/v2/searches/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "Search deleted successfully"
}{
"error": "Unauthorized"
}{
"error": "Search not found"
}{
"error": "Failed to delete search"
}Searches
Delete a Search
Deletes a specific search by its ID. This operation will permanently remove the search and all associated tasks from the system. Only the owner of the search can delete it.
DELETE
/
searches
/
{id}
Delete a search
curl --request DELETE \
--url https://app.pipecorn.com/api/v2/searches/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://app.pipecorn.com/api/v2/searches/{id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://app.pipecorn.com/api/v2/searches/{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://app.pipecorn.com/api/v2/searches/{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-API-KEY: <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://app.pipecorn.com/api/v2/searches/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-KEY", "<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://app.pipecorn.com/api/v2/searches/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pipecorn.com/api/v2/searches/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "Search deleted successfully"
}{
"error": "Unauthorized"
}{
"error": "Search not found"
}{
"error": "Failed to delete search"
}Description
Deletes a specific search by its ID. This operation will permanently remove the search and all associated tasks from the system. Only the owner of the search can delete it.Parameters
Path Parameters
id(required, string, UUID): The unique identifier of the search to delete
Responses
200 OK
The search was successfully deleted.{
"message": "Search deleted successfully"
}
401 Unauthorized
You are not authorized to delete this search. This may be because you do not own the search, or the search owner is not part of your workspace.{
"error": "Unauthorized"
}
404 Not Found
The search with the specified ID does not exist.{
"error": "Search not found"
}
422 Unprocessable Entity
The search deletion failed for an unknown reason.{
"error": "Failed to delete search"
}
Notes
- When a search is deleted, all related tasks are also deleted automatically
- This operation cannot be undone
- Only searches owned by the authenticated user or within the user’s workspace can be deleted
Was this page helpful?