---
type: api
title: Update case settings
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-updatecaseconfigurationdefaultspace
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-updatecaseconfigurationdefaultspace
products:
  - Kibana
---

# Update case settings

- Server: `https://{kibana_url}`

## Paths

- `PATCH` `/api/cases/configure/{configurationId}`
- `PATCH` `/s/{space_id}/api/cases/configure/{configurationId}`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#basicauth)

#### Path Parameters

- `configurationId` (string)
  An identifier for the configuration.

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Updates setting details such as the closure type, custom fields, templates, and the default connector for cases. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the case was created.

## Request Body

`application/json`

- `closure_type` (enum) — optional
  Indicates whether a case is automatically closed when it is pushed to external systems (`close-by-pushing`) or not automatically closed (`close-by-user`).
  Values: `close-by-pushing`, `close-by-user`
- `connector` (object) — optional
  An object that contains the connector configuration.
  - `fields` (object) — required — nullable
    The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.
  - `id` (string) — required
    The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.
  - `name` (string) — required
    The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.
  - `type` (enum) — required
    The type of connector.
    Values: `.cases-webhook`, `.jira`, `.none`, `.resilient`, `.servicenow`, `.servicenow-sir`, `.swimlane`
- `customFields` ([] object) — optional
  Custom fields case configuration.
  - `defaultValue` (boolean | string) — optional
    A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.
  - `key` (string · min: 1 · max: 36) — required
    A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.
  - `label` (string · min: 1 · max: 50) — required
    The custom field label that is displayed in the case.
  - `type` (enum) — required
    The type of the custom field.
    Values: `text`, `toggle`
  - `required` (boolean) — required
    Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.
- `templates` ([] object) — optional
  - `caseFields` (object) — optional
    - `assignees` ([] null · max: 10) — optional — nullable
      An array containing users that are assigned to the case.
      - `uid` (string) — required
        A unique identifier for the user profile. These identifiers can be found by using the suggest user profile API.
    - `category` (string · max: 50) — optional
      A word or phrase that categorizes the case.
    - `connector` (object) — optional
      - `fields` (object) — optional — nullable
        The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.
      - `id` (string) — optional
        The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.
      - `name` (string) — optional
        The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.
      - `type` (enum) — optional
        The type of connector.
        Values: `.cases-webhook`, `.jira`, `.none`, `.resilient`, `.servicenow`, `.servicenow-sir`, `.swimlane`
    - `customFields` ([] object) — optional
      Custom field values in the template.
      - `key` (string) — optional
        The unique key for the custom field.
      - `type` (enum) — optional
        The type of the custom field.
        Values: `text`, `toggle`
      - `value` (boolean | string) — optional
        The default value for the custom field when a case uses the template. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.
    - `description` (string · max: 30000) — optional
      The description for the case.
    - `settings` ({}) — optional
      An object that contains the case settings.
      - `extractObservables` (boolean) — optional
        When true, observables (e.g. IPs, hashes, URLs) are automatically extracted from case comments. Optional; defaults to false when omitted.
      - `syncAlerts` (boolean) — required
        Turns alert syncing on or off.
    - `severity` (enum) — optional
      The severity of the case.
      Values: `critical`, `high`, `low`, `medium`
    - `tags` ([] object · max: 200) — optional
      The words and phrases that help categorize cases. It can be an empty array.
    - `title` (string · max: 160) — optional
      A title for the case.
  - `description` (string) — optional
    A description for the template.
  - `key` (string) — optional
    A unique key for the template. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific template.
  - `name` (string) — optional
    The name of the template.
  - `tags` ([] object · max: 200) — optional
    The words and phrases that help categorize templates. It can be an empty array.
- `version` (string) — required
  The version of the connector. To retrieve the version value, use the get configuration API.

## Responses

#### `200`

Indicates a successful call.

`application/json`

- `closure_type` (enum)
  Indicates whether a case is automatically closed when it is pushed to external systems (`close-by-pushing`) or not automatically closed (`close-by-user`).
  Values: `close-by-pushing`, `close-by-user`
- `connector` (object)
  - `fields` (object) — nullable
    The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.
  - `id` (string)
    The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.
  - `name` (string)
    The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.
  - `type` (enum)
    The type of connector.
    Values: `.cases-webhook`, `.jira`, `.none`, `.resilient`, `.servicenow`, `.servicenow-sir`, `.swimlane`
- `created_at` (string)
- `created_by` (object)
  - `email` (string) — nullable
  - `full_name` (string) — nullable
  - `profile_uid` (string)
  - `username` (string) — nullable
