curl --request DELETE \
--url https://{your-subdomain}.neetodesk.com/api/external/v2/fields/{field_id} \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://{your-subdomain}.neetodesk.com/api/external/v2/fields/{field_id}"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://{your-subdomain}.neetodesk.com/api/external/v2/fields/{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://{your-subdomain}.neetodesk.com/api/external/v2/fields/{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 => [
"X-Api-Key: <x-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://{your-subdomain}.neetodesk.com/api/external/v2/fields/{field_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Api-Key", "<x-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://{your-subdomain}.neetodesk.com/api/external/v2/fields/{field_id}")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{your-subdomain}.neetodesk.com/api/external/v2/fields/{field_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Api-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"field": {
"id": "aaaabbbb-cccc-dddd-eeee-ffff00003333",
"name": "Browser",
"kind": "single_option",
"state": "active",
"resource_type": "ticket",
"is_required": false,
"is_required_for_agent_when_submitting_form": false,
"is_required_for_agent_when_closing_ticket": false,
"display_order": 3,
"placeholder_slug": "browser",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"options": [
{
"id": "aaaabbbb-cccc-dddd-eeee-ffff00004444",
"label": "Chrome",
"display_order": 0
}
]
}
}Delete ticket field
Deletes a custom ticket field along with the values stored against it in tickets. The field must be inactive before it can be deleted.
curl --request DELETE \
--url https://{your-subdomain}.neetodesk.com/api/external/v2/fields/{field_id} \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://{your-subdomain}.neetodesk.com/api/external/v2/fields/{field_id}"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://{your-subdomain}.neetodesk.com/api/external/v2/fields/{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://{your-subdomain}.neetodesk.com/api/external/v2/fields/{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 => [
"X-Api-Key: <x-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://{your-subdomain}.neetodesk.com/api/external/v2/fields/{field_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Api-Key", "<x-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://{your-subdomain}.neetodesk.com/api/external/v2/fields/{field_id}")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{your-subdomain}.neetodesk.com/api/external/v2/fields/{field_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Api-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"field": {
"id": "aaaabbbb-cccc-dddd-eeee-ffff00003333",
"name": "Browser",
"kind": "single_option",
"state": "active",
"resource_type": "ticket",
"is_required": false,
"is_required_for_agent_when_submitting_form": false,
"is_required_for_agent_when_closing_ticket": false,
"display_order": 3,
"placeholder_slug": "browser",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"options": [
{
"id": "aaaabbbb-cccc-dddd-eeee-ffff00004444",
"label": "Chrome",
"display_order": 0
}
]
}
}{your-subdomain} with your workspace’s subdomain. Learn how to find your subdomain in Workspace subdomain.
Headers
Use the X-Api-Key header to provide your workspace API key. Refer to Authentication for more information.
Path Parameters
ID of the ticket field. You can get this by listing all ticket fields using the List all ticket fields API.
"aaaabbbb-cccc-dddd-eeee-ffff00003333"
Response
OK - Field deleted successfully. The deleted field is returned in the response.
Hide child attributes
Hide child attributes
"aaaabbbb-cccc-dddd-eeee-ffff00003333"
"Browser"
Type of the field. It cannot be changed after the field is created.
text, textarea, integer, decimal, date, checkbox, single_option, multi_option "single_option"
Fields in the inactive state are hidden from agents and customers.
active, inactive "active"
Resource the field belongs to. Always ticket.
"ticket"
Whether customers must fill this field while submitting a ticket.
false
Whether agents must fill this field while creating a ticket.
false
Whether agents must fill this field before closing a ticket.
false
Position of the field in the list of ticket fields.
3
Slug used to refer to the field in placeholders and automations, as {{ticket.custom_fields.<placeholder_slug>}}. Generated from the name when the field is created, and not regenerated when the field is renamed.
"browser"