---
title: "Set Ticket Custom Field Values"
method: PUT
path: "/v2/tickets/{ticket_id}/custom-field-values"
tags: ["Ticket API"]
---

# Set Ticket Custom Field Values

`PUT /v2/tickets/{ticket_id}/custom-field-values`

Set custom field values on a ticket. Uses the ticket's extension entity to store field values.

## Path parameters

- `ticket_id` string, required — The ID of the ticket to set custom field values for.

## Request body

- object
  - `fieldValues` SvstoreEntityFieldValueInput[] — The field values to set. Use field_key to identify fields (e.g. "custom-gmin").
    - `fieldId` string — Identify the field by ID or key. At least one is required.
    - `fieldKey` string
    - `value` union — `Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of these variants. Absence of any variant indicates an error. The JSON representation for `Value` is JSON value.
      - number
      - string
      - boolean
      - object
    - `pinned` boolean — Pin this value to prevent ingestion from overwriting it. Default false = ingestion can overwrite. True = sticky.

## Response `200`

Success

- SvhelpPublicapiSetTicketCustomFieldValuesResponse
  - `data` SvstoreEntityFieldValue[] — The updated field values for the ticket.
    - `id` string — The EAV row id. NOT populated on entity read paths (Entity.field_values: search / list / get / create / update) since the v4 slim document_json dropped it — it has no consumer there. It IS populated on the listEntityFieldValueHistory RPC, which reads EAV rows directly.
    - `entityId` string
    - `fieldId` string
    - `fieldKey` string
    - `fieldName` string
    - `dataType` 'DATA_TYPE_UNSPECIFIED' | 'TEXT' | 'NUMBER' | 'BOOL' | 'TIMESTAMP' | 'ENUM' | 'ENTITY_REF' | 'USER_REF' | 'UNIQUE' | 'MULTI_SELECT' | 'FILE'
    - `value` union — `Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of these variants. Absence of any variant indicates an error. The JSON representation for `Value` is JSON value.
      - number
      - string
      - boolean
      - object
    - `setByUserId` string, nullable — Attribution: who/what set this field value. Stored in the slim document_json and populated on ALL entity read paths (search / list / get / create / update) as well as field-value history.
    - `setByAppInstanceId` string, nullable
    - `createdAt` string, date-time — A timestamp in RFC 3339 format (e.g., "2025-01-15T01:30:15Z").
    - `deletedAt` string, date-time — A timestamp in RFC 3339 format (e.g., "2025-01-15T01:30:15Z").
    - `pinned` boolean — When true, ingestion cannot overwrite this user-set value. Stored in the slim document_json and populated on ALL entity read paths.

## Other responses

- `default` — Error

---

[API](https://skmtc.net/serval/apis/serval-public-api.md) · [All operations](https://skmtc.net/serval/apis/serval-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/serval/serval-public-api/versions/0549515e9384/schema)
