You can use this API to add fields to your custom objects. Basic text fields, date fields, as well as customizable drop-down and number fields are available. The fields correspond to the custom object fields that admins can add using the Zendesk admin interface.

The fields are only visible to agents and admins.

Standard Custom Object Fields

Some fields, such as name and external id, are predefined and required for every object. The standard fields can't be manually created, deleted, or deactivated, and only the title and description attributes can be edited. The purpose of these standard fields is to allow customers to edit the display title and description of the name and external id fields on a custom object's records. Standard field keys begin with the standard:: prefix.

About dropdown fields

Most custom fields let agents enter a single value such as free-form text or a date. The dropdown field lets agents choose from a list of options. Each option has a name that's visible to the agent and an underlying value that's not visible. In the API, these options are listed in the dropdown field's custom_field_options property. Each option in the list has a name and value property. In the Zendesk admin interface, these properties correspond to the "Name" and "Tag" fields.

About lookup relationship fields

Lookup relationship fields are used to connect custom objects to other objects in Zendesk. The lookup relationship field can be defined on a standard object and point to a custom object or within the custom object and point to another custom object or standard object. See Lookup relationships.

JSON format

Custom Object Fields are represented as JSON objects with the following properties:

NameTypeRead-onlyMandatoryDescription
activebooleanfalsefalseIf true, this field is available for use
created_atstringtruefalseThe time of the last update of the ticket field
custom_field_optionsarrayfalsefalseRequired and presented for a custom field of type "dropdown". Each option is represented by an object with a name and value property
descriptionstringfalsefalseUser-defined description of this field's purpose
idintegertruefalseAutomatically assigned upon creation
keystringfalsetrueA unique key that identifies this custom field. This is used for updating the field and referencing in placeholders. The key must consist of only letters, numbers, and underscores. It can't be only numbers
positionintegerfalsefalseOrdering of the field relative to other fields
raw_descriptionstringfalsefalseThe dynamic content placeholder, if present, or the description value, if not. See Dynamic Content Items
raw_titlestringfalsefalseThe dynamic content placeholder, if present, or the title value, if not. See Dynamic Content Items
regexp_for_validationstringfalsefalseRegular expression field only. The validation pattern for a field value to be deemed valid
relationship_filterobjectfalsefalseA filter definition that allows your autocomplete to filter down results
relationship_target_typestringfalsefalseA representation of what type of object the field references. Options are "zen:user", "zen:organization", "zen:ticket", and "zen:custom_object:{key}" where key is a custom object key. For example "zen:custom_object:apartment".
systembooleantruefalseIf true, only active and position values of this field can be changed
tagstringfalsefalseOptional for custom field of type "checkbox"; not presented otherwise.
titlestringfalsetrueThe title of the custom field
typestringfalsetrueThe custom field type: "checkbox", "date", "decimal", "dropdown", "integer", "lookup", "regexp", "text", or "textarea"
updated_atstringtruefalseThe time of the last update of the ticket field
urlstringtruefalseThe URL for this resource

Example

{  "active": true,  "created_at": "2022-09-07T23:21:59Z",  "description": "Make",  "id": 4398096842879,  "key": "make",  "position": 0,  "raw_description": "Make",  "raw_title": "Make",  "regexp_for_validation": null,  "system": false,  "title": "Make",  "type": "text",  "updated_at": "2022-09-07T23:22:00Z",  "url": "https://company.zendesk.com/api/v2/custom_objects/car/fields/4398096842879.json"}

List Custom Object Fields

  • GET /api/v2/custom_objects/{custom_object_key}/fields

Lists all undeleted custom fields for the specified object.

Allowed For

  • Agents

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

Parameters

NameTypeInRequiredDescription
include_standard_fieldsbooleanQueryfalseInclude standard fields if true. Exclude them if false
custom_object_keystringPathtrueThe key of a custom object

Code Samples

