---
title: "Set default values for a custom field by context and issue type"
method: PUT
path: "/rest/api/2/field/{fieldId}/context/defaultValues"
tags: ["Issue custom field contexts"]
---

# Set default values for a custom field by context and issue type

`PUT /rest/api/2/field/{fieldId}/context/defaultValues`

## Request

- Base URL: `https://your-domain.atlassian.net`
- URL: `https://your-domain.atlassian.net/rest/api/2/field/{fieldId}/context/defaultValues`
- Auth: one of:
  - HTTP basic
  - OAuth 2 (authorization code, authorization URL `https://auth.atlassian.com/authorize`, token URL `https://auth.atlassian.com/oauth/token`, scopes: `manage:jira-configuration`)

Updates default values for individual issue types in custom field contexts.

Only tenants enrolled in the early access program (EAP) can access this resource. See the [EAP announcement](https://ecosystem.atlassian.net/browse/CHANGE-3082) for details.

Each entry targets either one issue type through \{@code issueTypeId\}, or the catch-all configuration through \{@code isAnyIssueType=true\}. A null value removes the default for that target. Entries not included in the request are left unchanged.

## Path parameters

- `fieldId` string, required

## Request body

- CustomFieldContextDefaultValuesUpdate: Default value updates grouped by context and issue type.
  - `defaultValues` IssueTypeDefaultValueUpdate[]: The default values to update.
    - `contextId` integer, required: The ID of the context.
    - `isAnyIssueType` boolean, nullable: True when this is the catch-all default for issue types without a specific default.
    - `issueTypeId` string, nullable: The ID of the issue type this default value applies to.
    - `value` union
      - object: The default value for a cascading select custom field.
        - `cascadingOptionId` string: The ID of the default cascading option.
        - `contextId` string, required: The ID of the context.
        - `optionId` string, required: The ID of the default option.
        - `type` string, required
      - object: The default value for a multi-select custom field.
        - `contextId` string, required: The ID of the context.
        - `optionIds` string[], required: The list of IDs of the default options.
        - `type` string, required
      - object: The default value for a single select custom field.
        - `contextId` string, required: The ID of the context.
        - `optionId` string, required: The ID of the default option.
        - `type` string, required
      - object: Defaults for a User Picker (single) custom field.
        - `accountId` string, required: The ID of the default user.
        - `contextId` string, required: The ID of the context.
        - `type` string, required
        - `userFilter` UserFilter, required: Filter for a User Picker (single) custom field.
          - `enabled` boolean, required: Whether the filter is enabled.
          - `groups` string[]: User groups autocomplete suggestion users must belong to. If not provided, the default values are used. A maximum of 10 groups can be provided.
          - `roleIds` integer[]: Roles that autocomplete suggestion users must belong to. If not provided, the default values are used. A maximum of 10 roles can be provided.
      - object: The default value for a User Picker (multiple) custom field.
        - `accountIds` string[], required: The IDs of the default users.
        - `contextId` string, required: The ID of the context.
        - `type` string, required
      - object: The default value for a group picker custom field.
        - `contextId` string, required: The ID of the context.
        - `groupId` string, required: The ID of the the default group.
        - `type` string, required
      - object: The default value for a multiple group picker custom field.
        - `contextId` string, required: The ID of the context.
        - `groupIds` string[], required: The IDs of the default groups.
        - `type` string, required
      - object: The default value for a Date custom field.
        - `contextId` string, required: The ID of the context.
        - `date` string: The default date in ISO format. Ignored if `useCurrent` is true.
        - `type` string, required
        - `useCurrent` boolean: Whether to use the current date.
      - object: The default value for a date time custom field.
        - `contextId` string, required: The ID of the context.
        - `dateTime` string: The default date-time in ISO format. Ignored if `useCurrent` is true.
        - `type` string, required
        - `useCurrent` boolean: Whether to use the current date.
      - object: The default value for a URL custom field.
        - `contextId` string, required: The ID of the context.
        - `type` string, required
        - `url` string, required: The default URL.
      - object: The default value for a project custom field.
        - `contextId` string, required: The ID of the context.
        - `projectId` string, required: The ID of the default project.
        - `type` string, required
      - object: Default value for a float (number) custom field.
        - `contextId` string, required: The ID of the context.
        - `number` number, double, required: The default floating-point number.
        - `type` string, required
      - object: Default value for a labels custom field.
        - `contextId` string, required: The ID of the context.
        - `labels` string[], required: The default labels value.
        - `type` string, required
      - object: The default text for a text custom field.
        - `contextId` string, required: The ID of the context.
        - `text` string: The default text. The maximum length is 254 characters.
        - `type` string, required
      - object: The default text for a text area custom field.
        - `contextId` string, required: The ID of the context.
        - `text` string: The default text. The maximum length is 32767 characters.
        - `type` string, required
      - object: The default text for a plain text paragraph custom field.
        - `contextId` string, required: The ID of the context.
        - `text` string: The default text. Line breaks are preserved. The maximum length is the instance's text field character limit.
        - `type` string, required
      - object: The default text for a read only custom field.
        - `contextId` string, required: The ID of the context.
        - `text` string: The default text. The maximum length is 255 characters.
        - `type` string, required
      - object: The default value for a version picker custom field.
        - `contextId` string, required: The ID of the context.
        - `type` string, required
        - `versionId` string, required: The ID of the default version.
        - `versionOrder` string: The order the pickable versions are displayed in. If not provided, the released-first order is used. Available version orders are `"releasedFirst"` and `"unreleasedFirst"`.
      - object: The default value for a multiple version picker custom field.
        - `contextId` string, required: The ID of the context.
        - `type` string, required
        - `versionIds` string[], required: The IDs of the default versions.
        - `versionOrder` string: The order the pickable versions are displayed in. If not provided, the released-first order is used. Available version orders are `"releasedFirst"` and `"unreleasedFirst"`.
      - object: The default text for a Forge string custom field.
        - `contextId` string, required: The ID of the context.
        - `text` string: The default text. The maximum length is 254 characters.
        - `type` string, required
      - object: The default text for a Forge collection of strings custom field.
        - `contextId` string, required: The ID of the context.
        - `type` string, required
        - `values` string[]: List of string values. The maximum length for a value is 254 characters.
      - object: The default value for a Forge object custom field.
        - `contextId` string, required: The ID of the context.
        - `object` object: The default JSON object.
        - `type` string, required
      - object: The default value for a Forge date time custom field.
        - `contextId` string, required: The ID of the context.
        - `dateTime` string: The default date-time in ISO format. Ignored if `useCurrent` is true.
        - `type` string, required
        - `useCurrent` boolean: Whether to use the current date.
      - object: The default value for a Forge group custom field.
        - `contextId` string, required: The ID of the context.
        - `groupId` string, required: The ID of the the default group.
        - `type` string, required
      - object: The default value for a Forge collection of groups custom field.
        - `contextId` string, required: The ID of the context.
        - `groupIds` string[], required: The IDs of the default groups.
        - `type` string, required
      - object: Default value for a Forge number custom field.
        - `contextId` string, required: The ID of the context.
        - `number` number, double, required: The default floating-point number.
        - `type` string, required
      - object: Defaults for a Forge user custom field.
        - `accountId` string, required: The ID of the default user.
        - `contextId` string, required: The ID of the context.
        - `type` string, required
        - `userFilter` UserFilter, required: Filter for a User Picker (single) custom field.
          - `enabled` boolean, required: Whether the filter is enabled.
          - `groups` string[]: User groups autocomplete suggestion users must belong to. If not provided, the default values are used. A maximum of 10 groups can be provided.
          - `roleIds` integer[]: Roles that autocomplete suggestion users must belong to. If not provided, the default values are used. A maximum of 10 roles can be provided.
      - object: Defaults for a Forge collection of users custom field.
        - `accountIds` string[], required: The IDs of the default users.
        - `contextId` string, required: The ID of the context.
        - `type` string, required

## Response `204`

Returned if all default values were updated successfully.

- unknown

## Other responses

- `400`: Returned if the request, issue type, or default value is invalid, or the field type is unsupported.
- `401`: Returned if the authentication credentials are incorrect or missing.
- `403`: Returned if the user cannot administer the custom field, or the feature is not enabled for the tenant.
- `404`: Returned if the custom field or a context is not found.

## Changes

- **2026-10-14** `a8f48f288913`: 2 info
  - added `longtext` discriminator mapping keys to the `defaultValues/items/value` request property
  - added `#/components/schemas/CustomFieldContextDefaultValueLongText` to the `defaultValues/items/value` request property `oneOf` list
- **2026-09-29** `b12902d05291`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/atlassian/apis/the-jira-cloud-platform-rest-api/changes/rest/api/2/field/:fieldId/context/defaultValues/put.md)

---

[API](https://skmtc.dev/atlassian/apis/the-jira-cloud-platform-rest-api.md) - [All operations](https://skmtc.dev/atlassian/apis/the-jira-cloud-platform-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/atlassian/apis/the-jira-cloud-platform-rest-api/revisions/5b336c497218?raw)
