# Custom Field Values

If [Custom Fields](/tag/Custom-Fields) represent the fields themselves,
Custom Field Values represent the values in/of those fields. The Custom Field Values object allows
you to view, create, update, and delete these values.

## Fetching a list of Custom Field Values

 - [GET /custom_field_values](https://developer.kantata.com/kantata/specification/custom-field-values/get-custom-field-values.md): Returns all values for the specified set of
Custom Fields.

This endpoint has its own rate limit. See the Knowledge Base for more information.

Custom fields are organized into sets,
by the objects they store additional information for (Estimate, Project, Group, Resource, Task, or User).
Use the subject_type parameter to specify which set of Custom Fields to return values for:
* Estimate
* Story (Task)
* User
* Workspace (Project)
* WorkspaceGroup (Group)
* Resource

Custom field values for _archived_ Projects and Tasks are included in returned values.
Values are sorted from less to more recently updated.

##### Note:
The read_access permission setting on each custom field
determines the minimum permission needed to view a custom field and its value.
* Workspace (Project), Resource, and Story (Task) custom fields are project-specific objects,
so their minimum permissions are set at the project level:
  - project_collaboration (default)
  - time_logging
  - financial
  - project_admin

Most account-level permissions supercede project-level permissions. Therefore, Account Administrators
are able to view all Project, Resource, and Task custom fields and values across the account,
regardless of project participation or read_access settings.
* Estimate, WorkspaceGroup (Group), and User custom fields are account-wide objects, so their minimum permissions are
set at the account level:
  - account_collaboration
  - project_creator
  - project_lead
  - reports_viewer
  - reports_viewer_with_cost
  - account_admin (default)


This endpoint returns structured Custom Field Value objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the custom_field_values top-level JSON key.
Please see our Response Format section for more information.

## Creating a new Custom Field Value

 - [POST /custom_field_values](https://developer.kantata.com/kantata/specification/custom-field-values/create-custom-field-value.md): Creates a new value for the specified custom field. Creating a value can also override existing values,
effectively making this an update request as well.

When creating new single or multi choice values that
override existing values, note that new values are not _added_ to existing values, but instead _replace_ existing values.
Additionally, every new value has a unique, new ID.

This endpoint has its own rate limit. See the Knowledge Base for more information.

Bulk Create or Update

This endpoint supports bulk creating or updating up to 100 objects. In the request body, set the top-level key to its plural form and place the objects in an array. Example:


{
  "custom_field_values": [
    {
      "subject_type": "Workspace",
      "subject_id": 123,
      "custom_field_id": 456,
      "value": "Hello world"
    },
    {
      "subject_type": "Workspace",
      "subject_id": 123,
      "custom_field_id": 789,
      "value": "Hello world"
    }
  ]
}



This endpoint returns structured Custom Field Value objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the custom_field_values top-level JSON key.
Please see our Response Format section for more information.

## Delete multiple custom field values

 - [DELETE /custom_field_values](https://developer.kantata.com/kantata/specification/custom-field-values/delete-custom-field-values.md): The IDs of the custom field values to delete can be provided in the ids query parameter or via the request body.

Request body example:
{
  "ids": "1,2,3"
}

If any specified custom field values cannot be deleted, the entire request will fail and an error message
will be returned that specifies which ones could not be deleted and why.


This endpoint returns structured Custom Field Value objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the custom_field_values top-level JSON key.
Please see our Response Format section for more information.

## Fetching a single Custom Field Value

 - [GET /custom_field_values/{id}](https://developer.kantata.com/kantata/specification/custom-field-values/get-custom-field-value.md): This endpoint returns structured Custom Field Value objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the custom_field_values top-level JSON key.
Please see our Response Format section for more information.

## Updating an existing Custom Field Value

 - [PUT /custom_field_values/{id}](https://developer.kantata.com/kantata/specification/custom-field-values/update-custom-field-value.md): Updates an existing value for the specified custom field. Up to 100 values can be updated at one time.


This endpoint returns structured Custom Field Value objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the custom_field_values top-level JSON key.
Please see our Response Format section for more information.

## Deleting an existing Custom Field Value

 - [DELETE /custom_field_values/{id}](https://developer.kantata.com/kantata/specification/custom-field-values/delete-custom-field-value.md): The response will contain no content and an HTTP 204 status code if the request was
successful, or a standard Kantata OX error message explaining why the object could not be deleted.