Curl
curl --request GET https://example.zendesk.com/api/v2/custom_objects/car/fields?include_standard_fields=true \--header "Content-Type: application/json" \-u username:password
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://example.zendesk.com/api/v2/custom_objects/car/fields?include_standard_fields=true"	method := "GET"	req, err := http.NewRequest(method, url, nil)
	if err != nil {		fmt.Println(err)		return	}	req.Header.Add("Content-Type", "application/json")	req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "username:password"
	client := &http.Client {}	res, err := client.Do(req)	if err != nil {		fmt.Println(err)		return	}	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)	if err != nil {		fmt.Println(err)		return	}	fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/custom_objects/car/fields")		.newBuilder()		.addQueryParameter("include_standard_fields", "true");
Request request = new Request.Builder()		.url(urlBuilder.build())		.method("GET", null)		.addHeader("Content-Type", "application/json")		.addHeader("Authorization", Credentials.basic("your-email", "your-password"))		.build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {  method: 'GET',  url: 'https://example.zendesk.com/api/v2/custom_objects/car/fields',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "username:password"  },  params: {    'include_standard_fields': 'true',  },};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});
Python
import requests
url = "https://example.zendesk.com/api/v2/custom_objects/car/fields?include_standard_fields=true"headers = {	"Content-Type": "application/json",}
response = requests.request(	"GET",	url,	auth=('<username>', '<password>'),	headers=headers)
print(response.text)
Ruby
require "net/http"uri = URI("https://example.zendesk.com/api/v2/custom_objects/car/fields")uri.query = URI.encode_www_form("include_standard_fields": "true")request = Net::HTTP::Get.new(uri, "Content-Type": "application/json")request.basic_auth "username", "password"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|	http.request(request)end
curl - Get custom object fields, with standard fields included
curl https://{subdomain}.zendesk.com/api/v2/custom_objects/{custom_object_key}/fields.json?include_standard_fields=true \  -v -u {email_address}:{password}

Example response(s)

200 OK
// Status 200 OK
{  "custom_object_fields": [    {      "active": true,      "created_at": "2022-09-07T23:21:59Z",      "description": "Name",      "id": 4398096842877,      "key": "standard::name",      "position": 0,      "raw_description": "Name",      "raw_title": "Name",      "regexp_for_validation": null,      "system": false,      "title": "Name",      "type": "text",      "updated_at": "2022-09-07T23:22:00Z",      "url": "https://{subdomain}.zendesk.com/api/v2/custom_objects/car/fields.json?id=4398096842877"    },    {      "active": true,      "created_at": "2022-09-07T23:21:59Z",      "description": "External ID",      "id": 4398096842878,      "key": "standard::external_id",      "position": 1,      "raw_description": "External ID",      "raw_title": "External ID",      "regexp_for_validation": null,      "system": false,      "title": "External ID",      "type": "text",      "updated_at": "2022-09-07T23:22:00Z",      "url": "https://{subdomain}.zendesk.com/api/v2/custom_objects/car/fields.json?id=4398096842878"    },    {      "active": true,      "created_at": "2022-09-07T23:22:14Z",      "description": "Model",      "id": 4398096843007,      "key": "model",      "position": 2,      "raw_description": "Model",      "raw_title": "Model",      "regexp_for_validation": null,      "system": false,      "title": "Model",      "type": "text",      "updated_at": "2022-09-07T23:22:14Z",      "url": "https://{subdomain}.zendesk.com/api/v2/custom_objects/car/fields.json?id=4398096843007"    }  ]}

Create Custom Object Field

  • POST /api/v2/custom_objects/{custom_object_key}/fields

Creates any of the following custom field types:

  • text (default when no "type" is specified)
  • textarea
  • checkbox
  • date
  • integer
  • decimal
  • regexp
  • dropdown
  • lookup

See About custom field types in Zendesk help.

Allowed For

  • Admins

Parameters

NameTypeInRequiredDescription
custom_object_keystringPathtrueThe key of a custom object

Example body

{  "custom_object_field": {    "key": "color",    "title": "Color",    "type": "text"  }}

Code Samples

