Skip to main content
Question

Creating asset and adding a custom field via API

  • March 30, 2026
  • 1 reply
  • 29 views

Hello we are trying to create assets via API. I am able to create the asset but I am having trouble adding our custom field in. Ive tried to pass the custom field when creating the asset initially and I have also tried updating the asset post creation with the field. 

I had seen another discussion post where they did via the bulk set-info end point. I tried to follow that but it still did not work. Please let me know if I am doing anything wrong. 
 

def set_asset_custom_field(self, asset_id: str, field_id: str, value):

payload = {

"AssetIds": f"[{asset_id}]",

"Request": {

"Values": [

{

"Key": f"$assets.custom-field:{field_id}",

"Value": f"{value}"

}

]

}

}

 

response = self.request("POST", "/assets/bulk/set-info", payload)

1 reply

Forum|alt.badge.img+1
  • Employee
  • April 3, 2026

Good afternoon!
 

Thanks for reaching out! Great question! From the example API call provided, it appears that the targeted endpoint may not be the intended endpoint for Asset updates. The correct endpoint should be

POST https://{{your_site}}.incidentiq.com/api/v1.0/assets/:assetId

The target value should also be “CustomFieldValues”. Relevant documentation regarding these fields and their syntax can be found in our existing API documentation. To locate this documentation, please navigate in your iiQ instance to Left Nav > Admin > Developer Tools. Our existing supported API documentation is linked there.

For additional reference, within the documentation, you’ll want to review the section located under Assets > Create an asset. This information located in this section regarding adding fields to a new asset can be applied to Updating assets as well. The minimum required field for updating assets via API is “assetID”.

Please note, by default the update API expects a fully hydrated asset payload because unspecified fields are overwritten with defaults during mapping. To send a true partial update, include the header ApiFlags: OnlySetMappedProperties; when this flag is present only the fields provided in the body are modified and the rest of the record remains untouched.

Additionally, when attempting to add a Custom Field to an existing asset, please ensure that the custom field is defined in your iiQ instance and is set to apply to the existing Asset’s criteria. Failing to define the custom field in iiQ beforehand may lead to your call failing to update the asset or inconsistent data states. 

For additional assistance, our Technical Support team is available for more personal assistance. Please feel free to reach out if you have any technical questions or require additional support in getting this workflow up and running. You can find information for contacting us below.

 


Please let me know if this information was helpful!

Best regards,

James

Technical Support Specialist II