---
title: "Replace all authorized values"
method: PUT
path: "/api/v2/custom-fields/{customFieldId}/authorized-values"
tags: ["Custom Fields"]
---

# Replace all authorized values

`PUT /api/v2/custom-fields/{customFieldId}/authorized-values`

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

Replaces all authorized values in the given custom field with the provided ones. Values not included are removed.

## Path parameters

- `customFieldId` string, ObjectId, required

## Headers

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

## Request body

- ReplaceAuthorizedValuesDTO
  - `authorizedValues` union, required — The new authorized values for the given custom fields. A custom field can have at most 300 authorized values.
    - string[] — Use date values if the given custom field has a date type. The expected format is `YYYY-MM-DD` (ISO 8601 in Coordinated Universal Time (UTC)).
    - string[] — Use string values if the given custom field has a string type.

## Response `200`

Returns the updated authorized values.

- union
  - string[] — The date format is `YYYY-MM-DD` (ISO 8601 in Coordinated Universal Time (UTC)).
  - string[]

## 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 given `customFieldId` does not correspond to any existing custom field.
- `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)