Curl
curl --request POST https://example.zendesk.com/api/v2/custom_objects/car/fields \--header "Content-Type: application/json" \-u username:password \--data-raw '{  "custom_object_field": {    "key": "color",    "title": "Color",    "type": "text"  }}'
Go
import (	"fmt"	"io"	"net/http"	"strings")
func main() {	url := "https://example.zendesk.com/api/v2/custom_objects/car/fields"	method := "POST"	payload := strings.NewReader(`{  "custom_object_field": {    "key": "color",    "title": "Color",    "type": "text"  }}`)	req, err := http.NewRequest(method, url, payload)
	if err != nil {		fmt.Println(err)		return	}	req.Header.Add("Content-Type", "application/json")	req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "username:password"
	client := &http.Client {}	res, err := client.Do(req)	if err != nil {		fmt.Println(err)		return	}	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)	if err != nil {		fmt.Println(err)		return	}	fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/custom_objects/car/fields")		.newBuilder();RequestBody body = RequestBody.create(MediaType.parse("application/json"),		"""{  \"custom_object_field\": {    \"key\": \"color\",    \"title\": \"Color\",    \"type\": \"text\"  }}""");
Request request = new Request.Builder()		.url(urlBuilder.build())		.method("POST", body)		.addHeader("Content-Type", "application/json")		.addHeader("Authorization", Credentials.basic("your-email", "your-password"))		.build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var data = JSON.stringify({  "custom_object_field": {    "key": "color",    "title": "Color",    "type": "text"  }});
var config = {  method: 'POST',  url: 'https://example.zendesk.com/api/v2/custom_objects/car/fields',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "username:password"  },  data : data,};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});
Python
import requestsimport json
url = "https://example.zendesk.com/api/v2/custom_objects/car/fields"
payload = json.loads("""{  "custom_object_field": {    "key": "color",    "title": "Color",    "type": "text"  }}""")headers = {	"Content-Type": "application/json",}
response = requests.request(	"POST",	url,	auth=('<username>', '<password>'),	headers=headers,	json=payload)
print(response.text)
Ruby
require "net/http"uri = URI("https://example.zendesk.com/api/v2/custom_objects/car/fields")request = Net::HTTP::Post.new(uri, "Content-Type": "application/json")request.body = %q({  "custom_object_field": {    "key": "color",    "title": "Color",    "type": "text"  }})request.basic_auth "username", "password"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|	http.request(request)end
curl - Create custom object field

For clarity, the example places the JSON in a separate file and imports it into the cURL statement

my_object.json

{  "custom_object_field": {    "title": "Color",    "key": "color",    "type": "text"  }}

curl - Create custom object field snippet

curl https://{subdomain}.zendesk.com/api/v2/custom_objects/{custom_object_key}/fields.json \  -d @my_object.json \  -H "Content-Type: application/json" -v -u {email_address}:{password} -X POST

Example response(s)

201 Created
// Status 201 Created
{  "custom_object_field": {    "active": true,    "created_at": "2022-09-07T23:21:59Z",    "description": "Make",    "id": 4398096842879,    "key": "make",    "position": 0,    "raw_description": "Make",    "raw_title": "Make",    "regexp_for_validation": null,    "system": false,    "title": "Make",    "type": "text",    "updated_at": "2022-09-07T23:22:00Z",    "url": "https://{subdomain}.zendesk.com/api/v2/custom_objects/car/fields.json?id=4398096842879"  }}

Show Custom Object Field

  • GET /api/v2/custom_objects/{custom_object_key}/fields/{custom_object_field_key_or_id}

Returns a custom field for a specific object using a provided key or id of the field.

Allowed For

  • Agents

Parameters

NameTypeInRequiredDescription
custom_object_field_key_or_idstringPathtrueThe key or id of a custom object field
custom_object_keystringPathtrueThe key of a custom object

Code Samples

