---
title: "Replace a user custom fields values"
method: PUT
path: "/api/v2/users/{userId}/custom-fields/values"
tags: ["Users"]
---

# Replace a user custom fields values

`PUT /api/v2/users/{userId}/custom-fields/values`

> 🔑
>
> Required OAuth scope: `users:write`.

Replaces a user custom fields values given its unique ID.

## Path parameters

- `userId` string, ObjectId, required

## Headers

- `360-api-version` 'v2.0', required

## Request body

- UpdateUserCustomFieldValuesBody
  - `customValues` CustomFieldValueDTO[], required — The list of customValues to replace the existing ones.
    - `customFieldId` string, ObjectId, required — The unique ID of the custom field.
    - `type` 'string' | 'date', required — The type of the custom field.
    - `value` union, required — The value assigned to the target for this custom field.
      - string — The custom field string value.
      - string, date-time — The custom field date value is in the `YYYY-MM-DD` (ISO 8601 in Coordinated Universal Time (UTC)).

## Response `200`

Returns the updated user custom values.

- CustomFieldValueDTO[]
  - `customFieldId` string, ObjectId, required — The unique ID of the custom field.
  - `type` 'string' | 'date', required — The type of the custom field.
  - `value` union, required — The value assigned to the target for this custom field.
    - string — The custom field string value.
    - string, date-time — The custom field date value is in the `YYYY-MM-DD` (ISO 8601 in Coordinated Universal Time (UTC)).

## Other responses

- `400` — The server cannot or will not process the request due to something that is perceived to be a client error.
- `401` — The given access token is either missing, invalid, has expired, or has been revoked.
- `403` — The given access token does not have the required OAuth scope to execute the request.
- `404` — The server cannot find the requested resource.
- `429` — The client has sent too many requests in a short amount of time.

---

[API](https://skmtc.dev/360learning/apis/core-api.md) · [All operations](https://skmtc.dev/360learning/apis/core-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/360learning/core-api/revisions/94b691b0b72c/schema)
