Delete Extraction Field
curl --request DELETE \
--url https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/data-extraction/{field_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/data-extraction/{field_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.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/data-extraction/{field_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.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/data-extraction/{field_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.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/data-extraction/{field_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.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/data-extraction/{field_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/data-extraction/{field_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": "invalid_api_key",
"detail": "Not authenticated"
}{
"code": "validation_error",
"detail": "System data extraction fields cannot be deleted"
}{
"code": "validation_error",
"detail": "Data extraction field with ID 8 not found for agent 17"
}{
"code": "validation_error",
"detail": {
"code": "delete_confirmation_required",
"message": "1 alert and 1 rule use this data extraction field. They will be paused, and their trigger history is kept. To turn them back on, edit each one and choose another data extraction field.",
"dependents": [
{
"type": "alert",
"id": 31,
"name": "Missing order number"
},
{
"type": "rule",
"id": 8,
"name": "Escalation Flag"
}
]
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Agent Settings
Delete Extraction Field
Delete a data extraction field.
Alerts and rules that use the field are paused, not deleted, so their history is kept. If
any do, the request fails with 409 and lists them unless confirm is true.
DELETE
/
api
/
v1
/
workspaces
/
{workspace_id}
/
agents
/
{agent_id}
/
settings
/
data-extraction
/
{field_id}
Delete Extraction Field
curl --request DELETE \
--url https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/data-extraction/{field_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/data-extraction/{field_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.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/data-extraction/{field_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.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/data-extraction/{field_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.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/data-extraction/{field_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.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/data-extraction/{field_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/data-extraction/{field_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": "invalid_api_key",
"detail": "Not authenticated"
}{
"code": "validation_error",
"detail": "System data extraction fields cannot be deleted"
}{
"code": "validation_error",
"detail": "Data extraction field with ID 8 not found for agent 17"
}{
"code": "validation_error",
"detail": {
"code": "delete_confirmation_required",
"message": "1 alert and 1 rule use this data extraction field. They will be paused, and their trigger history is kept. To turn them back on, edit each one and choose another data extraction field.",
"dependents": [
{
"type": "alert",
"id": 31,
"name": "Missing order number"
},
{
"type": "rule",
"id": 8,
"name": "Escalation Flag"
}
]
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Query Parameters
Response
Successful Response