Curl
curl --request GET https://example.zendesk.com/api/v2/custom_objects/car/fields/make \--header "Content-Type: application/json" \-u username:password
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://example.zendesk.com/api/v2/custom_objects/car/fields/make"	method := "GET"	req, err := http.NewRequest(method, url, nil)
	if err != nil {		fmt.Println(err)		return	}	req.Header.Add("Content-Type", "application/json")	req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "username:password"
	client := &http.Client {}	res, err := client.Do(req)	if err != nil {		fmt.Println(err)		return	}	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)	if err != nil {		fmt.Println(err)		return	}	fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/custom_objects/car/fields/make")		.newBuilder();
Request request = new Request.Builder()		.url(urlBuilder.build())		.method("GET", null)		.addHeader("Content-Type", "application/json")		.addHeader("Authorization", Credentials.basic("your-email", "your-password"))		.build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {  method: 'GET',  url: 'https://example.zendesk.com/api/v2/custom_objects/car/fields/make',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "username:password"  },};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});
Python
import requests
url = "https://example.zendesk.com/api/v2/custom_objects/car/fields/make"headers = {	"Content-Type": "application/json",}
response = requests.request(	"GET",	url,	auth=('<username>', '<password>'),	headers=headers)
print(response.text)
Ruby
require "net/http"uri = URI("https://example.zendesk.com/api/v2/custom_objects/car/fields/make")request = Net::HTTP::Get.new(uri, "Content-Type": "application/json")request.basic_auth "username", "password"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|	http.request(request)end
curl - Get custom object field by key or id
curl https://{subdomain}.zendesk.com/api/v2/custom_objects/{custom_object_key}/fields/{custom_object_field_key_or_id}.json \  -v -u {email_address}:{password}

Example response(s)

200 OK
// Status 200 OK
{  "custom_object_field": {    "active": true,    "created_at": "2022-09-07T23:21:59Z",    "description": "Make",    "id": 4398096842879,    "key": "make",    "position": 0,    "raw_description": "Make",    "raw_title": "Make",    "regexp_for_validation": null,    "system": false,    "title": "Make",    "type": "text",    "updated_at": "2022-09-07T23:22:00Z",    "url": "https://{subdomain}.zendesk.com/api/v2/custom_objects/car/fields.json?id=4398096842879"  }}

Update Custom Object Field

  • PATCH /api/v2/custom_objects/{custom_object_key}/fields/{custom_object_field_key_or_id}

Updates individual custom object fields. The updating rules are as follows:

  • Takes a custom_object_field object that specifies the properties to update
  • The key property cannot be updated
  • If updating a standard field, only the title and description properties can be updated.

Allowed For

  • Admins

Parameters

NameTypeInRequiredDescription
custom_object_field_key_or_idstringPathtrueThe key or id of a custom object field
custom_object_keystringPathtrueThe key of a custom object

Code Samples

