← API Reference HTTP PATCH Support

Using HTTP PATCH

The PATCH action is an alternative to the traditional GET, POST, PUT, or DELETE verbs. Where available, it lets you submit only the fields that should be changed without having to load a full item beforehand.

Structure of PATCH Calls

Calls to PATCH endpoints should contain a JSON Patch document in the request body. This document is an array of patch operations represented as JsonPatchOperation instances.

This generally follows the JSON Patch standard, with the following exceptions:

  1. When accessing unordered subcollections (such as a ticket's custom attributes), items are referenced by their ID rather than their position in the collection. The special /- index cannot be used.
  2. Property name matching is case-insensitive.
  3. Because items have a pre-defined set of properties, the add and copy operations cannot be used to add new properties. Similarly, the remove and move operations cannot remove properties — only clear them.
  4. The test operation is not currently supported.

Handling Custom Attributes

Custom Attributes are accessed by their ID rather than their position in the collection. Only the value of the attribute needs to be submitted — not a full CustomAttribute instance. For choice-based attributes, the value is a string containing the ID of the selected choice, or a comma-separated list of IDs for multi-select attributes.

Example PATCH Request

For an item with Title and Account properties and a custom attributes collection named Attributes, the following request body sets the title, account, and a custom attribute with ID 1234, and clears the custom attribute with ID 5678.

[
  {"op": "add", "path": "/title", "value": "Updated Title"},
  {"op": "add", "path": "/accountid", "value": 47},
  {"op": "add", "path": "/attributes/1234", "value": "New Attribute Value"},
  {"op": "remove", "path": "/attributes/5678"}
]