---
title: "user.setCustomFieldValue"
method: POST
path: "/user.setCustomFieldValue"
tags: ["User"]
---

# user.setCustomFieldValue

`POST /user.setCustomFieldValue`

Set the value of a custom field on an employee.

The values accepted in the `fieldValue` param depend on the type of field being updated. See the [customField.setValue](https://developers.ashbyhq.com/reference/customfieldsetvalue) docs for accepted types.

**Note:** When updating multiple custom fields on the same employee, use [`user.setCustomFieldValues`](#operation/userSetCustomFieldValues) instead to avoid race conditions.

**Requires the [`organizationWrite`](authentication#permissions-usersetcustomfieldvalue) permission.**

## Request body

- UserSetCustomFieldValueRequest
  - `userId` string, uuid, required — The id of the employee to set the custom field value for
  - `fieldId` string, uuid, required — The unique id of the Custom Field definition for the field
  - `fieldValue` union, required — The value to store in the field. Type depends on the custom field type (boolean, string, number, object, etc.) - Location field: An object with the following properties: `{ country: "USA", city: "San Francisco", region: "California" }`. You may provide any combination of these properties and we will attempt to geocode the location. For best results, provide all three properties.
    - boolean
    - number
    - string
    - string[]
    - object
      - `value` number, required — The currency amount
      - `currencyCode` string, required — The currency code
    - object
      - `type` string, required — The range type
      - `minValue` number, required — The minimum value
      - `maxValue` number, required — The maximum value
    - object
      - `type` string, required — The compensation range type
      - `minValue` number, required — The minimum compensation value
      - `maxValue` number, required — The maximum compensation value
      - `currencyCode` string, required — The currency code
      - `interval` string, required — The compensation interval
    - object
      - `country` string — The country of the location
      - `region` string — The region of the location
      - `city` string — The city of the location

## Response `200`

Responses from the user.setCustomFieldValue endpoint

- union
  - UserSetCustomFieldValueSuccessResponse
    - `success` true, required
    - `results` UserCustomField, required
      - `id` string, uuid, required — The unique id of the custom field definition
      - `title` string, required — The title of the custom field
      - `value` union, required — The current value of the custom field
        - boolean
        - number
        - string
        - string[]
        - object
          - `value` number, required — The currency amount
          - `currencyCode` string, required — The currency code
        - object
          - `type` string, required — The range type
          - `minValue` number, required — The minimum value
          - `maxValue` number, required — The maximum value
        - object
          - `type` string, required — The compensation range type
          - `minValue` number, required — The minimum compensation value
          - `maxValue` number, required — The maximum compensation value
          - `currencyCode` string, required — The currency code
          - `interval` string, required — The compensation interval
        - object
          - `country` string — The country of the location
          - `region` string — The region of the location
          - `city` string — The city of the location
      - `isPrivate` boolean — Whether the field is private
      - `valueLabel` union — The label of the custom field value. Only present for ValueSelect fields.
        - string
        - string[]
  - ErrorResponse
    - `success` false, required
    - `errors` ErrorDetail[], required
      - `message` string, required
      - `parameter` string

---

[API](https://skmtc.net/ashbyhq/apis/ashby-api.md) · [All operations](https://skmtc.net/ashbyhq/apis/ashby-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ashbyhq/ashby-api/revisions/778b919dc743/schema)
