Search cases by custom field

Preview - not available in production and subject to change

Find cases with particular custom field values.

Use customFieldFilters on searchCases to find cases by their custom field values. equals matches a text field whose value equals any of the supplied texts, ignoring case and surrounding whitespace. anyOptions matches a multi-select field with any of the supplied option keys selected. A case must match every filter (at most 10), and filters can be combined with the other search criteria.

Required scope: read-only

Request

query searchCases($input: SearchCasesInput!) {
  searchCases(input: $input) {
    ... on PageOfCasesMatchingSearch {
      cases {
        caseId
        name
        reference
        caseStatus
      }
      hasNextPage
      nextCursor
    }
    ... on ValidationErrors {
      errors {
        message
      }
    }
  }
}

Variables

{
  "input": {
    "customFieldFilters": [
      {
        "fieldKey": "01963b2e-4f1a-7c3d-8e5f-6a7b8c9d0e1f",
        "equals": [
          "HVL-4471"
        ]
      }
    ],
    "sortField": "UPDATED_ON",
    "sortDirection": "DESCENDING",
    "pageSize": 20
  }
}

Response

{
  "data": {
    "searchCases": {
      "cases": [
        {
          "caseId": "48213",
          "name": "Jane Citizen, John Citizen",
          "reference": "MAT-2026-0192",
          "caseStatus": "IN_PROGRESS"
        }
      ],
      "hasNextPage": false,
      "nextCursor": null
    }
  }
}