- `customFields` ([] object)
  Custom fields configuration details.
  - `defaultValue` (boolean | string)
    A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.
  - `key` (string · min: 1 · max: 36)
    A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.
  - `label` (string · min: 1 · max: 50)
    The custom field label that is displayed in the case.
  - `type` (enum)
    The type of the custom field.
    Values: `text`, `toggle`
  - `required` (boolean)
    Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.
- `error` (string) — nullable
- `id` (string)
- `mappings` ([] object)
  - `action_type` (string)
  - `source` (string)
  - `target` (string)
- `observableTypes` ([] object)
  Custom observable type configuration details.
  - `key` (string)
    The observable type key.
  - `label` (string)
    The observable type label.
- `owner` (enum)
  The application that owns the cases: Stack Management, Observability, or Elastic Security.
  Values: `cases`, `observability`, `securitySolution`
- `templates` ([] object)
  Same fields as `templates`
- `updated_at` (string) — nullable
- `updated_by` (object) — nullable
  - `email` (string) — nullable
  - `full_name` (string) — nullable
  - `profile_uid` (string)
  - `username` (string) — nullable
- `version` (string)
#### `401`

Authorization information is missing or invalid.

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (integer)
## Code Examples

#### Console

```console
PATCH /api/cases/configure/{configurationId}
{
  "closure_type": "close-by-user",
  "connector": {
    "fields": "null",
    "id": "5e656730-e1ca-11ec-be9b-9b1838238ee6",
    "name": "my-jira-connector",
    "type": ".jira"
  },
  "customFields": [
    {
      "defaultValue": "A new default value.",
      "key": "d312efda-ec2b-42ec-9e2c-84981795c581",
      "label": "my-text-field",
      "type": "text",
      "required": true
    },
    {
      "key": "fcc6840d-eb14-42df-8aaf-232201a705ec",
      "label": "my-toggle",
      "type": "toggle",
      "required": false
    }
  ],
  "version": "WzExOSw0XQ=="
}
```

#### curl

```curl
curl -X PATCH "https://{kibana_url}/api/cases/configure/{configurationId}" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{
  "closure_type": "close-by-user",
  "connector": {
    "fields": "null",
    "id": "5e656730-e1ca-11ec-be9b-9b1838238ee6",
    "name": "my-jira-connector",
    "type": ".jira"
  },
  "customFields": [
    {
      "defaultValue": "A new default value.",
      "key": "d312efda-ec2b-42ec-9e2c-84981795c581",
      "label": "my-text-field",
      "type": "text",
      "required": true
    },
    {
      "key": "fcc6840d-eb14-42df-8aaf-232201a705ec",
      "label": "my-toggle",
      "type": "toggle",
      "required": false
    }
  ],
  "version": "WzExOSw0XQ=="
}'
```

## Response Examples

#### This is an example response when the case configuration was updated.

```json
{
  "closure_type": "close-by-user",
  "connector": {
    "fields": "null",
    "id": "5e656730-e1ca-11ec-be9b-9b1838238ee6",
    "name": "my-jira-connector",
    "type": ".jira"
  },
  "created_at": "2024-07-01T17:07:17.767Z",
  "created_by": {
    "email": "null",
    "full_name": "null",
    "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0",
    "username": "elastic"
  },
  "customFields": [
    {
      "defaultValue": "A new default value.",
      "key": "d312efda-ec2b-42ec-9e2c-84981795c581",
      "label": "my-text-field",
      "type": "text",
      "required": true
    },
    {
      "key": "fcc6840d-eb14-42df-8aaf-232201a705ec",
      "label": "my-toggle",
      "type": "toggle",
      "required": false
    }
  ],
  "error": "null",
  "id": "4a97a440-e1cd-11ec-be9b-9b1838238ee6",
  "mappings": [
    {
      "action_type": "overwrite",
      "source": "title",
      "target": "summary"
    },
    {
      "action_type": "overwrite",
      "source": "description",
      "target": "description"
    },
    {
      "action_type": "overwrite",
      "source": "tags",
      "target": "labels"
    },
    {
      "action_type": "append",
      "source": "comments",
      "target": "comments"
    }
  ],
  "owner": "cases",
  "templates": [],
  "updated_at": "2024-07-19T00:52:42.401Z",
  "updated_by": {
    "email": "null",
    "full_name": "null",
    "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0",
    "username": "elastic"
  },
  "version": "WzI2LDNd"
}
```

#### Authorization information is missing or invalid.

```json
{
  "error": "Unauthorized",
  "message": "Unable to authenticate with the provided credentials.",
  "statusCode": 401
}
```

