Assets
In Zendesk IT asset management, assets are individual records of an asset type. These are physical or digital things that you procure, allocate, maintain, and retire. For example, IT teams often have hardware assets, such as laptops and monitors, and software licenses. An asset is the record of an individual laptop or software license.
JSON format
ITAM Assets are represented as JSON objects with the following properties:
| Name | Type | Read-only | Mandatory | Description |
|---|---|---|---|---|
| asset_tag | string | false | false | The tag for the asset |
| asset_type_id | string | true | true | Id of the asset type |
| created_at | string | true | false | The time the asset record was added |
| custom_field_values | object | false | false | User-defined custom asset fields and values |
| external_id | string | false | false | An id you can use to link an asset to external data |
| id | string | true | false | Automatically assigned upon creation |
| location_id | string | false | false | Id of the asset location |
| manufacturer | string | false | false | The asset's manufacturer name |
| model | string | false | false | The asset's model name |
| name | string | false | true | Display name for the asset |
| notes | string | false | false | The asset's notes |
| organization_id | integer | false | false | Id of the organization the asset is associated with |
| purchase_cost | number | false | false | The asset's purchase cost |
| purchase_date | string | false | false | The asset's purchase date |
| serial_number | string | false | false | The asset's serial number |
| status_id | string | false | true | Id of current status of the asset |
| updated_at | string | true | false | The time of the asset's last update |
| url | string | true | false | Direct link to the specific asset |
| user_id | integer | false | false | Id of the user the asset is assigned to |
| vendor | string | false | false | The asset's vendor name |
| warranty_expiration | string | false | false | The asset's warranty expiration date |
List Assets
GET /api/v2/it_asset_management/assets
Lists all assets for all asset types.
Pagination
- Cursor pagination only.
Allowed For
- Agents
Code Samples
Curl
curl --request GET https://example.zendesk.com/api/v2/it_asset_management/assets \--header "Content-Type: application/json" \-u {email_address}/token:{api_token}
Go
import ("fmt""io""net/http")func main() {url := "https://example.zendesk.com/api/v2/it_asset_management/assets"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 "{email_address}/token:{api_token}"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/it_asset_management/assets").newBuilder();String userCredentials = "your_email_address" + "/token:" + "your_api_token";String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());Request request = new Request.Builder().url(urlBuilder.build()).method("GET", null).addHeader("Content-Type", "application/json").addHeader("Authorization", basicAuth).build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var config = {method: 'GET',url: 'https://example.zendesk.com/api/v2/it_asset_management/assets',headers: {'Content-Type': 'application/json','Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"},};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsfrom requests.auth import HTTPBasicAuthurl = "https://example.zendesk.com/api/v2/it_asset_management/assets"headers = {"Content-Type": "application/json",}email_address = 'your_email_address'api_token = 'your_api_token'# Use basic authenticationauth = HTTPBasicAuth(f'{email_address}/token', api_token)response = requests.request("GET",url,auth=auth,headers=headers)print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://example.zendesk.com/api/v2/it_asset_management/assets")request = Net::HTTP::Get.new(uri, "Content-Type": "application/json")email = "your_email_address"api_token = "your_api_token"credentials = "#{email}/token:#{api_token}"encoded_credentials = Base64.strict_encode64(credentials)request["Authorization"] = "Basic #{encoded_credentials}"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
curl - Get assets
curl https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets \-v -u {email_address}/token:{api_token}
Example response(s)
200 OK
// Status 200 OK{"assets": [{"asset_tag": "loaner-ABC123XYZ","asset_type_id": "01K9BT5X0115ZVH1X6T37WYMTE","created_at": "2025-11-06T05:28:57Z","custom_field_values": {"compliance_state": null,"cpu_type": null,"device_ownership_type": null,"encryption_status": null,"enrollment_status": null,"firmware_version": null,"free_storage": null,"ip_address": "1.1.1.1","last_sign_in_timestamp": null,"last_sync_timestamp": null,"mac_address": null,"managed": "yes","operating_system": null,"os_version": null,"ram_total": "24Gb","storage_capacity": "1Tb","udid": null},"external_id": null,"id": "01K9BT7CVRJWP65442BWWCYAKV","location_id": null,"manufacturer": null,"model": null,"name": "My Laptop","notes": "Replacement out of cycle","organization_id": null,"purchase_cost": 999.99,"purchase_date": "2025-11-03","serial_number": "ABC123XYZ","status_id": "01K9BT5XE82QS5DG58F4J8WQWY","updated_at": "2025-11-06T05:39:35Z","url": "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/01K9BT7CVRJWP65442BWWCYAKV","user_id": null,"vendor": null,"warranty_expiration": "2026-11-03"},{"asset_tag": null,"asset_type_id": "01K9BT5X2VZQH191VYA3GQN7NY","created_at": "2025-11-06T05:29:19Z","custom_field_values": {"compliance_state": null,"cpu_type": null,"device_ownership_type": null,"encryption_status": null,"enrollment_status": null,"firmware_version": null,"free_storage": null,"ip_address": null,"last_sign_in_timestamp": null,"last_sync_timestamp": null,"mac_address": null,"managed": null,"operating_system": null,"os_version": null,"ram_total": null,"storage_capacity": null,"udid": null},"external_id": null,"id": "01K9BT82RZTDJ2V0MH3SG8ET4A","location_id": null,"manufacturer": null,"model": null,"name": "My Desktop","notes": null,"organization_id": null,"purchase_cost": null,"purchase_date": null,"serial_number": null,"status_id": "01K9BT5XGEVP3TGTZDZK14YZJQ","updated_at": "2025-11-06T05:29:19Z","url": "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/01K9BT82RZTDJ2V0MH3SG8ET4A","user_id": null,"vendor": null,"warranty_expiration": null}],"links": {"next": "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets?page%5Bafter%5D=eyJvIjoiLV9zY29yZSwtaWQiLCJ2IjoiYVFFQUFBQUFBQUFBY3hvQUFBQXdNVXRDUmxsWVJVc3lORUkzVVRCRVEwdEVXa1ZSTkRWQ1RRIn0","prev": null},"meta": {"after_cursor": "eyJvIjoiLV9zY29yZSwtaWQiLCJ2IjoiYVFFQUFBQUFBQUFBY3hvQUFBQXdNVXRDUmxsWVJVc3lORUkzVVRCRVEwdEVXa1ZSTkRWQ1RRIn0","before_cursor": null,"has_more": true}}
Search Assets
GET /api/v2/it_asset_management/assets/search?query={query}
Returns an array of assets with values in text-based fields that match the search query.
If the query includes multiple words or numbers, it's treated as a space-separated list of search terms and assets with values matching one or more of the terms are returned. For example, query=laptop Apple 2024 is encoded as query=laptop%20Apple%202024 and treated as three distinct search terms: laptop, Apple, and 2024. Every asset record with a text field containing 'laptop', 'Apple', or '2024' is returned.
If you need to search by more complex logic, use the Filtered Search API endpoint.
Pagination
- Cursor pagination only.
- Returns the assets sorted by relevancy with page limits. Without a
sortparameter, only the first 10,000 assets are returned. If your request includes asortparameter, all assets are returned.
Allowed For
- Agents
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| page[after] | string | Query | false | A pagination cursor that tells the endpoint which page to start on. It should be a meta.after_cursor value from a previous request. Note: page[before] and page[after] can't be used together in the same request. |
| page[before] | string | Query | false | A pagination cursor that tells the endpoint which page to start on. It should be a meta.before_cursor value from a previous request. Note: page[before] and page[after] can't be used together in the same request. |
| page[size] | integer | Query | false | Specifies how many assets should be returned in the response, up to 100 assets per page. |
| query | string | Query | true | Lists the search terms, separated by a space, used to identify the asset records. |
| sort | string | Query | false | Orders the returned records by: name, created_at, or updated_at. Defaults to sorting by relevance. Prepending - (-name, -created_at, or -updated_at) sorts the results in descending order by that value. |
Code Samples
Curl
curl -G "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/search" \--data-urlencode "query=laptop" \-v -u {email_address}/token:{api_token}
Go
import ("fmt""io""net/http")func main() {url := "https://example.zendesk.com/api/v2/it_asset_management/assets/search?page[after]=&page[before]=&page[size]=&query=laptop&sort="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 "{email_address}/token:{api_token}"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/it_asset_management/assets/search").newBuilder().addQueryParameter("page[after]", "").addQueryParameter("page[before]", "").addQueryParameter("page[size]", "").addQueryParameter("query", "laptop").addQueryParameter("sort", "");String userCredentials = "your_email_address" + "/token:" + "your_api_token";String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());Request request = new Request.Builder().url(urlBuilder.build()).method("GET", null).addHeader("Content-Type", "application/json").addHeader("Authorization", basicAuth).build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var config = {method: 'GET',url: 'https://example.zendesk.com/api/v2/it_asset_management/assets/search',headers: {'Content-Type': 'application/json','Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"},params: {'page[after]': '','page[before]': '','page[size]': '','query': 'laptop','sort': '',},};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsfrom requests.auth import HTTPBasicAuthurl = "https://example.zendesk.com/api/v2/it_asset_management/assets/search?page[after]=&page[before]=&page[size]=&query=laptop&sort="headers = {"Content-Type": "application/json",}email_address = 'your_email_address'api_token = 'your_api_token'# Use basic authenticationauth = HTTPBasicAuth(f'{email_address}/token', api_token)response = requests.request("GET",url,auth=auth,headers=headers)print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://example.zendesk.com/api/v2/it_asset_management/assets/search")uri.query = URI.encode_www_form("page[after]": "", "page[before]": "", "page[size]": "", "query": "laptop", "sort": "")request = Net::HTTP::Get.new(uri, "Content-Type": "application/json")email = "your_email_address"api_token = "your_api_token"credentials = "#{email}/token:#{api_token}"encoded_credentials = Base64.strict_encode64(credentials)request["Authorization"] = "Basic #{encoded_credentials}"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
curl - Search assets matching Apple
curl -G "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/search" \--data-urlencode "query=Apple" \-v -u {email_address}/token:{api_token}
curl - Search assets matching laptop, sorted by name descending
curl -G "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/search" \--data-urlencode "query=laptop" \--data-urlencode "sort=-name" \-v -u {email_address}/token:{api_token}
curl - Search assets matching laptop, 10 per page
curl -G "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/search" \--data-urlencode "query=laptop" \--data-urlencode "page[size]=10" \-v -u {email_address}/token:{api_token}
Example response(s)
200 OK
// Status 200 OK{"assets": [{"asset_tag": "loaner-ABC123XYZ","asset_type_id": "01K9BT5X0115ZVH1X6T37WYMTE","created_at": "2025-11-06T05:28:57Z","custom_field_values": {"ip_address": "1.1.1.1","managed": "yes","ram_total": "24Gb","storage_capacity": "1Tb"},"external_id": null,"id": "01K9BT7CVRJWP65442BWWCYAKV","location_id": null,"manufacturer": "Apple","model": "MacBook Pro","name": "My Laptop","notes": "Replacement out of cycle","organization_id": null,"purchase_cost": 999.99,"purchase_date": "2025-11-03","serial_number": "ABC123XYZ","status_id": "01K9BT5XE82QS5DG58F4J8WQWY","updated_at": "2025-11-06T05:39:35Z","url": "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/01K9BT7CVRJWP65442BWWCYAKV","user_id": null,"vendor": "Apple Store","warranty_expiration": "2026-11-03"},{"asset_tag": null,"asset_type_id": "01K9BT5X2VZQH191VYA3GQN7NY","created_at": "2025-11-06T05:29:19Z","custom_field_values": {"ip_address": "10.0.0.5","managed": "no"},"external_id": null,"id": "01K9BT82RZTDJ2V0MH3SG8ET4A","location_id": null,"manufacturer": "Dell","model": "OptiPlex 7090","name": "My Desktop","notes": null,"organization_id": null,"purchase_cost": null,"purchase_date": null,"serial_number": null,"status_id": "01K9BT5XGEVP3TGTZDZK14YZJQ","updated_at": "2025-11-06T05:29:19Z","url": "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/01K9BT82RZTDJ2V0MH3SG8ET4A","user_id": null,"vendor": null,"warranty_expiration": null}],"links": {"next": "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/search?page%5Bafter%5D=eyJvIjoiLV9zY29yZSwtaWQiLCJ2IjoiYVFFQUFBQUFBQUFBY3hvQUFBQXdNVXRDUmxsWVJVc3lORUkzVVRCRVEwdEVXa1ZSTkRWQ1RRIn0&query=laptop","prev": null},"meta": {"after_cursor": "eyJvIjoiLV9zY29yZSwtaWQiLCJ2IjoiYVFFQUFBQUFBQUFBY3hvQUFBQXdNVXRDUmxsWVJVc3lORUkzVVRCRVEwdEVXa1ZSTkRWQ1RRIn0","before_cursor": null,"has_more": true}}
Filtered Search of Assets
POST /api/v2/it_asset_management/assets/search
Returns an array of assets that meet the complex search and filter criteria. For simple searches limited to text fields, use the Search Assets API endpoint instead.
Filters can contain either an individual comparison object or an array of comparison objects within logical namespaces.
A filter is a JSON object that has the following properties:
| Name | Type | Required | Description |
|---|---|---|---|
| ATTRIBUTE | object | no | A comparison object specifying an attribute value condition to be met for assets to match. Examples are marked below. |
| $and | array | no | Array of comparison objects combined using logical AND |
| $or | array | no | Array of comparison objects combined using logical OR |
Examples
{"filter": {"model": { "$eq": "MacBook Pro" } // ATTRIBUTE (standard field)}}
{"filter": {"custom_object_fields.ip_address": { "$eq": "192.168.1.1" } // ATTRIBUTE (custom field)}}
// $or{"filter": {"$or": [{ "model": { "$eq": "MacBook Pro" } }, // ATTRIBUTE{ "model": { "$eq": "ThinkPad X1" } } // ATTRIBUTE]}}
Comparison Object
A comparison object is essentially an 'if' statement that returns all asset records that meet the specified condition. Conditions are based on attribute values.
A comparison object is a JSON object that has the following properties:
| Name | Type | Required | Description |
|---|---|---|---|
| FIELD_KEY | string | yes | To filter on a custom asset field, you must prepend custom_object_fields. on the field key. For example: custom_object_fields.ip_addressThe following standard asset fields can be used without needing to prepend a namespace: asset_type, user, organization, location, model, purchase_date, status |
| OPERATOR | string | yes | A comparison operator, such as $eq |
| VALUE | string, array | yes | The value you're filtering for |
- Date values should be in ISO 8601 format.
Pagination
- Cursor pagination only.
- Returns the assets sorted by relevancy with page limits. Requests with a
sortparameter return all assets; requests without asortparameter return the first 10,000 assets only.
Allowed For
- Agents
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| page[after] | string | Query | false | A pagination cursor that tells the endpoint which page to start on. It should be a meta.after_cursor value from a previous request. Note: page[before] and page[after] can't be used together in the same request |
| page[before] | string | Query | false | A pagination cursor that tells the endpoint which page to start on. It should be a meta.before_cursor value from a previous request. Note: page[before] and page[after] can't be used together in the same request |
| page[size] | integer | Query | false | Specifies how many assets should be returned in the response, up to 100 assets per page. |
| query | string | Query | false | Lists the search terms, separated by a space, used to identify the asset records. |
| sort | string | Query | false | Orders the returned records by: name, created_at, or updated_at. Defaults to sorting by relevance. Prepending - (-name, -created_at, or -updated_at) sorts the results in descending order by that value. |
Example body
{"filter": {"$and": [{"model": {"$eq": "MacBook Pro"}},{"status": {"$eq": "01K9BT5XE82QS5DG58F4J8WQWY"}}],"$or": [{"custom_object_fields.ip_address": {"$eq": "192.168.1.1"}},{"custom_object_fields.ip_address": {"$eq": "10.0.0.5"}}]}}
Code Samples
Curl
curl --request POST https://example.zendesk.com/api/v2/it_asset_management/assets/search?page[after]=&page[before]=&page[size]=&query=laptop&sort= \--header "Content-Type: application/json" \-u {email_address}/token:{api_token} \--data-raw '{"filter": {"$and": [{"model": {"$eq": "MacBook Pro"}},{"status": {"$eq": "01K9BT5XE82QS5DG58F4J8WQWY"}}],"$or": [{"custom_object_fields.ip_address": {"$eq": "192.168.1.1"}},{"custom_object_fields.ip_address": {"$eq": "10.0.0.5"}}]}}'
Go
import ("fmt""io""net/http""strings")func main() {url := "https://example.zendesk.com/api/v2/it_asset_management/assets/search?page[after]=&page[before]=&page[size]=&query=laptop&sort="method := "POST"payload := strings.NewReader(`{"filter": {"$and": [{"model": {"$eq": "MacBook Pro"}},{"status": {"$eq": "01K9BT5XE82QS5DG58F4J8WQWY"}}],"$or": [{"custom_object_fields.ip_address": {"$eq": "192.168.1.1"}},{"custom_object_fields.ip_address": {"$eq": "10.0.0.5"}}]}}`)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 "{email_address}/token:{api_token}"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/it_asset_management/assets/search").newBuilder().addQueryParameter("page[after]", "").addQueryParameter("page[before]", "").addQueryParameter("page[size]", "").addQueryParameter("query", "laptop").addQueryParameter("sort", "");RequestBody body = RequestBody.create(MediaType.parse("application/json"),"""{\"filter\": {\"$and\": [{\"model\": {\"$eq\": \"MacBook Pro\"}},{\"status\": {\"$eq\": \"01K9BT5XE82QS5DG58F4J8WQWY\"}}],\"$or\": [{\"custom_object_fields.ip_address\": {\"$eq\": \"192.168.1.1\"}},{\"custom_object_fields.ip_address\": {\"$eq\": \"10.0.0.5\"}}]}}""");String userCredentials = "your_email_address" + "/token:" + "your_api_token";String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());Request request = new Request.Builder().url(urlBuilder.build()).method("POST", body).addHeader("Content-Type", "application/json").addHeader("Authorization", basicAuth).build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var data = JSON.stringify({"filter": {"$and": [{"model": {"$eq": "MacBook Pro"}},{"status": {"$eq": "01K9BT5XE82QS5DG58F4J8WQWY"}}],"$or": [{"custom_object_fields.ip_address": {"$eq": "192.168.1.1"}},{"custom_object_fields.ip_address": {"$eq": "10.0.0.5"}}]}});var config = {method: 'POST',url: 'https://example.zendesk.com/api/v2/it_asset_management/assets/search',headers: {'Content-Type': 'application/json','Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"},params: {'page[after]': '','page[before]': '','page[size]': '','query': 'laptop','sort': '',},data : data,};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsimport jsonfrom requests.auth import HTTPBasicAuthurl = "https://example.zendesk.com/api/v2/it_asset_management/assets/search?page[after]=&page[before]=&page[size]=&query=laptop&sort="payload = json.loads("""{"filter": {"$and": [{"model": {"$eq": "MacBook Pro"}},{"status": {"$eq": "01K9BT5XE82QS5DG58F4J8WQWY"}}],"$or": [{"custom_object_fields.ip_address": {"$eq": "192.168.1.1"}},{"custom_object_fields.ip_address": {"$eq": "10.0.0.5"}}]}}""")headers = {"Content-Type": "application/json",}email_address = 'your_email_address'api_token = 'your_api_token'# Use basic authenticationauth = HTTPBasicAuth(f'{email_address}/token', api_token)response = requests.request("POST",url,auth=auth,headers=headers,json=payload)print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://example.zendesk.com/api/v2/it_asset_management/assets/search")uri.query = URI.encode_www_form("page[after]": "", "page[before]": "", "page[size]": "", "query": "laptop", "sort": "")request = Net::HTTP::Post.new(uri, "Content-Type": "application/json")request.body = %q({"filter": {"$and": [{"model": {"$eq": "MacBook Pro"}},{"status": {"$eq": "01K9BT5XE82QS5DG58F4J8WQWY"}}],"$or": [{"custom_object_fields.ip_address": {"$eq": "192.168.1.1"}},{"custom_object_fields.ip_address": {"$eq": "10.0.0.5"}}]}})email = "your_email_address"api_token = "your_api_token"credentials = "#{email}/token:#{api_token}"encoded_credentials = Base64.strict_encode64(credentials)request["Authorization"] = "Basic #{encoded_credentials}"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
curl - Get assets with model matching MacBook Pro
curl "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/search" \-d '{"filter": {"model": { "$eq": "MacBook Pro" }}}'\-v -u {email_address}/token:{api_token}
curl - Get assets matching a custom field value
curl "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/search" \-d '{"filter": {"custom_object_fields.ip_address": { "$eq": "192.168.1.1" }}}' \-v -u {email_address}/token:{api_token}
curl - Get assets with model matching MacBook Pro or ThinkPad X1
curl "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/search" \-d '{"filter": {"$or": [{ "model": { "$eq": "MacBook Pro" } },{ "model": { "$eq": "ThinkPad X1" } }]}}' \-v -u {email_address}/token:{api_token}
curl - Get assets assigned to a user and in a specific location
curl "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/search" \-d '{"filter": {"$and": [{ "user": { "$eq": "10001" } },{ "location": { "$eq": "01K9BT5X0115ZVH1X6T37WYMTE" } }]}}' \-v -u {email_address}/token:{api_token}
Example response(s)
200 OK
// Status 200 OK{"assets": [{"asset_tag": "loaner-ABC123XYZ","asset_type_id": "01K9BT5X0115ZVH1X6T37WYMTE","created_at": "2025-11-06T05:28:57Z","custom_field_values": {"ip_address": "1.1.1.1","managed": "yes","ram_total": "24Gb","storage_capacity": "1Tb"},"external_id": null,"id": "01K9BT7CVRJWP65442BWWCYAKV","location_id": null,"manufacturer": "Apple","model": "MacBook Pro","name": "My Laptop","notes": "Replacement out of cycle","organization_id": null,"purchase_cost": 999.99,"purchase_date": "2025-11-03","serial_number": "ABC123XYZ","status_id": "01K9BT5XE82QS5DG58F4J8WQWY","updated_at": "2025-11-06T05:39:35Z","url": "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/01K9BT7CVRJWP65442BWWCYAKV","user_id": null,"vendor": "Apple Store","warranty_expiration": "2026-11-03"},{"asset_tag": null,"asset_type_id": "01K9BT5X2VZQH191VYA3GQN7NY","created_at": "2025-11-06T05:29:19Z","custom_field_values": {"ip_address": "10.0.0.5","managed": "no"},"external_id": null,"id": "01K9BT82RZTDJ2V0MH3SG8ET4A","location_id": null,"manufacturer": "Dell","model": "OptiPlex 7090","name": "My Desktop","notes": null,"organization_id": null,"purchase_cost": null,"purchase_date": null,"serial_number": null,"status_id": "01K9BT5XGEVP3TGTZDZK14YZJQ","updated_at": "2025-11-06T05:29:19Z","url": "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/01K9BT82RZTDJ2V0MH3SG8ET4A","user_id": null,"vendor": null,"warranty_expiration": null}],"links": {"next": "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/search?page%5Bafter%5D=eyJvIjoiLV9zY29yZSwtaWQiLCJ2IjoiYVFFQUFBQUFBQUFBY3hvQUFBQXdNVXRDUmxsWVJVc3lORUkzVVRCRVEwdEVXa1ZSTkRWQ1RRIn0&query=laptop","prev": null},"meta": {"after_cursor": "eyJvIjoiLV9zY29yZSwtaWQiLCJ2IjoiYVFFQUFBQUFBQUFBY3hvQUFBQXdNVXRDUmxsWVJVc3lORUkzVVRCRVEwdEVXa1ZSTkRWQ1RRIn0","before_cursor": null,"has_more": true}}
Show Asset
GET /api/v2/it_asset_management/assets/{asset_id}
Returns the asset with the specified id.
Allowed For
- Agents
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| asset_id | string | Path | true | The id of the asset |
Code Samples
Curl
curl --request GET https://example.zendesk.com/api/v2/it_asset_management/assets/01K9AMAPSER316NHTJ2R36YAQ1 \--header "Content-Type: application/json" \-u {email_address}/token:{api_token}
Go
import ("fmt""io""net/http")func main() {url := "https://example.zendesk.com/api/v2/it_asset_management/assets/01K9AMAPSER316NHTJ2R36YAQ1"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 "{email_address}/token:{api_token}"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/it_asset_management/assets/01K9AMAPSER316NHTJ2R36YAQ1").newBuilder();String userCredentials = "your_email_address" + "/token:" + "your_api_token";String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());Request request = new Request.Builder().url(urlBuilder.build()).method("GET", null).addHeader("Content-Type", "application/json").addHeader("Authorization", basicAuth).build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var config = {method: 'GET',url: 'https://example.zendesk.com/api/v2/it_asset_management/assets/01K9AMAPSER316NHTJ2R36YAQ1',headers: {'Content-Type': 'application/json','Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"},};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsfrom requests.auth import HTTPBasicAuthurl = "https://example.zendesk.com/api/v2/it_asset_management/assets/01K9AMAPSER316NHTJ2R36YAQ1"headers = {"Content-Type": "application/json",}email_address = 'your_email_address'api_token = 'your_api_token'# Use basic authenticationauth = HTTPBasicAuth(f'{email_address}/token', api_token)response = requests.request("GET",url,auth=auth,headers=headers)print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://example.zendesk.com/api/v2/it_asset_management/assets/01K9AMAPSER316NHTJ2R36YAQ1")request = Net::HTTP::Get.new(uri, "Content-Type": "application/json")email = "your_email_address"api_token = "your_api_token"credentials = "#{email}/token:#{api_token}"encoded_credentials = Base64.strict_encode64(credentials)request["Authorization"] = "Basic #{encoded_credentials}"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
curl - Get asset by id
curl https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/{asset_id} \-v -u {email_address}/token:{api_token}
Example response(s)
200 OK
// Status 200 OK{"asset": {"asset_tag": "loaner-ABC123XYZ","asset_type_id": "01K9BT5X0115ZVH1X6T37WYMTE","created_at": "2025-11-06T05:28:57Z","custom_field_values": {"compliance_state": null,"cpu_type": null,"device_ownership_type": null,"encryption_status": null,"enrollment_status": null,"firmware_version": null,"free_storage": null,"ip_address": "1.1.1.1","last_sign_in_timestamp": null,"last_sync_timestamp": null,"mac_address": null,"managed": "yes","operating_system": null,"os_version": null,"ram_total": "24Gb","storage_capacity": "1Tb","udid": null},"external_id": null,"id": "01K9BT7CVRJWP65442BWWCYAKV","location_id": null,"manufacturer": null,"model": null,"name": "My Laptop","notes": "Replacement out of cycle","organization_id": null,"purchase_cost": 999.99,"purchase_date": "2025-11-03","serial_number": "ABC123XYZ","status_id": "01K9BT5XE82QS5DG58F4J8WQWY","updated_at": "2025-11-06T05:39:35Z","url": "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/01K9BT7CVRJWP65442BWWCYAKV","user_id": null,"vendor": null,"warranty_expiration": "2026-11-03"}}
Create Asset
POST /api/v2/it_asset_management/assets
Creates an asset.
Allowed For
- Admins
Example body
{"asset": {"asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","custom_field_values": {"ip_address": "1.2.3.4"},"name": "Laptop 1","notes": "Replacing a laptop for someone","status_id": "01K9BW8DD6Z2N7TXM313N8BR69"}}
Code Samples
Curl
curl --request POST https://example.zendesk.com/api/v2/it_asset_management/assets \--header "Content-Type: application/json" \-u {email_address}/token:{api_token} \--data-raw '{"asset": {"asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","custom_field_values": {"ip_address": "1.2.3.4"},"name": "Laptop 1","notes": "Replacing a laptop for someone","status_id": "01K9BW8DD6Z2N7TXM313N8BR69"}}'
Go
import ("fmt""io""net/http""strings")func main() {url := "https://example.zendesk.com/api/v2/it_asset_management/assets"method := "POST"payload := strings.NewReader(`{"asset": {"asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","custom_field_values": {"ip_address": "1.2.3.4"},"name": "Laptop 1","notes": "Replacing a laptop for someone","status_id": "01K9BW8DD6Z2N7TXM313N8BR69"}}`)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 "{email_address}/token:{api_token}"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/it_asset_management/assets").newBuilder();RequestBody body = RequestBody.create(MediaType.parse("application/json"),"""{\"asset\": {\"asset_type_id\": \"01K9BW852KHGF59W0TM02J2F6H\",\"custom_field_values\": {\"ip_address\": \"1.2.3.4\"},\"name\": \"Laptop 1\",\"notes\": \"Replacing a laptop for someone\",\"status_id\": \"01K9BW8DD6Z2N7TXM313N8BR69\"}}""");String userCredentials = "your_email_address" + "/token:" + "your_api_token";String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());Request request = new Request.Builder().url(urlBuilder.build()).method("POST", body).addHeader("Content-Type", "application/json").addHeader("Authorization", basicAuth).build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var data = JSON.stringify({"asset": {"asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","custom_field_values": {"ip_address": "1.2.3.4"},"name": "Laptop 1","notes": "Replacing a laptop for someone","status_id": "01K9BW8DD6Z2N7TXM313N8BR69"}});var config = {method: 'POST',url: 'https://example.zendesk.com/api/v2/it_asset_management/assets',headers: {'Content-Type': 'application/json','Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"},data : data,};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsimport jsonfrom requests.auth import HTTPBasicAuthurl = "https://example.zendesk.com/api/v2/it_asset_management/assets"payload = json.loads("""{"asset": {"asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","custom_field_values": {"ip_address": "1.2.3.4"},"name": "Laptop 1","notes": "Replacing a laptop for someone","status_id": "01K9BW8DD6Z2N7TXM313N8BR69"}}""")headers = {"Content-Type": "application/json",}email_address = 'your_email_address'api_token = 'your_api_token'# Use basic authenticationauth = HTTPBasicAuth(f'{email_address}/token', api_token)response = requests.request("POST",url,auth=auth,headers=headers,json=payload)print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://example.zendesk.com/api/v2/it_asset_management/assets")request = Net::HTTP::Post.new(uri, "Content-Type": "application/json")request.body = %q({"asset": {"asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","custom_field_values": {"ip_address": "1.2.3.4"},"name": "Laptop 1","notes": "Replacing a laptop for someone","status_id": "01K9BW8DD6Z2N7TXM313N8BR69"}})email = "your_email_address"api_token = "your_api_token"credentials = "#{email}/token:#{api_token}"encoded_credentials = Base64.strict_encode64(credentials)request["Authorization"] = "Basic #{encoded_credentials}"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
curl - Create asset
For clarity, the example places the JSON in a separate file and imports it into the cURL statement
my_asset.json
{"asset": {"name": "Laptop","custom_field_values": {"manufacturer": "Apple","model": "MacBookPro18,1"}}}
curl - Create asset snippet
curl https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets \-d @my_asset.json \-H "Content-Type: application/json" -v -u {email_address}/token:{api_token} -X POST
Example response(s)
201 Created
// Status 201 Created{"asset": {"asset_tag": "loaner-ABC123XYZ","asset_type_id": "01K9BT5X0115ZVH1X6T37WYMTE","created_at": "2025-11-06T05:28:57Z","custom_field_values": {"compliance_state": null,"cpu_type": null,"device_ownership_type": null,"encryption_status": null,"enrollment_status": null,"firmware_version": null,"free_storage": null,"ip_address": "1.1.1.1","last_sign_in_timestamp": null,"last_sync_timestamp": null,"mac_address": null,"managed": "yes","operating_system": null,"os_version": null,"ram_total": "24Gb","storage_capacity": "1Tb","udid": null},"external_id": null,"id": "01K9BT7CVRJWP65442BWWCYAKV","location_id": null,"manufacturer": null,"model": null,"name": "My Laptop","notes": "Replacement out of cycle","organization_id": null,"purchase_cost": 999.99,"purchase_date": "2025-11-03","serial_number": "ABC123XYZ","status_id": "01K9BT5XE82QS5DG58F4J8WQWY","updated_at": "2025-11-06T05:39:35Z","url": "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/01K9BT7CVRJWP65442BWWCYAKV","user_id": null,"vendor": null,"warranty_expiration": "2026-11-03"}}
Update Asset
PATCH /api/v2/it_asset_management/assets/{asset_id}
Updates an individual asset. This request takes an asset object that specifies the properties to update, with custom field values nested within a custom_field_values object. Values are updated only for the properties specified in the request. Any asset properties that aren't specified in the request are unaffected, and their values are preserved for the asset.
Allowed For
- Admins
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| asset_id | string | Path | true | The id of the asset |
Code Samples
Curl
curl --request PATCH https://example.zendesk.com/api/v2/it_asset_management/assets/01K9AMAPSER316NHTJ2R36YAQ1 \--header "Content-Type: application/json" \-u {email_address}/token:{api_token}
Go
import ("fmt""io""net/http")func main() {url := "https://example.zendesk.com/api/v2/it_asset_management/assets/01K9AMAPSER316NHTJ2R36YAQ1"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 "{email_address}/token:{api_token}"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/it_asset_management/assets/01K9AMAPSER316NHTJ2R36YAQ1").newBuilder();RequestBody body = RequestBody.create(MediaType.parse("application/json"),"""""");String userCredentials = "your_email_address" + "/token:" + "your_api_token";String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());Request request = new Request.Builder().url(urlBuilder.build()).method("PATCH", body).addHeader("Content-Type", "application/json").addHeader("Authorization", basicAuth).build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var config = {method: 'PATCH',url: 'https://example.zendesk.com/api/v2/it_asset_management/assets/01K9AMAPSER316NHTJ2R36YAQ1',headers: {'Content-Type': 'application/json','Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"},};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsfrom requests.auth import HTTPBasicAuthurl = "https://example.zendesk.com/api/v2/it_asset_management/assets/01K9AMAPSER316NHTJ2R36YAQ1"headers = {"Content-Type": "application/json",}email_address = 'your_email_address'api_token = 'your_api_token'# Use basic authenticationauth = HTTPBasicAuth(f'{email_address}/token', api_token)response = requests.request("PATCH",url,auth=auth,headers=headers)print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://example.zendesk.com/api/v2/it_asset_management/assets/01K9AMAPSER316NHTJ2R36YAQ1")request = Net::HTTP::Patch.new(uri, "Content-Type": "application/json")email = "your_email_address"api_token = "your_api_token"credentials = "#{email}/token:#{api_token}"encoded_credentials = Base64.strict_encode64(credentials)request["Authorization"] = "Basic #{encoded_credentials}"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
curl - Update asset by id
For clarity, the example places the JSON in a separate file and imports it into the cURL statement
updated_asset.json
{"asset": {"notes": "Updating an asset","custom_field_values": {"managed": "no","ip_address": "1.2.3.4"}}}
curl - Update asset by id snippet
curl https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/{asset_id} \-d @updated_asset.json \-H "Content-Type: application/json" -X PATCH \-v -u {email_address}/token:{api_token}
Example response(s)
200 OK
// Status 200 OK{"asset": {"asset_tag": "loaner-ABC123XYZ","asset_type_id": "01K9BT5X0115ZVH1X6T37WYMTE","created_at": "2025-11-06T05:28:57Z","custom_field_values": {"compliance_state": null,"cpu_type": null,"device_ownership_type": null,"encryption_status": null,"enrollment_status": null,"firmware_version": null,"free_storage": null,"ip_address": "1.1.1.1","last_sign_in_timestamp": null,"last_sync_timestamp": null,"mac_address": null,"managed": "yes","operating_system": null,"os_version": null,"ram_total": "24Gb","storage_capacity": "1Tb","udid": null},"external_id": null,"id": "01K9BT7CVRJWP65442BWWCYAKV","location_id": null,"manufacturer": null,"model": null,"name": "My Laptop","notes": "Replacement out of cycle","organization_id": null,"purchase_cost": 999.99,"purchase_date": "2025-11-03","serial_number": "ABC123XYZ","status_id": "01K9BT5XE82QS5DG58F4J8WQWY","updated_at": "2025-11-06T05:39:35Z","url": "https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/01K9BT7CVRJWP65442BWWCYAKV","user_id": null,"vendor": null,"warranty_expiration": "2026-11-03"}}
Delete Asset
DELETE /api/v2/it_asset_management/assets/{asset_id}
Deletes an asset with the specified id.
Allowed For
- Admins
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| asset_id | string | Path | true | The id of the asset |
Code Samples
Curl
curl --request DELETE https://example.zendesk.com/api/v2/it_asset_management/assets/01K9AMAPSER316NHTJ2R36YAQ1 \--header "Content-Type: application/json" \-u {email_address}/token:{api_token}
Go
import ("fmt""io""net/http")func main() {url := "https://example.zendesk.com/api/v2/it_asset_management/assets/01K9AMAPSER316NHTJ2R36YAQ1"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 "{email_address}/token:{api_token}"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/it_asset_management/assets/01K9AMAPSER316NHTJ2R36YAQ1").newBuilder();String userCredentials = "your_email_address" + "/token:" + "your_api_token";String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());Request request = new Request.Builder().url(urlBuilder.build()).method("DELETE", null).addHeader("Content-Type", "application/json").addHeader("Authorization", basicAuth).build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var config = {method: 'DELETE',url: 'https://example.zendesk.com/api/v2/it_asset_management/assets/01K9AMAPSER316NHTJ2R36YAQ1',headers: {'Content-Type': 'application/json','Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"},};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsfrom requests.auth import HTTPBasicAuthurl = "https://example.zendesk.com/api/v2/it_asset_management/assets/01K9AMAPSER316NHTJ2R36YAQ1"headers = {"Content-Type": "application/json",}email_address = 'your_email_address'api_token = 'your_api_token'# Use basic authenticationauth = HTTPBasicAuth(f'{email_address}/token', api_token)response = requests.request("DELETE",url,auth=auth,headers=headers)print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://example.zendesk.com/api/v2/it_asset_management/assets/01K9AMAPSER316NHTJ2R36YAQ1")request = Net::HTTP::Delete.new(uri, "Content-Type": "application/json")email = "your_email_address"api_token = "your_api_token"credentials = "#{email}/token:#{api_token}"encoded_credentials = Base64.strict_encode64(credentials)request["Authorization"] = "Basic #{encoded_credentials}"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
curl - Delete asset by id
curl https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/{asset_id} \-X DELETE \-v -u {email_address}/token:{api_token}
Example response(s)
204 No Content
// Status 204 No Contentnull
Asset Bulk Jobs
POST /api/v2/it_asset_management/assets/jobs
Queues a background job to perform bulk actions on up to 100 asset records per request.
Takes a job object with two nested fields:
action, one of:"create""update""delete""delete_by_external_id"
items- For a
"create"action, an array of JSON objects representing the assets being created - For an
"update"action, an array of JSON objects representing the assets being updated (must includeidattribute) - For a
"delete"action, an array of strings representing Zendesk asset ids - For a
"delete_by_external_id"action, an array of strings representing external ids
- For a
Note: For create and update actions, the asset_type_id, status_id, and location_id fields can be specified using either the ID or the name of the resource. For example, you can use "asset_type_id": "01K9BW852KHGF59W0TM02J2F6H" or "asset_type": "Laptop".
Allowed For
- Admins
Response
This endpoint returns a job_status JSON object and queues a background job to do the work. Use the Show Job Status endpoint to check for the job's completion. Only a certain number of jobs can be queued or running at the same time. See Job limit for more information.
Example body
{"job": {"action": "create","items": [{"asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","custom_field_values": {"manufacturer": "Apple","model": "MacBookPro18,1"},"name": "Laptop 1","status_id": "01K9BW8DD6Z2N7TXM313N8BR69"},{"asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","custom_field_values": {"manufacturer": "Dell","model": "XPS 15"},"name": "Laptop 2","status_id": "01K9BW8DD6Z2N7TXM313N8BR69"}]}}
Code Samples
Curl
curl --request POST https://example.zendesk.com/api/v2/it_asset_management/assets/jobs \--header "Content-Type: application/json" \-u {email_address}/token:{api_token} \--data-raw '{"job": {"action": "create","items": [{"asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","custom_field_values": {"manufacturer": "Apple","model": "MacBookPro18,1"},"name": "Laptop 1","status_id": "01K9BW8DD6Z2N7TXM313N8BR69"},{"asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","custom_field_values": {"manufacturer": "Dell","model": "XPS 15"},"name": "Laptop 2","status_id": "01K9BW8DD6Z2N7TXM313N8BR69"}]}}'
Go
import ("fmt""io""net/http""strings")func main() {url := "https://example.zendesk.com/api/v2/it_asset_management/assets/jobs"method := "POST"payload := strings.NewReader(`{"job": {"action": "create","items": [{"asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","custom_field_values": {"manufacturer": "Apple","model": "MacBookPro18,1"},"name": "Laptop 1","status_id": "01K9BW8DD6Z2N7TXM313N8BR69"},{"asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","custom_field_values": {"manufacturer": "Dell","model": "XPS 15"},"name": "Laptop 2","status_id": "01K9BW8DD6Z2N7TXM313N8BR69"}]}}`)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 "{email_address}/token:{api_token}"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/it_asset_management/assets/jobs").newBuilder();RequestBody body = RequestBody.create(MediaType.parse("application/json"),"""{\"job\": {\"action\": \"create\",\"items\": [{\"asset_type_id\": \"01K9BW852KHGF59W0TM02J2F6H\",\"custom_field_values\": {\"manufacturer\": \"Apple\",\"model\": \"MacBookPro18,1\"},\"name\": \"Laptop 1\",\"status_id\": \"01K9BW8DD6Z2N7TXM313N8BR69\"},{\"asset_type_id\": \"01K9BW852KHGF59W0TM02J2F6H\",\"custom_field_values\": {\"manufacturer\": \"Dell\",\"model\": \"XPS 15\"},\"name\": \"Laptop 2\",\"status_id\": \"01K9BW8DD6Z2N7TXM313N8BR69\"}]}}""");String userCredentials = "your_email_address" + "/token:" + "your_api_token";String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());Request request = new Request.Builder().url(urlBuilder.build()).method("POST", body).addHeader("Content-Type", "application/json").addHeader("Authorization", basicAuth).build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var data = JSON.stringify({"job": {"action": "create","items": [{"asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","custom_field_values": {"manufacturer": "Apple","model": "MacBookPro18,1"},"name": "Laptop 1","status_id": "01K9BW8DD6Z2N7TXM313N8BR69"},{"asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","custom_field_values": {"manufacturer": "Dell","model": "XPS 15"},"name": "Laptop 2","status_id": "01K9BW8DD6Z2N7TXM313N8BR69"}]}});var config = {method: 'POST',url: 'https://example.zendesk.com/api/v2/it_asset_management/assets/jobs',headers: {'Content-Type': 'application/json','Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"},data : data,};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsimport jsonfrom requests.auth import HTTPBasicAuthurl = "https://example.zendesk.com/api/v2/it_asset_management/assets/jobs"payload = json.loads("""{"job": {"action": "create","items": [{"asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","custom_field_values": {"manufacturer": "Apple","model": "MacBookPro18,1"},"name": "Laptop 1","status_id": "01K9BW8DD6Z2N7TXM313N8BR69"},{"asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","custom_field_values": {"manufacturer": "Dell","model": "XPS 15"},"name": "Laptop 2","status_id": "01K9BW8DD6Z2N7TXM313N8BR69"}]}}""")headers = {"Content-Type": "application/json",}email_address = 'your_email_address'api_token = 'your_api_token'# Use basic authenticationauth = HTTPBasicAuth(f'{email_address}/token', api_token)response = requests.request("POST",url,auth=auth,headers=headers,json=payload)print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://example.zendesk.com/api/v2/it_asset_management/assets/jobs")request = Net::HTTP::Post.new(uri, "Content-Type": "application/json")request.body = %q({"job": {"action": "create","items": [{"asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","custom_field_values": {"manufacturer": "Apple","model": "MacBookPro18,1"},"name": "Laptop 1","status_id": "01K9BW8DD6Z2N7TXM313N8BR69"},{"asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","custom_field_values": {"manufacturer": "Dell","model": "XPS 15"},"name": "Laptop 2","status_id": "01K9BW8DD6Z2N7TXM313N8BR69"}]}})email = "your_email_address"api_token = "your_api_token"credentials = "#{email}/token:#{api_token}"encoded_credentials = Base64.strict_encode64(credentials)request["Authorization"] = "Basic #{encoded_credentials}"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
curl - Create multiple assets
For clarity, the example places the JSON in a separate file and imports it into the cURL statement
my_job.json
{"job": {"action": "create","items": [{"name": "Laptop 1","asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","status_id": "01K9BW8DD6Z2N7TXM313N8BR69","custom_field_values": {"manufacturer": "Apple","model": "MacBookPro18,1"}},{"name": "Laptop 2","asset_type_id": "01K9BW852KHGF59W0TM02J2F6H","status_id": "01K9BW8DD6Z2N7TXM313N8BR69","custom_field_values": {"manufacturer": "Dell","model": "XPS 15"}}]}}
curl - Create multiple assets snippet
curl https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/jobs \-d @my_job.json \-H "Content-Type: application/json" -v -u {email_address}/token:{api_token} -X POST
curl - Create multiple assets using names
This example demonstrates using resource names instead of IDs for asset_type, status, and location. For clarity, the example places the JSON in a separate file and imports it into the cURL statement.
my_job.json
{"job": {"action": "create","items": [{"name": "Laptop 3","asset_type": "Laptop","status": "In Use","location": "San Francisco Office","custom_field_values": {"manufacturer": "Lenovo","model": "ThinkPad X1"}}]}}
curl - Create multiple assets using names snippet
curl https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/jobs \-d @my_job.json \-H "Content-Type: application/json" -v -u {email_address}/token:{api_token} -X POST
curl - Update multiple assets
For the update action, each job item must include id attribute. For clarity, the example places the JSON in a separate file and imports it into the cURL statement.
my_job.json
{"job": {"action": "update","items": [{"id": "01K9BW852KHGF59W0TM02J2F6H","name": "Updated Laptop 1","notes": "Updated notes","custom_field_values": {"ip_address": "1.2.3.4"}},{"id": "01K9BW852KHGF59W0TM02J2F6J","name": "Updated Laptop 2","custom_field_values": {"ip_address": "5.6.7.8"}}]}}
curl - Update multiple assets snippet
curl https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/jobs \-d @my_job.json \-H "Content-Type: application/json" -v -u {email_address}/token:{api_token} -X POST
curl - Delete multiple assets by ID
For clarity, the example places the JSON in a separate file and imports it into the cURL statement
my_job.json
{"job": {"action": "delete","items": ["01K9BW852KHGF59W0TM02J2F6H", "01K9BW852KHGF59W0TM02J2F6J", "01K9BW852KHGF59W0TM02J2F6K"]}}
curl - Delete multiple assets by ID snippet
curl https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/jobs \-d @my_job.json \-H "Content-Type: application/json" -v -u {email_address}/token:{api_token} -X POST
curl - Delete multiple assets by External ID
For clarity, the example places the JSON in a separate file and imports it into the cURL statement
my_job.json
{"job": {"action": "delete_by_external_id","items": ["ext-123", "ext-456", "ext-789"]}}
curl - Delete multiple assets by External ID snippet
curl https://{subdomain}.zendesk.com/api/v2/it_asset_management/assets/jobs \-d @my_job.json \-H "Content-Type: application/json" -v -u {email_address}/token:{api_token} -X POST
Example response(s)
201 Created
// Status 201 Created{"job_status": {"id": "V3-291e720c98aef4d953563ab090486213","message": null,"progress": null,"results": null,"status": "queued","total": 2,"url": "https://{subdomain}.zendesk.com/api/v2/job_statuses/V3-291e720c98aef4d953563ab090486213"}}