Curl
curl --request PATCH https://example.zendesk.com/api/v2/custom_objects/car/fields/make \--header "Content-Type: application/json" \-u username:password
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://example.zendesk.com/api/v2/custom_objects/car/fields/make"	method := "PATCH"	req, err := http.NewRequest(method, url, nil)
	if err != nil {		fmt.Println(err)		return	}	req.Header.Add("Content-Type", "application/json")	req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "username:password"
	client := &http.Client {}	res, err := client.Do(req)	if err != nil {		fmt.Println(err)		return	}	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)	if err != nil {		fmt.Println(err)		return	}	fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/custom_objects/car/fields/make")		.newBuilder();RequestBody body = RequestBody.create(MediaType.parse("application/json"),		"""""");
Request request = new Request.Builder()		.url(urlBuilder.build())		.method("PATCH", body)		.addHeader("Content-Type", "application/json")		.addHeader("Authorization", Credentials.basic("your-email", "your-password"))		.build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {  method: 'PATCH',  url: 'https://example.zendesk.com/api/v2/custom_objects/car/fields/make',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "username:password"  },};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});
Python
import requests
url = "https://example.zendesk.com/api/v2/custom_objects/car/fields/make"headers = {	"Content-Type": "application/json",}
response = requests.request(	"PATCH",	url,	auth=('<username>', '<password>'),	headers=headers)
print(response.text)
Ruby
require "net/http"uri = URI("https://example.zendesk.com/api/v2/custom_objects/car/fields/make")request = Net::HTTP::Patch.new(uri, "Content-Type": "application/json")request.basic_auth "username", "password"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|	http.request(request)end
curl - Update a custom object field by key or id

For clarity, the example places the JSON in a separate file and imports it into the cURL statement

updated_field.json

{  "custom_object_field": {    "title": "Primary Color"  }}

curl - Update a custom object field by key or id snippet

curl https://{subdomain}.zendesk.com/api/v2/custom_objects/{custom_object_key}/fields/{custom_object_field_key_or_id}.json \-d @updated_field.json \-H "Content-Type: application/json" -X PATCH \-v -u {email_address}:{password}

Example response(s)

200 OK
// Status 200 OK
{  "custom_object_field": {    "active": true,    "created_at": "2022-09-07T23:21:59Z",    "description": "Make",    "id": 4398096842879,    "key": "make",    "position": 0,    "raw_description": "Make",    "raw_title": "Make",    "regexp_for_validation": null,    "system": false,    "title": "Make",    "type": "text",    "updated_at": "2022-09-07T23:22:00Z",    "url": "https://{subdomain}.zendesk.com/api/v2/custom_objects/car/fields.json?id=4398096842879"  }}

Delete Custom Object Field

  • DELETE /api/v2/custom_objects/{custom_object_key}/fields/{custom_object_field_key_or_id}

Deletes a field with the specified key. Note: You can't delete standard fields.

Allowed For

  • Admins

Parameters

NameTypeInRequiredDescription
custom_object_field_key_or_idstringPathtrueThe key or id of a custom object field
custom_object_keystringPathtrueThe key of a custom object

Code Samples

Curl
curl --request DELETE https://example.zendesk.com/api/v2/custom_objects/car/fields/make \--header "Content-Type: application/json" \-u username:password
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://example.zendesk.com/api/v2/custom_objects/car/fields/make"	method := "DELETE"	req, err := http.NewRequest(method, url, nil)
	if err != nil {		fmt.Println(err)		return	}	req.Header.Add("Content-Type", "application/json")	req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "username:password"
	client := &http.Client {}	res, err := client.Do(req)	if err != nil {		fmt.Println(err)		return	}	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)	if err != nil {		fmt.Println(err)		return	}	fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/custom_objects/car/fields/make")		.newBuilder();
Request request = new Request.Builder()		.url(urlBuilder.build())		.method("DELETE", null)		.addHeader("Content-Type", "application/json")		.addHeader("Authorization", Credentials.basic("your-email", "your-password"))		.build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {  method: 'DELETE',  url: 'https://example.zendesk.com/api/v2/custom_objects/car/fields/make',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "username:password"  },};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});
Python
import requests
url = "https://example.zendesk.com/api/v2/custom_objects/car/fields/make"headers = {	"Content-Type": "application/json",}
response = requests.request(	"DELETE",	url,	auth=('<username>', '<password>'),	headers=headers)
print(response.text)
Ruby
require "net/http"uri = URI("https://example.zendesk.com/api/v2/custom_objects/car/fields/make")request = Net::HTTP::Delete.new(uri, "Content-Type": "application/json")request.basic_auth "username", "password"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|	http.request(request)end
curl - Delete custom object field by key or id
curl https://{subdomain}.zendesk.com/api/v2/custom_objects/{custom_object_key}/fields/{custom_object_field_key_or_id}.json \  -X DELETE \  -v -u {email_address}:{password}

Example response(s)

204 No Content
// Status 204 No Content
null

Reorder Custom Fields of an Object

  • PUT /api/v2/custom_objects/{custom_object_key}/fields/reorder

Sets a preferred order of custom fields for a specific object by providing field ids in the desired order.

Allowed For

  • Admins

Parameters

NameTypeInRequiredDescription
custom_object_keystringPathtrueThe key of a custom object

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/custom_objects/{custom_object_key}/fields/reorder.json \  -d '{ "custom_object_field_ids": ["4398096843007", "4398096842879"] }' \  -H "Content-Type: application/json" -v -u {email_address}:{password} -X POST
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://example.zendesk.com/api/v2/custom_objects/car/fields/reorder"	method := "PUT"	req, err := http.NewRequest(method, url, nil)
	if err != nil {		fmt.Println(err)		return	}	req.Header.Add("Content-Type", "application/json")	req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "username:password"
	client := &http.Client {}	res, err := client.Do(req)	if err != nil {		fmt.Println(err)		return	}	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)	if err != nil {		fmt.Println(err)		return	}	fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/custom_objects/car/fields/reorder")		.newBuilder();RequestBody body = RequestBody.create(MediaType.parse("application/json"),		"""""");
Request request = new Request.Builder()		.url(urlBuilder.build())		.method("PUT", body)		.addHeader("Content-Type", "application/json")		.addHeader("Authorization", Credentials.basic("your-email", "your-password"))		.build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {  method: 'PUT',  url: 'https://example.zendesk.com/api/v2/custom_objects/car/fields/reorder',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "username:password"  },};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});
Python
import requests
url = "https://example.zendesk.com/api/v2/custom_objects/car/fields/reorder"headers = {	"Content-Type": "application/json",}
response = requests.request(	"PUT",	url,	auth=('<username>', '<password>'),	headers=headers)
print(response.text)
Ruby
require "net/http"uri = URI("https://example.zendesk.com/api/v2/custom_objects/car/fields/reorder")request = Net::HTTP::Put.new(uri, "Content-Type": "application/json")request.basic_auth "username", "password"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|	http.request(request)end

Example response(s)

200 OK
// Status 200 OK
null

Custom Object Fields Limit

  • GET /api/v2/custom_objects/{custom_object_key}/limits/field_limit

List the current count and the limit for a custom object's fields

Allowed For

  • Agents

Parameters

NameTypeInRequiredDescription
custom_object_keystringPathtrueThe key of a custom object

Code Samples

Curl
curl --request GET https://example.zendesk.com/api/v2/custom_objects/car/limits/field_limit \--header "Content-Type: application/json" \-u username:password
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://example.zendesk.com/api/v2/custom_objects/car/limits/field_limit"	method := "GET"	req, err := http.NewRequest(method, url, nil)
	if err != nil {		fmt.Println(err)		return	}	req.Header.Add("Content-Type", "application/json")	req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "username:password"
	client := &http.Client {}	res, err := client.Do(req)	if err != nil {		fmt.Println(err)		return	}	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)	if err != nil {		fmt.Println(err)		return	}	fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/custom_objects/car/limits/field_limit")		.newBuilder();
Request request = new Request.Builder()		.url(urlBuilder.build())		.method("GET", null)		.addHeader("Content-Type", "application/json")		.addHeader("Authorization", Credentials.basic("your-email", "your-password"))		.build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {  method: 'GET',  url: 'https://example.zendesk.com/api/v2/custom_objects/car/limits/field_limit',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "username:password"  },};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});
Python
import requests
url = "https://example.zendesk.com/api/v2/custom_objects/car/limits/field_limit"headers = {	"Content-Type": "application/json",}
response = requests.request(	"GET",	url,	auth=('<username>', '<password>'),	headers=headers)
print(response.text)
Ruby
require "net/http"uri = URI("https://example.zendesk.com/api/v2/custom_objects/car/limits/field_limit")request = Net::HTTP::Get.new(uri, "Content-Type": "application/json")request.basic_auth "username", "password"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|	http.request(request)end
curl - Get custom object fields limit
curl https://{subdomain}.zendesk.com/api/v2/custom_objects/{custom_object_key}/limits/field_limit \  -v -u {email_address}:{password}

Example response(s)

200 OK
// Status 200 OK
{  "count": 44,  "limit": 400}