curl --request GET \
--url https://{your-subdomain}.neetodesk.com/api/external/v2/fields \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://{your-subdomain}.neetodesk.com/api/external/v2/fields"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://{your-subdomain}.neetodesk.com/api/external/v2/fields', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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"
req, _ := http.NewRequest("GET", 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.get("https://{your-subdomain}.neetodesk.com/api/external/v2/fields")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{your-subdomain}.neetodesk.com/api/external/v2/fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"fields": [
{
"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
}
]
}
],
"pagination": {
"total_records": 95,
"total_pages": 4,
"current_page_number": 1,
"page_size": 30
}
}List ticket fields
Lists the custom ticket fields in the workspace, ordered by their display order.
curl --request GET \
--url https://{your-subdomain}.neetodesk.com/api/external/v2/fields \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://{your-subdomain}.neetodesk.com/api/external/v2/fields"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://{your-subdomain}.neetodesk.com/api/external/v2/fields', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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"
req, _ := http.NewRequest("GET", 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.get("https://{your-subdomain}.neetodesk.com/api/external/v2/fields")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{your-subdomain}.neetodesk.com/api/external/v2/fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"fields": [
{
"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
}
]
}
],
"pagination": {
"total_records": 95,
"total_pages": 4,
"current_page_number": 1,
"page_size": 30
}
}{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.
Query Parameters
Retrieve paginated results by specifying the desired page number. If this parameter is absent, all results will be returned.
Set the number of results returned in the response. Defaulting to 30 when omitted.
Filter fields by their state. Fields of all states are returned when omitted.
active, inactive "active"
Response
OK - Request succeeded
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"