Delete an AI Routine
curl --request DELETE \
--url https://{instance}.omniapp.co/api/v1/ai/routines/{routineId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{instance}.omniapp.co/api/v1/ai/routines/{routineId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{instance}.omniapp.co/api/v1/ai/routines/{routineId}', 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://{instance}.omniapp.co/api/v1/ai/routines/{routineId}",
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://{instance}.omniapp.co/api/v1/ai/routines/{routineId}"
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://{instance}.omniapp.co/api/v1/ai/routines/{routineId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.omniapp.co/api/v1/ai/routines/{routineId}")
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{
"deleted": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": "Bad Request: prompt: Required",
"status": 400
}{
"detail": "Unauthorized: Missing or invalid API key",
"status": 401
}{
"detail": "Forbidden: AI query generation is not enabled for this organization",
"status": 403
}{
"detail": "Model 770e8400-e29b-41d4-a716-446655440002 not found",
"status": 404
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}AI Routines
Delete an AI Routine
AI routines must be enabled for your organization to use this endpoint.
Delete an AI Routine. This action cannot be undone.
DELETE
/
v1
/
ai
/
routines
/
{routineId}
Delete an AI Routine
curl --request DELETE \
--url https://{instance}.omniapp.co/api/v1/ai/routines/{routineId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{instance}.omniapp.co/api/v1/ai/routines/{routineId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{instance}.omniapp.co/api/v1/ai/routines/{routineId}', 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://{instance}.omniapp.co/api/v1/ai/routines/{routineId}",
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://{instance}.omniapp.co/api/v1/ai/routines/{routineId}"
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://{instance}.omniapp.co/api/v1/ai/routines/{routineId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.omniapp.co/api/v1/ai/routines/{routineId}")
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{
"deleted": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": "Bad Request: prompt: Required",
"status": 400
}{
"detail": "Unauthorized: Missing or invalid API key",
"status": 401
}{
"detail": "Forbidden: AI query generation is not enabled for this organization",
"status": 403
}{
"detail": "Model 770e8400-e29b-41d4-a716-446655440002 not found",
"status": 404
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}Authorizations
bearerAuthorgApiKey
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
Path Parameters
The UUID of the routine.
Query Parameters
Requires an Organization API key. Target user membership ID.
Was this page helpful?
⌘I

