Delete Prompt
curl --request DELETE \
--url https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}"
headers = {"Authorization": "<authorization>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<authorization>'}};
fetch('https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{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.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{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: <authorization>"
],
]);
$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.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_bodyPrompts
Delete Prompt
Delete a prompt and stop its scheduled query runs.
DELETE
/
ai-analytics-service
/
api
/
public
/
v1
/
prompts
/
{id}
Delete Prompt
curl --request DELETE \
--url https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}"
headers = {"Authorization": "<authorization>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<authorization>'}};
fetch('https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{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.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{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: <authorization>"
],
]);
$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.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_bodyPermanently deletes a prompt. Future scheduled query runs for the prompt are canceled. Existing query run history is not affected.
Parameters
number
required
Unique identifier for the prompt to delete.
string
required
Bearer token. Format:
Bearer slat_<your-token>.Response
Returns204 No Content on success. The response body is empty.
Example
curl -s -X DELETE "https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/156" \
-H "Authorization: Bearer slat_YOUR_TOKEN"
import requests
response = requests.delete(
"https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/156",
headers={
"Authorization": "Bearer slat_YOUR_TOKEN",
},
)
print(response.status_code) # 204
const response = await fetch(
"https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/156",
{
method: "DELETE",
headers: {
"Authorization": "Bearer slat_YOUR_TOKEN",
},
}
);
console.log(response.status); // 204
Status codes
| Status | Description |
|---|---|
204 | Prompt deleted. |
401 | Missing or invalid Bearer token. See Authentication. |
404 | Prompt not found. The ID does not exist or does not belong to this workspace. |
500 | Internal server error. |
What’s next
- List Prompts — View remaining prompts.
- Create Prompt — Add a new prompt.
Was this page helpful?